From a2ca1cb28ec1ce9f5f381f55ea78aa59a56ea915 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 25 Mar 2015 14:26:30 +0100 Subject: [PATCH] fix(version-up): check-in of latest sources This also includes crate files to remember which crates we have published already. Related to #44 --- .../v1.3/crates/0.1.2-api+20150218 | 0 .../v2.0/crates/0.1.2-api+20150309 | 0 .../directory_v1/crates/0.1.2-api+20150123 | 0 .../crates/0.1.2-api+20150303 | 0 .../reports_v1/crates/0.1.2-api+20150115 | 0 .../adsense/v1.4/crates/0.1.2-api+20150303 | 0 .../v4.1/crates/0.1.2-api+20150309 | 0 .../analytics/v3/crates/0.1.2-api+20150308 | 0 .../v1/crates/0.1.2-api+20141112 | 0 .../v2/crates/0.1.2-api+20150128 | 0 .../appsactivity/v1/crates/0.1.2-api+20140828 | 0 etc/api/appstate/v1/crates/0.1.2-api+20150316 | 0 etc/api/audit/v1/crates/0.1.2-api+20130108 | 0 .../v1beta2/crates/0.1.2-api+20141112 | 0 etc/api/bigquery/v2/crates/0.1.2-api+20150303 | 0 etc/api/blogger/v3/crates/0.1.2-api+20150208 | 0 etc/api/books/v1/crates/0.1.2-api+20150309 | 0 etc/api/calendar/v3/crates/0.1.2-api+20150303 | 0 .../v2/crates/0.1.2-api+20150206 | 0 .../v2beta2/crates/0.1.2-api+20150305 | 0 etc/api/compute/v1/crates/0.1.2-api+20150302 | 0 .../v1beta1/crates/0.1.2-api+20150316 | 0 etc/api/content/v2/crates/0.1.2-api+20150317 | 0 .../coordinate/v1/crates/0.1.2-api+20141215 | 0 .../customsearch/v1/crates/0.1.2-api+20131205 | 0 .../dataflow/v1b4/crates/0.1.2-api+20150130 | 0 .../v1beta2/crates/0.1.2-api+20140916 | 0 .../v2beta1/crates/0.1.2-api+20141215 | 0 .../v2.0/crates/0.1.2-api+20150223 | 0 etc/api/dns/v1beta1/crates/0.1.2-api+20150114 | 0 .../v1/crates/0.1.2-api+20150122 | 0 .../v2/crates/0.1.2-api+20150224 | 0 etc/api/drive/v2/crates/0.1.2-api+20150108 | 0 etc/api/fitness/v1/crates/0.1.2-api+20150222 | 0 etc/api/freebase/v1/crates/0.1.2-api+20150313 | 0 .../fusiontables/v2/crates/0.1.2-api+20150226 | 0 etc/api/games/v1/crates/0.1.2-api+20150316 | 0 .../v1configuration/crates/0.1.2-api+20150316 | 0 .../v1management/crates/0.1.2-api+20150316 | 0 .../v1beta2/crates/0.1.2-api+20150317 | 0 etc/api/gmail/v1/crates/0.1.2-api+20150313 | 0 .../v1/crates/0.1.2-api+20140416 | 0 .../v1/crates/0.1.2-api+20140428 | 0 .../v3/crates/0.1.2-api+20141009 | 0 .../licensing/v1/crates/0.1.2-api+20140122 | 0 .../manager/v1beta2/crates/0.1.2-api+20140915 | 0 .../mapsengine/v1/crates/0.1.2-api+20150225 | 0 etc/api/mirror/v1/crates/0.1.2-api+20150220 | 0 etc/api/oauth2/v2/crates/0.1.2-api+20150302 | 0 .../v2/crates/0.1.2-api+20150317 | 0 .../plusdomains/v1/crates/0.1.2-api+20150305 | 0 .../prediction/v1.6/crates/0.1.2-api+20140522 | 0 .../pubsub/v1beta2/crates/0.1.2-api+20150213 | 0 .../qpxexpress/v1/crates/0.1.2-api+20140321 | 0 .../v1beta2/crates/0.1.2-api+20141002 | 0 .../v1beta1/crates/0.1.2-api+20150129 | 0 .../v1sandbox/crates/0.1.2-api+20141112 | 0 .../v1beta2/crates/0.1.2-api+20140904 | 0 .../v1/crates/0.1.2-api+20131007 | 0 .../v1explorer/crates/0.1.2-api+20150112 | 0 .../v1beta4/crates/0.1.2-api+20150109 | 0 etc/api/storage/v1/crates/0.1.2-api+20150213 | 0 .../tagmanager/v1/crates/0.1.2-api+20150121 | 0 .../v1beta2/crates/0.1.2-api+20141111 | 0 etc/api/tasks/v1/crates/0.1.2-api+20141121 | 0 .../translate/v2/crates/0.1.2-api+20141123 | 0 .../urlshortener/v1/crates/0.1.2-api+20150219 | 0 etc/api/webfonts/v1/crates/0.1.2-api+20140210 | 0 .../webmasters/v3/crates/0.1.2-api+20140908 | 0 etc/api/youtube/v3/crates/0.1.2-api+20150309 | 0 .../v1/crates/0.1.2-api+20150304 | 0 gen/adexchangebuyer1d3/Cargo.toml | 4 +- gen/adexchangebuyer1d3/README.md | 37 +- gen/adexchangebuyer1d3/src/cmn.rs | 44 +- gen/adexchangebuyer1d3/src/lib.rs | 821 +- gen/adexchangeseller2/Cargo.toml | 4 +- gen/adexchangeseller2/README.md | 37 +- gen/adexchangeseller2/src/cmn.rs | 44 +- gen/adexchangeseller2/src/lib.rs | 607 +- gen/admin1_directory/Cargo.toml | 4 +- gen/admin1_directory/README.md | 37 +- gen/admin1_directory/src/cmn.rs | 44 +- gen/admin1_directory/src/lib.rs | 2263 +++--- gen/admin1_reports/Cargo.toml | 4 +- gen/admin1_reports/README.md | 37 +- gen/admin1_reports/src/cmn.rs | 44 +- gen/admin1_reports/src/lib.rs | 368 +- gen/admin2_email_migration/Cargo.toml | 4 +- gen/admin2_email_migration/README.md | 37 +- gen/admin2_email_migration/src/cmn.rs | 44 +- gen/admin2_email_migration/src/lib.rs | 124 +- gen/adsense1d4/Cargo.toml | 4 +- gen/adsense1d4/README.md | 37 +- gen/adsense1d4/src/cmn.rs | 44 +- gen/adsense1d4/src/lib.rs | 1373 ++-- gen/adsensehost4d1/Cargo.toml | 4 +- gen/adsensehost4d1/README.md | 37 +- gen/adsensehost4d1/src/cmn.rs | 44 +- gen/adsensehost4d1/src/lib.rs | 960 ++- gen/analytics3/Cargo.toml | 4 +- gen/analytics3/README.md | 37 +- gen/analytics3/src/cmn.rs | 44 +- gen/analytics3/src/lib.rs | 3529 +++++---- gen/androidenterprise1/Cargo.toml | 5 +- gen/androidenterprise1/README.md | 40 +- gen/androidenterprise1/src/cmn.rs | 44 +- gen/androidenterprise1/src/lib.rs | 1431 ++-- gen/androidpublisher2/Cargo.toml | 4 +- gen/androidpublisher2/README.md | 37 +- gen/androidpublisher2/src/cmn.rs | 44 +- gen/androidpublisher2/src/lib.rs | 1751 +++-- gen/appsactivity1/Cargo.toml | 4 +- gen/appsactivity1/README.md | 37 +- gen/appsactivity1/src/cmn.rs | 44 +- gen/appsactivity1/src/lib.rs | 164 +- gen/appstate1/Cargo.toml | 4 +- gen/appstate1/README.md | 37 +- gen/appstate1/src/cmn.rs | 44 +- gen/appstate1/src/lib.rs | 205 +- gen/audit1/Cargo.toml | 4 +- gen/audit1/README.md | 37 +- gen/audit1/src/cmn.rs | 44 +- gen/audit1/src/lib.rs | 155 +- gen/autoscaler1_beta2/Cargo.toml | 4 +- gen/autoscaler1_beta2/README.md | 37 +- gen/autoscaler1_beta2/src/cmn.rs | 44 +- gen/autoscaler1_beta2/src/lib.rs | 493 +- gen/bigquery2/Cargo.toml | 4 +- gen/bigquery2/README.md | 37 +- gen/bigquery2/src/cmn.rs | 44 +- gen/bigquery2/src/lib.rs | 1069 +-- gen/blogger3/Cargo.toml | 4 +- gen/blogger3/README.md | 37 +- gen/blogger3/src/cmn.rs | 44 +- gen/blogger3/src/lib.rs | 1351 ++-- gen/books1/Cargo.toml | 4 +- gen/books1/README.md | 37 +- gen/books1/src/cmn.rs | 44 +- gen/books1/src/lib.rs | 1990 ++--- gen/calendar3/Cargo.toml | 4 +- gen/calendar3/README.md | 37 +- gen/calendar3/src/cmn.rs | 44 +- gen/calendar3/src/lib.rs | 1423 ++-- gen/cloudlatencytest2/Cargo.toml | 4 +- gen/cloudlatencytest2/README.md | 37 +- gen/cloudlatencytest2/src/cmn.rs | 44 +- gen/cloudlatencytest2/src/lib.rs | 135 +- gen/cloudmonitoring2_beta2/Cargo.toml | 4 +- gen/cloudmonitoring2_beta2/README.md | 37 +- gen/cloudmonitoring2_beta2/src/cmn.rs | 44 +- gen/cloudmonitoring2_beta2/src/lib.rs | 357 +- gen/compute1/Cargo.toml | 4 +- gen/compute1/README.md | 37 +- gen/compute1/src/cmn.rs | 44 +- gen/compute1/src/lib.rs | 5080 ++++++------ gen/container1_beta1/Cargo.toml | 4 +- gen/container1_beta1/README.md | 37 +- gen/container1_beta1/src/cmn.rs | 44 +- gen/container1_beta1/src/lib.rs | 337 +- gen/content2/Cargo.toml | 4 +- gen/content2/README.md | 37 +- gen/content2/src/cmn.rs | 44 +- gen/content2/src/lib.rs | 1894 +++-- gen/coordinate1/Cargo.toml | 4 +- gen/coordinate1/README.md | 37 +- gen/coordinate1/src/cmn.rs | 44 +- gen/coordinate1/src/lib.rs | 602 +- gen/customsearch1/Cargo.toml | 4 +- gen/customsearch1/README.md | 37 +- gen/customsearch1/src/cmn.rs | 44 +- gen/customsearch1/src/lib.rs | 344 +- gen/dataflow1_b4/Cargo.toml | 4 +- gen/dataflow1_b4/README.md | 15 +- gen/dataflow1_b4/src/cmn.rs | 44 +- gen/dataflow1_b4/src/lib.rs | 21 +- gen/datastore1_beta2/Cargo.toml | 4 +- gen/datastore1_beta2/README.md | 37 +- gen/datastore1_beta2/src/cmn.rs | 44 +- gen/datastore1_beta2/src/lib.rs | 415 +- gen/deploymentmanager2_beta1/Cargo.toml | 4 +- gen/deploymentmanager2_beta1/README.md | 37 +- gen/deploymentmanager2_beta1/src/cmn.rs | 44 +- gen/deploymentmanager2_beta1/src/lib.rs | 484 +- gen/dfareporting2/Cargo.toml | 4 +- gen/dfareporting2/README.md | 37 +- gen/dfareporting2/src/cmn.rs | 44 +- gen/dfareporting2/src/lib.rs | 6876 +++++++++-------- gen/dns1_beta1/Cargo.toml | 4 +- gen/dns1_beta1/README.md | 37 +- gen/dns1_beta1/src/cmn.rs | 44 +- gen/dns1_beta1/src/lib.rs | 393 +- gen/doubleclickbidmanager1/Cargo.toml | 4 +- gen/doubleclickbidmanager1/README.md | 37 +- gen/doubleclickbidmanager1/src/cmn.rs | 44 +- gen/doubleclickbidmanager1/src/lib.rs | 374 +- gen/doubleclicksearch2/Cargo.toml | 4 +- gen/doubleclicksearch2/README.md | 37 +- gen/doubleclicksearch2/src/cmn.rs | 44 +- gen/doubleclicksearch2/src/lib.rs | 526 +- gen/drive2/Cargo.toml | 2 +- gen/drive2/README.md | 2 +- gen/drive2/src/cmn.rs | 2 +- gen/drive2/src/lib.rs | 6 +- gen/fitness1/Cargo.toml | 4 +- gen/fitness1/README.md | 37 +- gen/fitness1/src/cmn.rs | 44 +- gen/fitness1/src/lib.rs | 466 +- gen/freebase1/Cargo.toml | 4 +- gen/freebase1/README.md | 37 +- gen/freebase1/src/cmn.rs | 44 +- gen/freebase1/src/lib.rs | 187 +- gen/fusiontables2/Cargo.toml | 4 +- gen/fusiontables2/README.md | 37 +- gen/fusiontables2/src/cmn.rs | 44 +- gen/fusiontables2/src/lib.rs | 1243 +-- gen/games1/Cargo.toml | 4 +- gen/games1/README.md | 37 +- gen/games1/src/cmn.rs | 44 +- gen/games1/src/lib.rs | 2292 +++--- .../Cargo.toml | 4 +- .../README.md | 37 +- .../src/cmn.rs | 44 +- .../src/lib.rs | 496 +- gen/gamesmanagement1_management/Cargo.toml | 4 +- gen/gamesmanagement1_management/README.md | 37 +- gen/gamesmanagement1_management/src/cmn.rs | 44 +- gen/gamesmanagement1_management/src/lib.rs | 672 +- gen/genomics1_beta2/Cargo.toml | 4 +- gen/genomics1_beta2/README.md | 37 +- gen/genomics1_beta2/src/cmn.rs | 44 +- gen/genomics1_beta2/src/lib.rs | 2010 ++--- gen/gmail1/Cargo.toml | 4 +- gen/gmail1/README.md | 37 +- gen/gmail1/src/cmn.rs | 44 +- gen/gmail1/src/lib.rs | 1105 +-- gen/groupsmigration1/Cargo.toml | 2 +- gen/groupsmigration1/README.md | 2 +- gen/groupsmigration1/src/lib.rs | 6 +- gen/groupssettings1/Cargo.toml | 4 +- gen/groupssettings1/README.md | 37 +- gen/groupssettings1/src/cmn.rs | 44 +- gen/groupssettings1/src/lib.rs | 194 +- gen/identitytoolkit3/Cargo.toml | 4 +- gen/identitytoolkit3/README.md | 37 +- gen/identitytoolkit3/src/cmn.rs | 44 +- gen/identitytoolkit3/src/lib.rs | 548 +- gen/licensing1/Cargo.toml | 4 +- gen/licensing1/README.md | 37 +- gen/licensing1/src/cmn.rs | 44 +- gen/licensing1/src/lib.rs | 295 +- gen/manager1_beta2/Cargo.toml | 4 +- gen/manager1_beta2/README.md | 37 +- gen/manager1_beta2/src/cmn.rs | 44 +- gen/manager1_beta2/src/lib.rs | 499 +- gen/mapsengine1/Cargo.toml | 4 +- gen/mapsengine1/README.md | 37 +- gen/mapsengine1/src/cmn.rs | 44 +- gen/mapsengine1/src/lib.rs | 2630 ++++--- gen/mirror1/Cargo.toml | 4 +- gen/mirror1/README.md | 37 +- gen/mirror1/src/cmn.rs | 44 +- gen/mirror1/src/lib.rs | 842 +- gen/oauth2_v2/Cargo.toml | 4 +- gen/oauth2_v2/README.md | 37 +- gen/oauth2_v2/src/cmn.rs | 44 +- gen/oauth2_v2/src/lib.rs | 181 +- gen/pagespeedonline2/Cargo.toml | 6 +- gen/pagespeedonline2/README.md | 39 +- gen/pagespeedonline2/src/cmn.rs | 44 +- gen/pagespeedonline2/src/lib.rs | 226 +- gen/plusdomains1/Cargo.toml | 4 +- gen/plusdomains1/README.md | 37 +- gen/plusdomains1/src/cmn.rs | 44 +- gen/plusdomains1/src/lib.rs | 1092 +-- gen/prediction1d6/Cargo.toml | 4 +- gen/prediction1d6/README.md | 37 +- gen/prediction1d6/src/cmn.rs | 44 +- gen/prediction1d6/src/lib.rs | 423 +- gen/pubsub1_beta2/Cargo.toml | 4 +- gen/pubsub1_beta2/README.md | 37 +- gen/pubsub1_beta2/src/cmn.rs | 44 +- gen/pubsub1_beta2/src/lib.rs | 422 +- gen/qpxexpress1/Cargo.toml | 4 +- gen/qpxexpress1/README.md | 37 +- gen/qpxexpress1/src/cmn.rs | 44 +- gen/qpxexpress1/src/lib.rs | 358 +- gen/replicapool1_beta2/Cargo.toml | 4 +- gen/replicapool1_beta2/README.md | 37 +- gen/replicapool1_beta2/src/cmn.rs | 44 +- gen/replicapool1_beta2/src/lib.rs | 546 +- gen/replicapoolupdater1_beta1/Cargo.toml | 4 +- gen/replicapoolupdater1_beta1/README.md | 37 +- gen/replicapoolupdater1_beta1/src/cmn.rs | 44 +- gen/replicapoolupdater1_beta1/src/lib.rs | 479 +- gen/reseller1_sandbox/Cargo.toml | 4 +- gen/reseller1_sandbox/README.md | 37 +- gen/reseller1_sandbox/src/cmn.rs | 44 +- gen/reseller1_sandbox/src/lib.rs | 534 +- gen/resourceviews1_beta2/Cargo.toml | 4 +- gen/resourceviews1_beta2/README.md | 37 +- gen/resourceviews1_beta2/src/cmn.rs | 44 +- gen/resourceviews1_beta2/src/lib.rs | 541 +- gen/siteverification1/Cargo.toml | 4 +- gen/siteverification1/README.md | 37 +- gen/siteverification1/src/cmn.rs | 44 +- gen/siteverification1/src/lib.rs | 245 +- gen/spectrum1_explorer/Cargo.toml | 4 +- gen/spectrum1_explorer/README.md | 37 +- gen/spectrum1_explorer/src/cmn.rs | 44 +- gen/spectrum1_explorer/src/lib.rs | 411 +- gen/sqladmin1_beta4/Cargo.toml | 4 +- gen/sqladmin1_beta4/README.md | 37 +- gen/sqladmin1_beta4/src/cmn.rs | 44 +- gen/sqladmin1_beta4/src/lib.rs | 1353 ++-- gen/storage1/Cargo.toml | 4 +- gen/storage1/README.md | 37 +- gen/storage1/src/cmn.rs | 44 +- gen/storage1/src/lib.rs | 1366 ++-- gen/tagmanager1/Cargo.toml | 4 +- gen/tagmanager1/README.md | 37 +- gen/tagmanager1/src/cmn.rs | 44 +- gen/tagmanager1/src/lib.rs | 1586 ++-- gen/taskqueue1_beta2/Cargo.toml | 4 +- gen/taskqueue1_beta2/README.md | 37 +- gen/taskqueue1_beta2/src/cmn.rs | 44 +- gen/taskqueue1_beta2/src/lib.rs | 348 +- gen/tasks1/Cargo.toml | 4 +- gen/tasks1/README.md | 37 +- gen/tasks1/src/cmn.rs | 44 +- gen/tasks1/src/lib.rs | 493 +- gen/translate2/Cargo.toml | 4 +- gen/translate2/README.md | 37 +- gen/translate2/src/cmn.rs | 44 +- gen/translate2/src/lib.rs | 171 +- gen/urlshortener1/Cargo.toml | 4 +- gen/urlshortener1/README.md | 37 +- gen/urlshortener1/src/cmn.rs | 44 +- gen/urlshortener1/src/lib.rs | 182 +- gen/webfonts1/Cargo.toml | 4 +- gen/webfonts1/README.md | 37 +- gen/webfonts1/src/cmn.rs | 44 +- gen/webfonts1/src/lib.rs | 106 +- gen/webmasters3/Cargo.toml | 4 +- gen/webmasters3/README.md | 37 +- gen/webmasters3/src/cmn.rs | 44 +- gen/webmasters3/src/lib.rs | 434 +- gen/youtube3/README.md | 2 +- gen/youtube3/cargo.toml | 2 +- gen/youtube3/src/lib.rs | 6 +- gen/youtubeanalytics1/Cargo.toml | 4 +- gen/youtubeanalytics1/README.md | 37 +- gen/youtubeanalytics1/src/cmn.rs | 44 +- gen/youtubeanalytics1/src/lib.rs | 413 +- 353 files changed, 38285 insertions(+), 30817 deletions(-) create mode 100644 etc/api/adexchangebuyer/v1.3/crates/0.1.2-api+20150218 create mode 100644 etc/api/adexchangeseller/v2.0/crates/0.1.2-api+20150309 create mode 100644 etc/api/admin/directory_v1/crates/0.1.2-api+20150123 create mode 100644 etc/api/admin/email_migration_v2/crates/0.1.2-api+20150303 create mode 100644 etc/api/admin/reports_v1/crates/0.1.2-api+20150115 create mode 100644 etc/api/adsense/v1.4/crates/0.1.2-api+20150303 create mode 100644 etc/api/adsensehost/v4.1/crates/0.1.2-api+20150309 create mode 100644 etc/api/analytics/v3/crates/0.1.2-api+20150308 create mode 100644 etc/api/androidenterprise/v1/crates/0.1.2-api+20141112 create mode 100644 etc/api/androidpublisher/v2/crates/0.1.2-api+20150128 create mode 100644 etc/api/appsactivity/v1/crates/0.1.2-api+20140828 create mode 100644 etc/api/appstate/v1/crates/0.1.2-api+20150316 create mode 100644 etc/api/audit/v1/crates/0.1.2-api+20130108 create mode 100644 etc/api/autoscaler/v1beta2/crates/0.1.2-api+20141112 create mode 100644 etc/api/bigquery/v2/crates/0.1.2-api+20150303 create mode 100644 etc/api/blogger/v3/crates/0.1.2-api+20150208 create mode 100644 etc/api/books/v1/crates/0.1.2-api+20150309 create mode 100644 etc/api/calendar/v3/crates/0.1.2-api+20150303 create mode 100644 etc/api/cloudlatencytest/v2/crates/0.1.2-api+20150206 create mode 100644 etc/api/cloudmonitoring/v2beta2/crates/0.1.2-api+20150305 create mode 100644 etc/api/compute/v1/crates/0.1.2-api+20150302 create mode 100644 etc/api/container/v1beta1/crates/0.1.2-api+20150316 create mode 100644 etc/api/content/v2/crates/0.1.2-api+20150317 create mode 100644 etc/api/coordinate/v1/crates/0.1.2-api+20141215 create mode 100644 etc/api/customsearch/v1/crates/0.1.2-api+20131205 create mode 100644 etc/api/dataflow/v1b4/crates/0.1.2-api+20150130 create mode 100644 etc/api/datastore/v1beta2/crates/0.1.2-api+20140916 create mode 100644 etc/api/deploymentmanager/v2beta1/crates/0.1.2-api+20141215 create mode 100644 etc/api/dfareporting/v2.0/crates/0.1.2-api+20150223 create mode 100644 etc/api/dns/v1beta1/crates/0.1.2-api+20150114 create mode 100644 etc/api/doubleclickbidmanager/v1/crates/0.1.2-api+20150122 create mode 100644 etc/api/doubleclicksearch/v2/crates/0.1.2-api+20150224 create mode 100644 etc/api/drive/v2/crates/0.1.2-api+20150108 create mode 100644 etc/api/fitness/v1/crates/0.1.2-api+20150222 create mode 100644 etc/api/freebase/v1/crates/0.1.2-api+20150313 create mode 100644 etc/api/fusiontables/v2/crates/0.1.2-api+20150226 create mode 100644 etc/api/games/v1/crates/0.1.2-api+20150316 create mode 100644 etc/api/gamesconfiguration/v1configuration/crates/0.1.2-api+20150316 create mode 100644 etc/api/gamesmanagement/v1management/crates/0.1.2-api+20150316 create mode 100644 etc/api/genomics/v1beta2/crates/0.1.2-api+20150317 create mode 100644 etc/api/gmail/v1/crates/0.1.2-api+20150313 create mode 100644 etc/api/groupsmigration/v1/crates/0.1.2-api+20140416 create mode 100644 etc/api/groupssettings/v1/crates/0.1.2-api+20140428 create mode 100644 etc/api/identitytoolkit/v3/crates/0.1.2-api+20141009 create mode 100644 etc/api/licensing/v1/crates/0.1.2-api+20140122 create mode 100644 etc/api/manager/v1beta2/crates/0.1.2-api+20140915 create mode 100644 etc/api/mapsengine/v1/crates/0.1.2-api+20150225 create mode 100644 etc/api/mirror/v1/crates/0.1.2-api+20150220 create mode 100644 etc/api/oauth2/v2/crates/0.1.2-api+20150302 create mode 100644 etc/api/pagespeedonline/v2/crates/0.1.2-api+20150317 create mode 100644 etc/api/plusdomains/v1/crates/0.1.2-api+20150305 create mode 100644 etc/api/prediction/v1.6/crates/0.1.2-api+20140522 create mode 100644 etc/api/pubsub/v1beta2/crates/0.1.2-api+20150213 create mode 100644 etc/api/qpxexpress/v1/crates/0.1.2-api+20140321 create mode 100644 etc/api/replicapool/v1beta2/crates/0.1.2-api+20141002 create mode 100644 etc/api/replicapoolupdater/v1beta1/crates/0.1.2-api+20150129 create mode 100644 etc/api/reseller/v1sandbox/crates/0.1.2-api+20141112 create mode 100644 etc/api/resourceviews/v1beta2/crates/0.1.2-api+20140904 create mode 100644 etc/api/siteverification/v1/crates/0.1.2-api+20131007 create mode 100644 etc/api/spectrum/v1explorer/crates/0.1.2-api+20150112 create mode 100644 etc/api/sqladmin/v1beta4/crates/0.1.2-api+20150109 create mode 100644 etc/api/storage/v1/crates/0.1.2-api+20150213 create mode 100644 etc/api/tagmanager/v1/crates/0.1.2-api+20150121 create mode 100644 etc/api/taskqueue/v1beta2/crates/0.1.2-api+20141111 create mode 100644 etc/api/tasks/v1/crates/0.1.2-api+20141121 create mode 100644 etc/api/translate/v2/crates/0.1.2-api+20141123 create mode 100644 etc/api/urlshortener/v1/crates/0.1.2-api+20150219 create mode 100644 etc/api/webfonts/v1/crates/0.1.2-api+20140210 create mode 100644 etc/api/webmasters/v3/crates/0.1.2-api+20140908 create mode 100644 etc/api/youtube/v3/crates/0.1.2-api+20150309 create mode 100644 etc/api/youtubeanalytics/v1/crates/0.1.2-api+20150304 diff --git a/etc/api/adexchangebuyer/v1.3/crates/0.1.2-api+20150218 b/etc/api/adexchangebuyer/v1.3/crates/0.1.2-api+20150218 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/adexchangeseller/v2.0/crates/0.1.2-api+20150309 b/etc/api/adexchangeseller/v2.0/crates/0.1.2-api+20150309 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/admin/directory_v1/crates/0.1.2-api+20150123 b/etc/api/admin/directory_v1/crates/0.1.2-api+20150123 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/admin/email_migration_v2/crates/0.1.2-api+20150303 b/etc/api/admin/email_migration_v2/crates/0.1.2-api+20150303 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/admin/reports_v1/crates/0.1.2-api+20150115 b/etc/api/admin/reports_v1/crates/0.1.2-api+20150115 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/adsense/v1.4/crates/0.1.2-api+20150303 b/etc/api/adsense/v1.4/crates/0.1.2-api+20150303 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/adsensehost/v4.1/crates/0.1.2-api+20150309 b/etc/api/adsensehost/v4.1/crates/0.1.2-api+20150309 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/analytics/v3/crates/0.1.2-api+20150308 b/etc/api/analytics/v3/crates/0.1.2-api+20150308 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/androidenterprise/v1/crates/0.1.2-api+20141112 b/etc/api/androidenterprise/v1/crates/0.1.2-api+20141112 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/androidpublisher/v2/crates/0.1.2-api+20150128 b/etc/api/androidpublisher/v2/crates/0.1.2-api+20150128 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/appsactivity/v1/crates/0.1.2-api+20140828 b/etc/api/appsactivity/v1/crates/0.1.2-api+20140828 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/appstate/v1/crates/0.1.2-api+20150316 b/etc/api/appstate/v1/crates/0.1.2-api+20150316 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/audit/v1/crates/0.1.2-api+20130108 b/etc/api/audit/v1/crates/0.1.2-api+20130108 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/autoscaler/v1beta2/crates/0.1.2-api+20141112 b/etc/api/autoscaler/v1beta2/crates/0.1.2-api+20141112 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/bigquery/v2/crates/0.1.2-api+20150303 b/etc/api/bigquery/v2/crates/0.1.2-api+20150303 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/blogger/v3/crates/0.1.2-api+20150208 b/etc/api/blogger/v3/crates/0.1.2-api+20150208 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/books/v1/crates/0.1.2-api+20150309 b/etc/api/books/v1/crates/0.1.2-api+20150309 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/calendar/v3/crates/0.1.2-api+20150303 b/etc/api/calendar/v3/crates/0.1.2-api+20150303 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/cloudlatencytest/v2/crates/0.1.2-api+20150206 b/etc/api/cloudlatencytest/v2/crates/0.1.2-api+20150206 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/cloudmonitoring/v2beta2/crates/0.1.2-api+20150305 b/etc/api/cloudmonitoring/v2beta2/crates/0.1.2-api+20150305 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/compute/v1/crates/0.1.2-api+20150302 b/etc/api/compute/v1/crates/0.1.2-api+20150302 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/container/v1beta1/crates/0.1.2-api+20150316 b/etc/api/container/v1beta1/crates/0.1.2-api+20150316 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/content/v2/crates/0.1.2-api+20150317 b/etc/api/content/v2/crates/0.1.2-api+20150317 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/coordinate/v1/crates/0.1.2-api+20141215 b/etc/api/coordinate/v1/crates/0.1.2-api+20141215 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/customsearch/v1/crates/0.1.2-api+20131205 b/etc/api/customsearch/v1/crates/0.1.2-api+20131205 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/dataflow/v1b4/crates/0.1.2-api+20150130 b/etc/api/dataflow/v1b4/crates/0.1.2-api+20150130 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/datastore/v1beta2/crates/0.1.2-api+20140916 b/etc/api/datastore/v1beta2/crates/0.1.2-api+20140916 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/deploymentmanager/v2beta1/crates/0.1.2-api+20141215 b/etc/api/deploymentmanager/v2beta1/crates/0.1.2-api+20141215 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/dfareporting/v2.0/crates/0.1.2-api+20150223 b/etc/api/dfareporting/v2.0/crates/0.1.2-api+20150223 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/dns/v1beta1/crates/0.1.2-api+20150114 b/etc/api/dns/v1beta1/crates/0.1.2-api+20150114 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/doubleclickbidmanager/v1/crates/0.1.2-api+20150122 b/etc/api/doubleclickbidmanager/v1/crates/0.1.2-api+20150122 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/doubleclicksearch/v2/crates/0.1.2-api+20150224 b/etc/api/doubleclicksearch/v2/crates/0.1.2-api+20150224 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/drive/v2/crates/0.1.2-api+20150108 b/etc/api/drive/v2/crates/0.1.2-api+20150108 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/fitness/v1/crates/0.1.2-api+20150222 b/etc/api/fitness/v1/crates/0.1.2-api+20150222 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/freebase/v1/crates/0.1.2-api+20150313 b/etc/api/freebase/v1/crates/0.1.2-api+20150313 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/fusiontables/v2/crates/0.1.2-api+20150226 b/etc/api/fusiontables/v2/crates/0.1.2-api+20150226 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/games/v1/crates/0.1.2-api+20150316 b/etc/api/games/v1/crates/0.1.2-api+20150316 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/gamesconfiguration/v1configuration/crates/0.1.2-api+20150316 b/etc/api/gamesconfiguration/v1configuration/crates/0.1.2-api+20150316 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/gamesmanagement/v1management/crates/0.1.2-api+20150316 b/etc/api/gamesmanagement/v1management/crates/0.1.2-api+20150316 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/genomics/v1beta2/crates/0.1.2-api+20150317 b/etc/api/genomics/v1beta2/crates/0.1.2-api+20150317 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/gmail/v1/crates/0.1.2-api+20150313 b/etc/api/gmail/v1/crates/0.1.2-api+20150313 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/groupsmigration/v1/crates/0.1.2-api+20140416 b/etc/api/groupsmigration/v1/crates/0.1.2-api+20140416 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/groupssettings/v1/crates/0.1.2-api+20140428 b/etc/api/groupssettings/v1/crates/0.1.2-api+20140428 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/identitytoolkit/v3/crates/0.1.2-api+20141009 b/etc/api/identitytoolkit/v3/crates/0.1.2-api+20141009 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/licensing/v1/crates/0.1.2-api+20140122 b/etc/api/licensing/v1/crates/0.1.2-api+20140122 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/manager/v1beta2/crates/0.1.2-api+20140915 b/etc/api/manager/v1beta2/crates/0.1.2-api+20140915 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/mapsengine/v1/crates/0.1.2-api+20150225 b/etc/api/mapsengine/v1/crates/0.1.2-api+20150225 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/mirror/v1/crates/0.1.2-api+20150220 b/etc/api/mirror/v1/crates/0.1.2-api+20150220 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/oauth2/v2/crates/0.1.2-api+20150302 b/etc/api/oauth2/v2/crates/0.1.2-api+20150302 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/pagespeedonline/v2/crates/0.1.2-api+20150317 b/etc/api/pagespeedonline/v2/crates/0.1.2-api+20150317 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/plusdomains/v1/crates/0.1.2-api+20150305 b/etc/api/plusdomains/v1/crates/0.1.2-api+20150305 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/prediction/v1.6/crates/0.1.2-api+20140522 b/etc/api/prediction/v1.6/crates/0.1.2-api+20140522 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/pubsub/v1beta2/crates/0.1.2-api+20150213 b/etc/api/pubsub/v1beta2/crates/0.1.2-api+20150213 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/qpxexpress/v1/crates/0.1.2-api+20140321 b/etc/api/qpxexpress/v1/crates/0.1.2-api+20140321 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/replicapool/v1beta2/crates/0.1.2-api+20141002 b/etc/api/replicapool/v1beta2/crates/0.1.2-api+20141002 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/replicapoolupdater/v1beta1/crates/0.1.2-api+20150129 b/etc/api/replicapoolupdater/v1beta1/crates/0.1.2-api+20150129 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/reseller/v1sandbox/crates/0.1.2-api+20141112 b/etc/api/reseller/v1sandbox/crates/0.1.2-api+20141112 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/resourceviews/v1beta2/crates/0.1.2-api+20140904 b/etc/api/resourceviews/v1beta2/crates/0.1.2-api+20140904 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/siteverification/v1/crates/0.1.2-api+20131007 b/etc/api/siteverification/v1/crates/0.1.2-api+20131007 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/spectrum/v1explorer/crates/0.1.2-api+20150112 b/etc/api/spectrum/v1explorer/crates/0.1.2-api+20150112 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/sqladmin/v1beta4/crates/0.1.2-api+20150109 b/etc/api/sqladmin/v1beta4/crates/0.1.2-api+20150109 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/storage/v1/crates/0.1.2-api+20150213 b/etc/api/storage/v1/crates/0.1.2-api+20150213 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/tagmanager/v1/crates/0.1.2-api+20150121 b/etc/api/tagmanager/v1/crates/0.1.2-api+20150121 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/taskqueue/v1beta2/crates/0.1.2-api+20141111 b/etc/api/taskqueue/v1beta2/crates/0.1.2-api+20141111 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/tasks/v1/crates/0.1.2-api+20141121 b/etc/api/tasks/v1/crates/0.1.2-api+20141121 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/translate/v2/crates/0.1.2-api+20141123 b/etc/api/translate/v2/crates/0.1.2-api+20141123 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/urlshortener/v1/crates/0.1.2-api+20150219 b/etc/api/urlshortener/v1/crates/0.1.2-api+20150219 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/webfonts/v1/crates/0.1.2-api+20140210 b/etc/api/webfonts/v1/crates/0.1.2-api+20140210 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/webmasters/v3/crates/0.1.2-api+20140908 b/etc/api/webmasters/v3/crates/0.1.2-api+20140908 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/youtube/v3/crates/0.1.2-api+20150309 b/etc/api/youtube/v3/crates/0.1.2-api+20150309 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/etc/api/youtubeanalytics/v1/crates/0.1.2-api+20150304 b/etc/api/youtubeanalytics/v1/crates/0.1.2-api+20150304 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/gen/adexchangebuyer1d3/Cargo.toml b/gen/adexchangebuyer1d3/Cargo.toml index 0da833259a..5f514f1722 100644 --- a/gen/adexchangebuyer1d3/Cargo.toml +++ b/gen/adexchangebuyer1d3/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-adexchangebuyer1d3" -version = "0.1.1+20150218" +version = "0.1.2+20150218" authors = ["Sebastian Thiel "] description = "A complete library to interact with Ad Exchange Buyer (protocol v1.3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangebuyer1d3" @@ -16,7 +16,7 @@ keywords = ["adexchangebuyer", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/adexchangebuyer1d3/README.md b/gen/adexchangebuyer1d3/README.md index f3a73d3dc4..8fa8ac51a7 100644 --- a/gen/adexchangebuyer1d3/README.md +++ b/gen/adexchangebuyer1d3/README.md @@ -1,11 +1,11 @@ The `google-adexchangebuyer1d3` library allows access to all features of the *Google Ad Exchange Buyer* service. -This documentation was generated from *Ad Exchange Buyer* crate version *0.1.1+20150218*, where *20150218* is the exact revision of the *adexchangebuyer:v1.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *Ad Exchange Buyer* crate version *0.1.2+20150218*, where *20150218* is the exact revision of the *adexchangebuyer:v1.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *Ad Exchange Buyer* *v1d3* API can be found at the [official documentation site](https://developers.google.com/ad-exchange/buyer-rest). @@ -37,6 +37,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-adexchangebuyer1d3/struct.AdExchangeBuyer.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-adexchangebuyer1d3/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-adexchangebuyer1d3/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-adexchangebuyer1d3/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -46,6 +48,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-adexchangebuyer1d3/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -84,7 +88,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-adexchangebuyer1d3" as adexchangebuyer1d3; use adexchangebuyer1d3::PretargetingConfig; -use adexchangebuyer1d3::Result; +use adexchangebuyer1d3::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use adexchangebuyer1d3::AdExchangeBuyer; @@ -113,15 +117,17 @@ let result = hub.pretargeting_config().patch(&req, "accountId", "configId") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -134,7 +140,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-adexchangebuyer1d3/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-adexchangebuyer1d3/trait.ResponseResult.html), it will return that by default. @@ -157,8 +163,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-adexchangebuye ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-adexchangebuyer1d3/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-adexchangebuyer1d3/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-adexchangebuyer1d3/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-adexchangebuyer1d3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-adexchangebuyer1d3/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/adexchangebuyer1d3/src/cmn.rs b/gen/adexchangebuyer1d3/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/adexchangebuyer1d3/src/cmn.rs +++ b/gen/adexchangebuyer1d3/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/adexchangebuyer1d3/src/lib.rs b/gen/adexchangebuyer1d3/src/lib.rs index 036934a776..b54aeb6e39 100644 --- a/gen/adexchangebuyer1d3/src/lib.rs +++ b/gen/adexchangebuyer1d3/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Ad Exchange Buyer* crate version *0.1.1+20150218*, where *20150218* is the exact revision of the *adexchangebuyer:v1.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *Ad Exchange Buyer* crate version *0.1.2+20150218*, where *20150218* is the exact revision of the *adexchangebuyer:v1.3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *Ad Exchange Buyer* *v1d3* API can be found at the //! [official documentation site](https://developers.google.com/ad-exchange/buyer-rest). @@ -37,6 +37,8 @@ //! //! * **[Hub](struct.AdExchangeBuyer.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -46,6 +48,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -84,7 +88,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-adexchangebuyer1d3" as adexchangebuyer1d3; //! use adexchangebuyer1d3::PretargetingConfig; -//! use adexchangebuyer1d3::Result; +//! use adexchangebuyer1d3::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -114,15 +118,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -135,7 +141,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -158,8 +164,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -208,7 +215,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -255,7 +262,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-adexchangebuyer1d3" as adexchangebuyer1d3; /// use adexchangebuyer1d3::PretargetingConfig; -/// use adexchangebuyer1d3::Result; +/// use adexchangebuyer1d3::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -285,15 +292,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -314,7 +323,7 @@ impl<'a, C, NC, A> AdExchangeBuyer AdExchangeBuyer { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -342,7 +351,7 @@ impl<'a, C, NC, A> AdExchangeBuyer } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -362,9 +371,9 @@ impl<'a, C, NC, A> AdExchangeBuyer /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PretargetingConfigExcludedPlacements { - /// The value of the placement. Interpretation depends on the placement type, e.g. URL for a site placement, channel name for a channel placement, app id for a mobile app placement. + /// The value of the placement. Interpretation depends on the placement type, e.g. URL for a site placement, channel name for a channel placement, app id for a mobile app placement. pub token: String, - /// The type of the placement. + /// The type of the placement. #[serde(alias="type")] pub type_: String, } @@ -379,9 +388,9 @@ impl Part for PretargetingConfigExcludedPlacements {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeDisapprovalReasons { - /// The categorized reason for disapproval. + /// The categorized reason for disapproval. pub reason: String, - /// Additional details about the reason for disapproval. + /// Additional details about the reason for disapproval. pub details: Vec, } @@ -403,26 +412,26 @@ impl Part for CreativeDisapprovalReasons {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Account { - /// Resource type. + /// Resource type. pub kind: Option, - /// The sum of all bidderLocation.maximumQps values cannot exceed this. Please contact your technical account manager if you need to change this. + /// The sum of all bidderLocation.maximumQps values cannot exceed this. Please contact your technical account manager if you need to change this. #[serde(alias="maximumTotalQps")] pub maximum_total_qps: Option, - /// The maximum number of active creatives that an account can have, where a creative is active if it was inserted or bid with in the last 30 days. Please contact your technical account manager if you need to change this. + /// The maximum number of active creatives that an account can have, where a creative is active if it was inserted or bid with in the last 30 days. Please contact your technical account manager if you need to change this. #[serde(alias="maximumActiveCreatives")] pub maximum_active_creatives: Option, - /// Your bidder locations that have distinct URLs. + /// Your bidder locations that have distinct URLs. #[serde(alias="bidderLocation")] pub bidder_location: Option>, - /// The nid parameter value used in cookie match requests. Please contact your technical account manager if you need to change this. + /// The nid parameter value used in cookie match requests. Please contact your technical account manager if you need to change this. #[serde(alias="cookieMatchingNid")] pub cookie_matching_nid: Option, - /// The number of creatives that this account inserted or bid with in the last 30 days. + /// The number of creatives that this account inserted or bid with in the last 30 days. #[serde(alias="numberActiveCreatives")] pub number_active_creatives: Option, - /// Account id. + /// Account id. pub id: Option, - /// The base URL used in cookie match requests. + /// The base URL used in cookie match requests. #[serde(alias="cookieMatchingUrl")] pub cookie_matching_url: Option, } @@ -443,9 +452,9 @@ impl ResponseResult for Account {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PretargetingConfigList { - /// A list of pretargeting configs + /// A list of pretargeting configs pub items: Vec, - /// Resource type. + /// Resource type. pub kind: String, } @@ -458,9 +467,9 @@ impl ResponseResult for PretargetingConfigList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeFilteringReasons { - /// The date in ISO 8601 format for the data. The data is collected from 00:00:00 to 23:59:59 in PST. + /// The date in ISO 8601 format for the data. The data is collected from 00:00:00 to 23:59:59 in PST. pub date: String, - /// The filtering reasons. + /// The filtering reasons. pub reasons: Vec, } @@ -479,15 +488,15 @@ impl Part for CreativeFilteringReasons {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct BillingInfo { - /// Resource type. + /// Resource type. pub kind: String, - /// A list of adgroup IDs associated with this particular account. These IDs may show up as part of a realtime bidding BidRequest, which indicates a bid request for this account. + /// A list of adgroup IDs associated with this particular account. These IDs may show up as part of a realtime bidding BidRequest, which indicates a bid request for this account. #[serde(alias="billingId")] pub billing_id: Vec, - /// Account id. + /// Account id. #[serde(alias="accountId")] pub account_id: i32, - /// Account name. + /// Account name. #[serde(alias="accountName")] pub account_name: String, } @@ -506,9 +515,9 @@ impl ResponseResult for BillingInfo {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DirectDealsList { - /// Resource type. + /// Resource type. pub kind: String, - /// A list of direct deals relevant for your account. + /// A list of direct deals relevant for your account. #[serde(alias="directDeals")] pub direct_deals: Vec, } @@ -527,9 +536,9 @@ impl ResponseResult for DirectDealsList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountsList { - /// A list of accounts. + /// A list of accounts. pub items: Vec, - /// Resource type. + /// Resource type. pub kind: String, } @@ -547,12 +556,12 @@ impl ResponseResult for AccountsList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CreativesList { - /// Continuation token used to page through creatives. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through creatives. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of creatives. + /// A list of creatives. pub items: Vec, - /// Resource type. + /// Resource type. pub kind: String, } @@ -572,20 +581,20 @@ impl ResponseResult for CreativesList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Budget { - /// The billing id to determine which adgroup to provide budget information for. This is required for get and update requests. + /// The billing id to determine which adgroup to provide budget information for. This is required for get and update requests. #[serde(alias="billingId")] pub billing_id: Option, - /// The kind of the resource, i.e. "adexchangebuyer#budget". + /// The kind of the resource, i.e. "adexchangebuyer#budget". pub kind: Option, - /// The budget amount to apply for the billingId provided. This is required for update requests. + /// The budget amount to apply for the billingId provided. This is required for update requests. #[serde(alias="budgetAmount")] pub budget_amount: Option, - /// The currency code for the buyer. This cannot be altered here. + /// The currency code for the buyer. This cannot be altered here. #[serde(alias="currencyCode")] pub currency_code: Option, - /// The unique id that describes this item. + /// The unique id that describes this item. pub id: Option, - /// The id of the account. This is required for get and update requests. + /// The id of the account. This is required for get and update requests. #[serde(alias="accountId")] pub account_id: Option, } @@ -607,58 +616,58 @@ impl ResponseResult for Budget {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Creative { - /// Detected product categories, if any. Read-only. This field should not be set in requests. + /// Detected product categories, if any. Read-only. This field should not be set in requests. #[serde(alias="productCategories")] pub product_categories: Option>, - /// Creative serving status. Read-only. This field should not be set in requests. + /// Creative serving status. Read-only. This field should not be set in requests. pub status: Option, - /// The agency id for this creative. + /// The agency id for this creative. #[serde(alias="agencyId")] pub agency_id: Option, - /// All attributes for the ads that may be shown from this snippet. + /// All attributes for the ads that may be shown from this snippet. pub attribute: Option>, - /// Ad height. + /// Ad height. pub height: Option, - /// The name of the company being advertised in the creative. + /// The name of the company being advertised in the creative. #[serde(alias="advertiserName")] pub advertiser_name: Option, - /// The HTML snippet that displays the ad when inserted in the web page. If set, videoURL should not be set. + /// The HTML snippet that displays the ad when inserted in the web page. If set, videoURL should not be set. #[serde(alias="HTMLSnippet")] pub html_snippet: Option, - /// A buyer-specific id identifying the creative in this ad. + /// A buyer-specific id identifying the creative in this ad. #[serde(alias="buyerCreativeId")] pub buyer_creative_id: Option, - /// Account id. + /// Account id. #[serde(alias="accountId")] pub account_id: Option, - /// Detected advertiser id, if any. Read-only. This field should not be set in requests. + /// Detected advertiser id, if any. Read-only. This field should not be set in requests. #[serde(alias="advertiserId")] pub advertiser_id: Option>, - /// Resource type. + /// Resource type. pub kind: Option, - /// The url to fetch a video ad. If set, HTMLSnippet should not be set. + /// The url to fetch a video ad. If set, HTMLSnippet should not be set. #[serde(alias="videoURL")] pub video_url: Option, - /// The set of destination urls for the snippet. + /// The set of destination urls for the snippet. #[serde(alias="clickThroughUrl")] pub click_through_url: Option>, - /// Shows any corrections that were applied to this creative. Read-only. This field should not be set in requests. + /// Shows any corrections that were applied to this creative. Read-only. This field should not be set in requests. pub corrections: Option>, - /// Ad width. + /// Ad width. pub width: Option, - /// All restricted categories for the ads that may be shown from this snippet. + /// All restricted categories for the ads that may be shown from this snippet. #[serde(alias="restrictedCategories")] pub restricted_categories: Option>, - /// All vendor types for the ads that may be shown from this snippet. + /// All vendor types for the ads that may be shown from this snippet. #[serde(alias="vendorType")] pub vendor_type: Option>, - /// The filtering reasons for the creative. If this feature is not enabled, please ask your technical account manager. Read-only. This field should not be set in requests. + /// The filtering reasons for the creative. If this feature is not enabled, please ask your technical account manager. Read-only. This field should not be set in requests. #[serde(alias="filteringReasons")] pub filtering_reasons: Option, - /// The reasons for disapproval, if any. Note that not all disapproval reasons may be categorized, so it is possible for the creative to have a status of DISAPPROVED with an empty list for disapproval_reasons. In this case, please reach out to your TAM to help debug the issue. Read-only. This field should not be set in requests. + /// The reasons for disapproval, if any. Note that not all disapproval reasons may be categorized, so it is possible for the creative to have a status of DISAPPROVED with an empty list for disapproval_reasons. In this case, please reach out to your TAM to help debug the issue. Read-only. This field should not be set in requests. #[serde(alias="disapprovalReasons")] pub disapproval_reasons: Option>, - /// Detected sensitive categories, if any. Read-only. This field should not be set in requests. + /// Detected sensitive categories, if any. Read-only. This field should not be set in requests. #[serde(alias="sensitiveCategories")] pub sensitive_categories: Option>, } @@ -679,9 +688,9 @@ impl ResponseResult for Creative {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PerformanceReportList { - /// Resource type. + /// Resource type. pub kind: String, - /// A list of performance reports relevant for the account. + /// A list of performance reports relevant for the account. #[serde(alias="performanceReport")] pub performance_report: Vec, } @@ -695,10 +704,10 @@ impl ResponseResult for PerformanceReportList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeFilteringReasonsReasons { - /// The number of times the creative was filtered for the status. The count is aggregated across all publishers on the exchange. + /// The number of times the creative was filtered for the status. The count is aggregated across all publishers on the exchange. #[serde(alias="filteringCount")] pub filtering_count: i64, - /// The filtering status code. Please refer to the creative-status-codes.txt file for different statuses. + /// The filtering status code. Please refer to the creative-status-codes.txt file for different statuses. #[serde(alias="filteringStatus")] pub filtering_status: i32, } @@ -713,9 +722,9 @@ impl Part for CreativeFilteringReasonsReasons {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PretargetingConfigPlacements { - /// The value of the placement. Interpretation depends on the placement type, e.g. URL for a site placement, channel name for a channel placement, app id for a mobile app placement. + /// The value of the placement. Interpretation depends on the placement type, e.g. URL for a site placement, channel name for a channel placement, app id for a mobile app placement. pub token: String, - /// The type of the placement. + /// The type of the placement. #[serde(alias="type")] pub type_: String, } @@ -730,9 +739,9 @@ impl Part for PretargetingConfigPlacements {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PretargetingConfigDimensions { - /// Width in pixels. + /// Width in pixels. pub width: String, - /// Height in pixels. + /// Height in pixels. pub height: String, } @@ -746,49 +755,49 @@ impl Part for PretargetingConfigDimensions {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PerformanceReport { - /// Average QPS for cookie matcher operations. + /// Average QPS for cookie matcher operations. #[serde(alias="cookieMatcherStatusRate")] pub cookie_matcher_status_rate: Vec, - /// Rate of various prefiltering statuses per match. Please refer to the callout-status-codes.txt file for different statuses. + /// Rate of various prefiltering statuses per match. Please refer to the callout-status-codes.txt file for different statuses. #[serde(alias="calloutStatusRate")] pub callout_status_rate: Vec, - /// Average QPS for hosted match operations. + /// Average QPS for hosted match operations. #[serde(alias="hostedMatchStatusRate")] pub hosted_match_status_rate: Vec, - /// The unix timestamp of the starting time of this performance data. + /// The unix timestamp of the starting time of this performance data. pub timestamp: String, - /// The 50th percentile round trip latency(ms) as perceived from Google servers for the duration period covered by the report. + /// The 50th percentile round trip latency(ms) as perceived from Google servers for the duration period covered by the report. #[serde(alias="latency50thPercentile")] pub latency50th_percentile: f64, - /// The 85th percentile round trip latency(ms) as perceived from Google servers for the duration period covered by the report. + /// The 85th percentile round trip latency(ms) as perceived from Google servers for the duration period covered by the report. #[serde(alias="latency85thPercentile")] pub latency85th_percentile: f64, - /// Average QPS for pixel match responses from clients. + /// Average QPS for pixel match responses from clients. #[serde(alias="pixelMatchResponses")] pub pixel_match_responses: f64, - /// Rate of ads with a given status. Please refer to the creative-status-codes.txt file for different statuses. + /// Rate of ads with a given status. Please refer to the creative-status-codes.txt file for different statuses. #[serde(alias="creativeStatusRate")] pub creative_status_rate: Vec, - /// The 95th percentile round trip latency(ms) as perceived from Google servers for the duration period covered by the report. + /// The 95th percentile round trip latency(ms) as perceived from Google servers for the duration period covered by the report. #[serde(alias="latency95thPercentile")] pub latency95th_percentile: f64, - /// Rate of various quota account statuses per quota check. + /// Rate of various quota account statuses per quota check. #[serde(alias="noQuotaInRegion")] pub no_quota_in_region: f64, - /// Resource type. + /// Resource type. pub kind: String, - /// The trading location of this data. + /// The trading location of this data. pub region: String, - /// The configured quota limits for this account. + /// The configured quota limits for this account. #[serde(alias="quotaConfiguredLimit")] pub quota_configured_limit: f64, - /// Rate of various quota account statuses per quota check. + /// Rate of various quota account statuses per quota check. #[serde(alias="outOfQuota")] pub out_of_quota: f64, - /// The throttled quota limits for this account. + /// The throttled quota limits for this account. #[serde(alias="quotaThrottledLimit")] pub quota_throttled_limit: f64, - /// Average QPS for pixel match requests from clients. + /// Average QPS for pixel match requests from clients. #[serde(alias="pixelMatchRequests")] pub pixel_match_requests: f64, } @@ -802,9 +811,9 @@ impl Part for PerformanceReport {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeCorrections { - /// The type of correction that was applied to the creative. + /// The type of correction that was applied to the creative. pub reason: String, - /// Additional details about the correction. + /// Additional details about the correction. pub details: Vec, } @@ -823,9 +832,9 @@ impl Part for CreativeCorrections {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct BillingInfoList { - /// A list of billing info relevant for your account. + /// A list of billing info relevant for your account. pub items: Vec, - /// Resource type. + /// Resource type. pub kind: String, } @@ -844,36 +853,36 @@ impl ResponseResult for BillingInfoList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DirectDeal { - /// The name of the advertiser this deal is for. + /// The name of the advertiser this deal is for. pub advertiser: String, - /// Resource type. + /// Resource type. pub kind: String, - /// Deal name. + /// Deal name. pub name: String, - /// The currency code that applies to the fixed_cpm value. If not set then assumed to be USD. + /// The currency code that applies to the fixed_cpm value. If not set then assumed to be USD. #[serde(alias="currencyCode")] pub currency_code: String, - /// The account id of the buyer this deal is for. + /// The account id of the buyer this deal is for. #[serde(alias="accountId")] pub account_id: i32, - /// The fixed price for this direct deal. In cpm micros of currency according to currency_code. If set, then this deal is eligible for the fixed price tier of buying (highest priority, pay exactly the configured fixed price). + /// The fixed price for this direct deal. In cpm micros of currency according to currency_code. If set, then this deal is eligible for the fixed price tier of buying (highest priority, pay exactly the configured fixed price). #[serde(alias="fixedCpm")] pub fixed_cpm: String, - /// Start time for when this deal becomes active. If not set then this deal is active immediately upon creation. In seconds since the epoch. + /// Start time for when this deal becomes active. If not set then this deal is active immediately upon creation. In seconds since the epoch. #[serde(alias="startTime")] pub start_time: String, - /// If true, the publisher has opted to have their blocks ignored when a creative is bid with for this deal. + /// If true, the publisher has opted to have their blocks ignored when a creative is bid with for this deal. #[serde(alias="publisherBlocksOverriden")] pub publisher_blocks_overriden: bool, - /// End time for when this deal stops being active. If not set then this deal is valid until manually disabled by the publisher. In seconds since the epoch. + /// End time for when this deal stops being active. If not set then this deal is valid until manually disabled by the publisher. In seconds since the epoch. #[serde(alias="endTime")] pub end_time: String, - /// The name of the publisher offering this direct deal. + /// The name of the publisher offering this direct deal. #[serde(alias="sellerNetwork")] pub seller_network: String, - /// Deal id. + /// Deal id. pub id: String, - /// The minimum price for this direct deal. In cpm micros of currency according to currency_code. If set, then this deal is eligible for the private exchange tier of buying (below fixed price priority, run as a second price auction). + /// The minimum price for this direct deal. In cpm micros of currency according to currency_code. If set, then this deal is eligible for the private exchange tier of buying (below fixed price priority, run as a second price auction). #[serde(alias="privateExchangeMinCpm")] pub private_exchange_min_cpm: String, } @@ -896,68 +905,68 @@ impl ResponseResult for DirectDeal {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PretargetingConfig { - /// The kind of the resource, i.e. "adexchangebuyer#pretargetingConfig". + /// The kind of the resource, i.e. "adexchangebuyer#pretargetingConfig". pub kind: Option, - /// Requests containing any of these vertical ids will match. + /// Requests containing any of these vertical ids will match. pub verticals: Option>, - /// Requests matching any of these platforms will match. Possible values are PRETARGETING_PLATFORM_MOBILE, PRETARGETING_PLATFORM_DESKTOP, and PRETARGETING_PLATFORM_TABLET. + /// Requests matching any of these platforms will match. Possible values are PRETARGETING_PLATFORM_MOBILE, PRETARGETING_PLATFORM_DESKTOP, and PRETARGETING_PLATFORM_TABLET. pub platforms: Option>, - /// List must contain exactly one of PRETARGETING_CREATIVE_TYPE_HTML or PRETARGETING_CREATIVE_TYPE_VIDEO. + /// List must contain exactly one of PRETARGETING_CREATIVE_TYPE_HTML or PRETARGETING_CREATIVE_TYPE_VIDEO. #[serde(alias="creativeType")] pub creative_type: Option>, - /// Requests containing any of these geo criteria ids will match. + /// Requests containing any of these geo criteria ids will match. #[serde(alias="geoCriteriaIds")] pub geo_criteria_ids: Option>, - /// Requests containing any of these mobile operating system version ids will match. Values are from mobile-os.csv in the downloadable files section. + /// Requests containing any of these mobile operating system version ids will match. Values are from mobile-os.csv in the downloadable files section. #[serde(alias="mobileOperatingSystemVersions")] pub mobile_operating_system_versions: Option>, - /// The config id; generated automatically. Leave this field blank for insert requests. + /// The config id; generated automatically. Leave this field blank for insert requests. #[serde(alias="configId")] pub config_id: Option, - /// Requests containing any of these users list ids will not match. + /// Requests containing any of these users list ids will not match. #[serde(alias="excludedUserLists")] pub excluded_user_lists: Option>, - /// Whether this config is active. Required for all requests. + /// Whether this config is active. Required for all requests. #[serde(alias="isActive")] pub is_active: Option, - /// The name of the config. Must be unique. Required for all requests. + /// The name of the config. Must be unique. Required for all requests. #[serde(alias="configName")] pub config_name: Option, - /// Requests containing any of these vertical ids will not match. Values are from the publisher-verticals.txt file in the downloadable files section. + /// Requests containing any of these vertical ids will not match. Values are from the publisher-verticals.txt file in the downloadable files section. #[serde(alias="excludedVerticals")] pub excluded_verticals: Option>, - /// Requests which allow one of these (width, height) pairs will match. All pairs must be supported ad dimensions. + /// Requests which allow one of these (width, height) pairs will match. All pairs must be supported ad dimensions. pub dimensions: Option>, - /// Requests containing any of these geo criteria ids will not match. + /// Requests containing any of these geo criteria ids will not match. #[serde(alias="excludedGeoCriteriaIds")] pub excluded_geo_criteria_ids: Option>, - /// Creative attributes should be declared here if all creatives corresponding to this pretargeting configuration have that creative attribute. Values are from pretargetable-creative-attributes.txt in the downloadable files section. + /// Creative attributes should be declared here if all creatives corresponding to this pretargeting configuration have that creative attribute. Values are from pretargetable-creative-attributes.txt in the downloadable files section. #[serde(alias="supportedCreativeAttributes")] pub supported_creative_attributes: Option>, - /// Requests with any of these content labels will not match. Values are from content-labels.txt in the downloadable files section. + /// Requests with any of these content labels will not match. Values are from content-labels.txt in the downloadable files section. #[serde(alias="excludedContentLabels")] pub excluded_content_labels: Option>, - /// Requests that allow any of these vendor ids will match. Values are from vendors.txt in the downloadable files section. + /// Requests that allow any of these vendor ids will match. Values are from vendors.txt in the downloadable files section. #[serde(alias="vendorTypes")] pub vendor_types: Option>, - /// Request containing any of these language codes will match. + /// Request containing any of these language codes will match. pub languages: Option>, - /// Requests containing any of these user list ids will match. + /// Requests containing any of these user list ids will match. #[serde(alias="userLists")] pub user_lists: Option>, - /// Requests containing any of these mobile device ids will match. Values are from mobile-devices.csv in the downloadable files section. + /// Requests containing any of these mobile device ids will match. Values are from mobile-devices.csv in the downloadable files section. #[serde(alias="mobileDevices")] pub mobile_devices: Option>, - /// The id for billing purposes, provided for reference. Leave this field blank for insert requests; the id will be generated automatically. + /// The id for billing purposes, provided for reference. Leave this field blank for insert requests; the id will be generated automatically. #[serde(alias="billingId")] pub billing_id: Option, - /// Requests containing any of these mobile carrier ids will match. Values are from mobile-carriers.csv in the downloadable files section. + /// Requests containing any of these mobile carrier ids will match. Values are from mobile-carriers.csv in the downloadable files section. #[serde(alias="mobileCarriers")] pub mobile_carriers: Option>, - /// Requests containing any of these placements will not match. + /// Requests containing any of these placements will not match. #[serde(alias="excludedPlacements")] pub excluded_placements: Option>, - /// Requests containing any of these placements will match. + /// Requests containing any of these placements will match. pub placements: Option>, } @@ -971,7 +980,7 @@ impl ResponseResult for PretargetingConfig {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountBidderLocation { - /// The URL to which the Ad Exchange will send bid requests. + /// The URL to which the Ad Exchange will send bid requests. pub url: String, /// The geographical region the Ad Exchange should send requests from. Only used by some quota systems, but always setting the value is recommended. Allowed values: /// - ASIA @@ -979,7 +988,7 @@ pub struct AccountBidderLocation { /// - US_EAST /// - US_WEST pub region: String, - /// The maximum queries per second the Ad Exchange will send. + /// The maximum queries per second the Ad Exchange will send. #[serde(alias="maximumQps")] pub maximum_qps: i32, } @@ -1027,13 +1036,17 @@ pub struct BillingInfoMethods<'a, C, NC, A> hub: &'a AdExchangeBuyer, } -impl<'a, C, NC, A> ResourceMethodsBuilder for BillingInfoMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for BillingInfoMethods<'a, C, NC, A> {} impl<'a, C, NC, A> BillingInfoMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the billing information for one account specified by account ID. + /// Returns the billing information for one account specified by account ID. + /// + /// # Arguments + /// + /// * `accountId` - The account id. pub fn get(&self, account_id: i32) -> BillingInfoGetCall<'a, C, NC, A> { BillingInfoGetCall { hub: self.hub, @@ -1046,7 +1059,7 @@ impl<'a, C, NC, A> BillingInfoMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of billing information for all accounts of the authenticated user. + /// Retrieves a list of billing information for all accounts of the authenticated user. pub fn list(&self) -> BillingInfoListCall<'a, C, NC, A> { BillingInfoListCall { hub: self.hub, @@ -1093,13 +1106,13 @@ pub struct DirectDealMethods<'a, C, NC, A> hub: &'a AdExchangeBuyer, } -impl<'a, C, NC, A> ResourceMethodsBuilder for DirectDealMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for DirectDealMethods<'a, C, NC, A> {} impl<'a, C, NC, A> DirectDealMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the authenticated user's list of direct deals. + /// Retrieves the authenticated user's list of direct deals. pub fn list(&self) -> DirectDealListCall<'a, C, NC, A> { DirectDealListCall { hub: self.hub, @@ -1111,7 +1124,11 @@ impl<'a, C, NC, A> DirectDealMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one direct deal by ID. + /// Gets one direct deal by ID. + /// + /// # Arguments + /// + /// * `id` - The direct deal id pub fn get(&self, id: &str) -> DirectDealGetCall<'a, C, NC, A> { DirectDealGetCall { hub: self.hub, @@ -1159,13 +1176,19 @@ pub struct BudgetMethods<'a, C, NC, A> hub: &'a AdExchangeBuyer, } -impl<'a, C, NC, A> ResourceMethodsBuilder for BudgetMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for BudgetMethods<'a, C, NC, A> {} impl<'a, C, NC, A> BudgetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. This method supports patch semantics. + /// Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - The account id associated with the budget being updated. + /// * `billingId` - The billing id associated with the budget being updated. pub fn patch(&self, request: &Budget, account_id: &str, billing_id: &str) -> BudgetPatchCall<'a, C, NC, A> { BudgetPatchCall { hub: self.hub, @@ -1180,7 +1203,13 @@ impl<'a, C, NC, A> BudgetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. + /// Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - The account id associated with the budget being updated. + /// * `billingId` - The billing id associated with the budget being updated. pub fn update(&self, request: &Budget, account_id: &str, billing_id: &str) -> BudgetUpdateCall<'a, C, NC, A> { BudgetUpdateCall { hub: self.hub, @@ -1195,7 +1224,12 @@ impl<'a, C, NC, A> BudgetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the budget information for the adgroup specified by the accountId and billingId. + /// Returns the budget information for the adgroup specified by the accountId and billingId. + /// + /// # Arguments + /// + /// * `accountId` - The account id to get the budget information for. + /// * `billingId` - The billing id to get the budget information for. pub fn get(&self, account_id: &str, billing_id: &str) -> BudgetGetCall<'a, C, NC, A> { BudgetGetCall { hub: self.hub, @@ -1244,13 +1278,17 @@ pub struct CreativeMethods<'a, C, NC, A> hub: &'a AdExchangeBuyer, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CreativeMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CreativeMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CreativeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Submit a new creative. + /// Submit a new creative. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn insert(&self, request: &Creative) -> CreativeInsertCall<'a, C, NC, A> { CreativeInsertCall { hub: self.hub, @@ -1263,7 +1301,7 @@ impl<'a, C, NC, A> CreativeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission. + /// Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission. pub fn list(&self) -> CreativeListCall<'a, C, NC, A> { CreativeListCall { hub: self.hub, @@ -1280,7 +1318,12 @@ impl<'a, C, NC, A> CreativeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the status for a single creative. A creative will be available 30-40 minutes after submission. + /// Gets the status for a single creative. A creative will be available 30-40 minutes after submission. + /// + /// # Arguments + /// + /// * `accountId` - The id for the account that will serve this creative. + /// * `buyerCreativeId` - The buyer-specific id for this creative. pub fn get(&self, account_id: i32, buyer_creative_id: &str) -> CreativeGetCall<'a, C, NC, A> { CreativeGetCall { hub: self.hub, @@ -1329,13 +1372,18 @@ pub struct AccountMethods<'a, C, NC, A> hub: &'a AdExchangeBuyer, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AccountMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AccountMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing account. + /// Updates an existing account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `id` - The account id pub fn update(&self, request: &Account, id: i32) -> AccountUpdateCall<'a, C, NC, A> { AccountUpdateCall { hub: self.hub, @@ -1349,7 +1397,12 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing account. This method supports patch semantics. + /// Updates an existing account. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `id` - The account id pub fn patch(&self, request: &Account, id: i32) -> AccountPatchCall<'a, C, NC, A> { AccountPatchCall { hub: self.hub, @@ -1363,7 +1416,7 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the authenticated user's list of accounts. + /// Retrieves the authenticated user's list of accounts. pub fn list(&self) -> AccountListCall<'a, C, NC, A> { AccountListCall { hub: self.hub, @@ -1375,7 +1428,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one account by ID. + /// Gets one account by ID. + /// + /// # Arguments + /// + /// * `id` - The account id pub fn get(&self, id: i32) -> AccountGetCall<'a, C, NC, A> { AccountGetCall { hub: self.hub, @@ -1423,13 +1480,19 @@ pub struct PerformanceReportMethods<'a, C, NC, A> hub: &'a AdExchangeBuyer, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PerformanceReportMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PerformanceReportMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PerformanceReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the authenticated user's list of performance metrics. + /// Retrieves the authenticated user's list of performance metrics. + /// + /// # Arguments + /// + /// * `accountId` - The account id to get the reports. + /// * `endDateTime` - The end time of the report in ISO 8601 timestamp format using UTC. + /// * `startDateTime` - The start time of the report in ISO 8601 timestamp format using UTC. pub fn list(&self, account_id: &str, end_date_time: &str, start_date_time: &str) -> PerformanceReportListCall<'a, C, NC, A> { PerformanceReportListCall { hub: self.hub, @@ -1481,13 +1544,18 @@ pub struct PretargetingConfigMethods<'a, C, NC, A> hub: &'a AdExchangeBuyer, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PretargetingConfigMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PretargetingConfigMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PretargetingConfigMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an existing pretargeting config. + /// Deletes an existing pretargeting config. + /// + /// # Arguments + /// + /// * `accountId` - The account id to delete the pretargeting config for. + /// * `configId` - The specific id of the configuration to delete. pub fn delete(&self, account_id: &str, config_id: &str) -> PretargetingConfigDeleteCall<'a, C, NC, A> { PretargetingConfigDeleteCall { hub: self.hub, @@ -1501,7 +1569,13 @@ impl<'a, C, NC, A> PretargetingConfigMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing pretargeting config. This method supports patch semantics. + /// Updates an existing pretargeting config. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - The account id to update the pretargeting config for. + /// * `configId` - The specific id of the configuration to update. pub fn patch(&self, request: &PretargetingConfig, account_id: &str, config_id: &str) -> PretargetingConfigPatchCall<'a, C, NC, A> { PretargetingConfigPatchCall { hub: self.hub, @@ -1516,7 +1590,12 @@ impl<'a, C, NC, A> PretargetingConfigMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets a specific pretargeting configuration + /// Gets a specific pretargeting configuration + /// + /// # Arguments + /// + /// * `accountId` - The account id to get the pretargeting config for. + /// * `configId` - The specific id of the configuration to retrieve. pub fn get(&self, account_id: &str, config_id: &str) -> PretargetingConfigGetCall<'a, C, NC, A> { PretargetingConfigGetCall { hub: self.hub, @@ -1530,7 +1609,12 @@ impl<'a, C, NC, A> PretargetingConfigMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new pretargeting configuration. + /// Inserts a new pretargeting configuration. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - The account id to insert the pretargeting config for. pub fn insert(&self, request: &PretargetingConfig, account_id: &str) -> PretargetingConfigInsertCall<'a, C, NC, A> { PretargetingConfigInsertCall { hub: self.hub, @@ -1544,7 +1628,11 @@ impl<'a, C, NC, A> PretargetingConfigMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of the authenticated user's pretargeting configurations. + /// Retrieves a list of the authenticated user's pretargeting configurations. + /// + /// # Arguments + /// + /// * `accountId` - The account id to get the pretargeting configs for. pub fn list(&self, account_id: &str) -> PretargetingConfigListCall<'a, C, NC, A> { PretargetingConfigListCall { hub: self.hub, @@ -1557,7 +1645,13 @@ impl<'a, C, NC, A> PretargetingConfigMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing pretargeting config. + /// Updates an existing pretargeting config. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - The account id to update the pretargeting config for. + /// * `configId` - The specific id of the configuration to update. pub fn update(&self, request: &PretargetingConfig, account_id: &str, config_id: &str) -> PretargetingConfigUpdateCall<'a, C, NC, A> { PretargetingConfigUpdateCall { hub: self.hub, @@ -1582,7 +1676,7 @@ impl<'a, C, NC, A> PretargetingConfigMethods<'a, C, NC, A> { /// Returns the billing information for one account specified by account ID. /// /// A builder for the *get* method supported by a *billingInfo* resource. -/// It is not used directly, but through a `BillingInfoMethods`. +/// It is not used directly, but through a `BillingInfoMethods` instance. /// /// # Example /// @@ -1640,7 +1734,7 @@ impl<'a, C, NC, A> BillingInfoGetCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1693,7 +1787,7 @@ impl<'a, C, NC, A> BillingInfoGetCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1705,7 +1799,6 @@ impl<'a, C, NC, A> BillingInfoGetCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -1715,7 +1808,7 @@ impl<'a, C, NC, A> BillingInfoGetCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1726,7 +1819,7 @@ impl<'a, C, NC, A> BillingInfoGetCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1735,13 +1828,13 @@ impl<'a, C, NC, A> BillingInfoGetCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1753,7 +1846,7 @@ impl<'a, C, NC, A> BillingInfoGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The account id. + /// The account id. pub fn account_id(mut self, new_value: i32) -> BillingInfoGetCall<'a, C, NC, A> { self._account_id = new_value; self @@ -1814,7 +1907,7 @@ impl<'a, C, NC, A> BillingInfoGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieves a list of billing information for all accounts of the authenticated user. /// /// A builder for the *list* method supported by a *billingInfo* resource. -/// It is not used directly, but through a `BillingInfoMethods`. +/// It is not used directly, but through a `BillingInfoMethods` instance. /// /// # Example /// @@ -1870,7 +1963,7 @@ impl<'a, C, NC, A> BillingInfoListCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1899,7 +1992,7 @@ impl<'a, C, NC, A> BillingInfoListCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1911,7 +2004,6 @@ impl<'a, C, NC, A> BillingInfoListCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -1921,7 +2013,7 @@ impl<'a, C, NC, A> BillingInfoListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1932,7 +2024,7 @@ impl<'a, C, NC, A> BillingInfoListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1941,13 +2033,13 @@ impl<'a, C, NC, A> BillingInfoListCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2010,7 +2102,7 @@ impl<'a, C, NC, A> BillingInfoListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Retrieves the authenticated user's list of direct deals. /// /// A builder for the *list* method supported by a *directDeal* resource. -/// It is not used directly, but through a `DirectDealMethods`. +/// It is not used directly, but through a `DirectDealMethods` instance. /// /// # Example /// @@ -2066,7 +2158,7 @@ impl<'a, C, NC, A> DirectDealListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2095,7 +2187,7 @@ impl<'a, C, NC, A> DirectDealListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2107,7 +2199,6 @@ impl<'a, C, NC, A> DirectDealListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -2117,7 +2208,7 @@ impl<'a, C, NC, A> DirectDealListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2128,7 +2219,7 @@ impl<'a, C, NC, A> DirectDealListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2137,13 +2228,13 @@ impl<'a, C, NC, A> DirectDealListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2206,7 +2297,7 @@ impl<'a, C, NC, A> DirectDealListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Gets one direct deal by ID. /// /// A builder for the *get* method supported by a *directDeal* resource. -/// It is not used directly, but through a `DirectDealMethods`. +/// It is not used directly, but through a `DirectDealMethods` instance. /// /// # Example /// @@ -2264,7 +2355,7 @@ impl<'a, C, NC, A> DirectDealGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2317,7 +2408,7 @@ impl<'a, C, NC, A> DirectDealGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2329,7 +2420,6 @@ impl<'a, C, NC, A> DirectDealGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -2339,7 +2429,7 @@ impl<'a, C, NC, A> DirectDealGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2350,7 +2440,7 @@ impl<'a, C, NC, A> DirectDealGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2359,13 +2449,13 @@ impl<'a, C, NC, A> DirectDealGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2377,7 +2467,7 @@ impl<'a, C, NC, A> DirectDealGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The direct deal id + /// The direct deal id pub fn id(mut self, new_value: &str) -> DirectDealGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -2438,7 +2528,7 @@ impl<'a, C, NC, A> DirectDealGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *budget* resource. -/// It is not used directly, but through a `BudgetMethods`. +/// It is not used directly, but through a `BudgetMethods` instance. /// /// # Example /// @@ -2505,7 +2595,7 @@ impl<'a, C, NC, A> BudgetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "accountId", "billingId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2562,7 +2652,7 @@ impl<'a, C, NC, A> BudgetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2578,7 +2668,6 @@ impl<'a, C, NC, A> BudgetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -2588,7 +2677,7 @@ impl<'a, C, NC, A> BudgetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2599,7 +2688,7 @@ impl<'a, C, NC, A> BudgetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2608,13 +2697,13 @@ impl<'a, C, NC, A> BudgetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2635,7 +2724,7 @@ impl<'a, C, NC, A> BudgetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The account id associated with the budget being updated. + /// The account id associated with the budget being updated. pub fn account_id(mut self, new_value: &str) -> BudgetPatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -2645,7 +2734,7 @@ impl<'a, C, NC, A> BudgetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The billing id associated with the budget being updated. + /// The billing id associated with the budget being updated. pub fn billing_id(mut self, new_value: &str) -> BudgetPatchCall<'a, C, NC, A> { self._billing_id = new_value.to_string(); self @@ -2706,7 +2795,7 @@ impl<'a, C, NC, A> BudgetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. /// /// A builder for the *update* method supported by a *budget* resource. -/// It is not used directly, but through a `BudgetMethods`. +/// It is not used directly, but through a `BudgetMethods` instance. /// /// # Example /// @@ -2773,7 +2862,7 @@ impl<'a, C, NC, A> BudgetUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "accountId", "billingId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2830,7 +2919,7 @@ impl<'a, C, NC, A> BudgetUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2846,7 +2935,6 @@ impl<'a, C, NC, A> BudgetUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -2856,7 +2944,7 @@ impl<'a, C, NC, A> BudgetUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2867,7 +2955,7 @@ impl<'a, C, NC, A> BudgetUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2876,13 +2964,13 @@ impl<'a, C, NC, A> BudgetUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2903,7 +2991,7 @@ impl<'a, C, NC, A> BudgetUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The account id associated with the budget being updated. + /// The account id associated with the budget being updated. pub fn account_id(mut self, new_value: &str) -> BudgetUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -2913,7 +3001,7 @@ impl<'a, C, NC, A> BudgetUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The billing id associated with the budget being updated. + /// The billing id associated with the budget being updated. pub fn billing_id(mut self, new_value: &str) -> BudgetUpdateCall<'a, C, NC, A> { self._billing_id = new_value.to_string(); self @@ -2974,7 +3062,7 @@ impl<'a, C, NC, A> BudgetUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Returns the budget information for the adgroup specified by the accountId and billingId. /// /// A builder for the *get* method supported by a *budget* resource. -/// It is not used directly, but through a `BudgetMethods`. +/// It is not used directly, but through a `BudgetMethods` instance. /// /// # Example /// @@ -3034,7 +3122,7 @@ impl<'a, C, NC, A> BudgetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "accountId", "billingId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3087,7 +3175,7 @@ impl<'a, C, NC, A> BudgetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3099,7 +3187,6 @@ impl<'a, C, NC, A> BudgetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -3109,7 +3196,7 @@ impl<'a, C, NC, A> BudgetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3120,7 +3207,7 @@ impl<'a, C, NC, A> BudgetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3129,13 +3216,13 @@ impl<'a, C, NC, A> BudgetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3147,7 +3234,7 @@ impl<'a, C, NC, A> BudgetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The account id to get the budget information for. + /// The account id to get the budget information for. pub fn account_id(mut self, new_value: &str) -> BudgetGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -3157,7 +3244,7 @@ impl<'a, C, NC, A> BudgetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The billing id to get the budget information for. + /// The billing id to get the budget information for. pub fn billing_id(mut self, new_value: &str) -> BudgetGetCall<'a, C, NC, A> { self._billing_id = new_value.to_string(); self @@ -3218,7 +3305,7 @@ impl<'a, C, NC, A> BudgetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Submit a new creative. /// /// A builder for the *insert* method supported by a *creative* resource. -/// It is not used directly, but through a `CreativeMethods`. +/// It is not used directly, but through a `CreativeMethods` instance. /// /// # Example /// @@ -3281,7 +3368,7 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3314,7 +3401,7 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3330,7 +3417,6 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -3340,7 +3426,7 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3351,7 +3437,7 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3360,13 +3446,13 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3438,7 +3524,7 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission. /// /// A builder for the *list* method supported by a *creative* resource. -/// It is not used directly, but through a `CreativeMethods`. +/// It is not used directly, but through a `CreativeMethods` instance. /// /// # Example /// @@ -3527,7 +3613,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "statusFilter", "pageToken", "maxResults", "buyerCreativeId", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3556,7 +3642,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3568,7 +3654,6 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -3578,7 +3663,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3589,7 +3674,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3598,13 +3683,13 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3614,7 +3699,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *status filter* query property to the given value. /// /// - /// When specified, only creatives having the given status are returned. + /// When specified, only creatives having the given status are returned. pub fn status_filter(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._status_filter = Some(new_value.to_string()); self @@ -3622,7 +3707,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional. + /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional. pub fn page_token(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -3630,7 +3715,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of entries returned on one result page. If not set, the default is 100. Optional. + /// Maximum number of entries returned on one result page. If not set, the default is 100. Optional. pub fn max_results(mut self, new_value: u32) -> CreativeListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -3639,7 +3724,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// When specified, only creatives for the given buyer creative ids are returned. + /// When specified, only creatives for the given buyer creative ids are returned. pub fn add_buyer_creative_id(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._buyer_creative_id.push(new_value.to_string()); self @@ -3648,7 +3733,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// When specified, only creatives for the given account ids are returned. + /// When specified, only creatives for the given account ids are returned. pub fn add_account_id(mut self, new_value: i32) -> CreativeListCall<'a, C, NC, A> { self._account_id.push(new_value); self @@ -3709,7 +3794,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Gets the status for a single creative. A creative will be available 30-40 minutes after submission. /// /// A builder for the *get* method supported by a *creative* resource. -/// It is not used directly, but through a `CreativeMethods`. +/// It is not used directly, but through a `CreativeMethods` instance. /// /// # Example /// @@ -3769,7 +3854,7 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "accountId", "buyerCreativeId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3822,7 +3907,7 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3834,7 +3919,6 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -3844,7 +3928,7 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3855,7 +3939,7 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3864,13 +3948,13 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3882,7 +3966,7 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The id for the account that will serve this creative. + /// The id for the account that will serve this creative. pub fn account_id(mut self, new_value: i32) -> CreativeGetCall<'a, C, NC, A> { self._account_id = new_value; self @@ -3892,7 +3976,7 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The buyer-specific id for this creative. + /// The buyer-specific id for this creative. pub fn buyer_creative_id(mut self, new_value: &str) -> CreativeGetCall<'a, C, NC, A> { self._buyer_creative_id = new_value.to_string(); self @@ -3953,7 +4037,7 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Updates an existing account. /// /// A builder for the *update* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -4018,7 +4102,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4075,7 +4159,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4091,7 +4175,6 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -4101,7 +4184,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4112,7 +4195,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4121,13 +4204,13 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4148,7 +4231,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The account id + /// The account id pub fn id(mut self, new_value: i32) -> AccountUpdateCall<'a, C, NC, A> { self._id = new_value; self @@ -4209,7 +4292,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Updates an existing account. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -4274,7 +4357,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4331,7 +4414,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4347,7 +4430,6 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -4357,7 +4439,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4368,7 +4450,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4377,13 +4459,13 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4404,7 +4486,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The account id + /// The account id pub fn id(mut self, new_value: i32) -> AccountPatchCall<'a, C, NC, A> { self._id = new_value; self @@ -4465,7 +4547,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Retrieves the authenticated user's list of accounts. /// /// A builder for the *list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -4521,7 +4603,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4550,7 +4632,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4562,7 +4644,6 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -4572,7 +4653,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4583,7 +4664,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4592,13 +4673,13 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4661,7 +4742,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Gets one account by ID. /// /// A builder for the *get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -4719,7 +4800,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4772,7 +4853,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4784,7 +4865,6 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -4794,7 +4874,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4805,7 +4885,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4814,13 +4894,13 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4832,7 +4912,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The account id + /// The account id pub fn id(mut self, new_value: i32) -> AccountGetCall<'a, C, NC, A> { self._id = new_value; self @@ -4893,7 +4973,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Retrieves the authenticated user's list of performance metrics. /// /// A builder for the *list* method supported by a *performanceReport* resource. -/// It is not used directly, but through a `PerformanceReportMethods`. +/// It is not used directly, but through a `PerformanceReportMethods` instance. /// /// # Example /// @@ -4965,7 +5045,7 @@ impl<'a, C, NC, A> PerformanceReportListCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "accountId", "endDateTime", "startDateTime", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4994,7 +5074,7 @@ impl<'a, C, NC, A> PerformanceReportListCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5006,7 +5086,6 @@ impl<'a, C, NC, A> PerformanceReportListCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -5016,7 +5095,7 @@ impl<'a, C, NC, A> PerformanceReportListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5027,7 +5106,7 @@ impl<'a, C, NC, A> PerformanceReportListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5036,13 +5115,13 @@ impl<'a, C, NC, A> PerformanceReportListCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5054,7 +5133,7 @@ impl<'a, C, NC, A> PerformanceReportListCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The account id to get the reports. + /// The account id to get the reports. pub fn account_id(mut self, new_value: &str) -> PerformanceReportListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -5064,7 +5143,7 @@ impl<'a, C, NC, A> PerformanceReportListCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The end time of the report in ISO 8601 timestamp format using UTC. + /// The end time of the report in ISO 8601 timestamp format using UTC. pub fn end_date_time(mut self, new_value: &str) -> PerformanceReportListCall<'a, C, NC, A> { self._end_date_time = new_value.to_string(); self @@ -5074,7 +5153,7 @@ impl<'a, C, NC, A> PerformanceReportListCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The start time of the report in ISO 8601 timestamp format using UTC. + /// The start time of the report in ISO 8601 timestamp format using UTC. pub fn start_date_time(mut self, new_value: &str) -> PerformanceReportListCall<'a, C, NC, A> { self._start_date_time = new_value.to_string(); self @@ -5082,7 +5161,7 @@ impl<'a, C, NC, A> PerformanceReportListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through performance reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional. + /// A continuation token, used to page through performance reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional. pub fn page_token(mut self, new_value: &str) -> PerformanceReportListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -5090,7 +5169,7 @@ impl<'a, C, NC, A> PerformanceReportListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of entries returned on one result page. If not set, the default is 100. Optional. + /// Maximum number of entries returned on one result page. If not set, the default is 100. Optional. pub fn max_results(mut self, new_value: u32) -> PerformanceReportListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -5151,7 +5230,7 @@ impl<'a, C, NC, A> PerformanceReportListCall<'a, C, NC, A> where NC: hyper::net: /// Deletes an existing pretargeting config. /// /// A builder for the *delete* method supported by a *pretargetingConfig* resource. -/// It is not used directly, but through a `PretargetingConfigMethods`. +/// It is not used directly, but through a `PretargetingConfigMethods` instance. /// /// # Example /// @@ -5211,7 +5290,7 @@ impl<'a, C, NC, A> PretargetingConfigDeleteCall<'a, C, NC, A> where NC: hyper::n for &field in ["accountId", "configId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5263,7 +5342,7 @@ impl<'a, C, NC, A> PretargetingConfigDeleteCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5275,7 +5354,6 @@ impl<'a, C, NC, A> PretargetingConfigDeleteCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -5285,7 +5363,7 @@ impl<'a, C, NC, A> PretargetingConfigDeleteCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5296,12 +5374,12 @@ impl<'a, C, NC, A> PretargetingConfigDeleteCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5313,7 +5391,7 @@ impl<'a, C, NC, A> PretargetingConfigDeleteCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The account id to delete the pretargeting config for. + /// The account id to delete the pretargeting config for. pub fn account_id(mut self, new_value: &str) -> PretargetingConfigDeleteCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -5323,7 +5401,7 @@ impl<'a, C, NC, A> PretargetingConfigDeleteCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The specific id of the configuration to delete. + /// The specific id of the configuration to delete. pub fn config_id(mut self, new_value: &str) -> PretargetingConfigDeleteCall<'a, C, NC, A> { self._config_id = new_value.to_string(); self @@ -5384,7 +5462,7 @@ impl<'a, C, NC, A> PretargetingConfigDeleteCall<'a, C, NC, A> where NC: hyper::n /// Updates an existing pretargeting config. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *pretargetingConfig* resource. -/// It is not used directly, but through a `PretargetingConfigMethods`. +/// It is not used directly, but through a `PretargetingConfigMethods` instance. /// /// # Example /// @@ -5451,7 +5529,7 @@ impl<'a, C, NC, A> PretargetingConfigPatchCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "accountId", "configId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5508,7 +5586,7 @@ impl<'a, C, NC, A> PretargetingConfigPatchCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5524,7 +5602,6 @@ impl<'a, C, NC, A> PretargetingConfigPatchCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -5534,7 +5611,7 @@ impl<'a, C, NC, A> PretargetingConfigPatchCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5545,7 +5622,7 @@ impl<'a, C, NC, A> PretargetingConfigPatchCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5554,13 +5631,13 @@ impl<'a, C, NC, A> PretargetingConfigPatchCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5581,7 +5658,7 @@ impl<'a, C, NC, A> PretargetingConfigPatchCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The account id to update the pretargeting config for. + /// The account id to update the pretargeting config for. pub fn account_id(mut self, new_value: &str) -> PretargetingConfigPatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -5591,7 +5668,7 @@ impl<'a, C, NC, A> PretargetingConfigPatchCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The specific id of the configuration to update. + /// The specific id of the configuration to update. pub fn config_id(mut self, new_value: &str) -> PretargetingConfigPatchCall<'a, C, NC, A> { self._config_id = new_value.to_string(); self @@ -5652,7 +5729,7 @@ impl<'a, C, NC, A> PretargetingConfigPatchCall<'a, C, NC, A> where NC: hyper::ne /// Gets a specific pretargeting configuration /// /// A builder for the *get* method supported by a *pretargetingConfig* resource. -/// It is not used directly, but through a `PretargetingConfigMethods`. +/// It is not used directly, but through a `PretargetingConfigMethods` instance. /// /// # Example /// @@ -5712,7 +5789,7 @@ impl<'a, C, NC, A> PretargetingConfigGetCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "accountId", "configId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5765,7 +5842,7 @@ impl<'a, C, NC, A> PretargetingConfigGetCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5777,7 +5854,6 @@ impl<'a, C, NC, A> PretargetingConfigGetCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -5787,7 +5863,7 @@ impl<'a, C, NC, A> PretargetingConfigGetCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5798,7 +5874,7 @@ impl<'a, C, NC, A> PretargetingConfigGetCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5807,13 +5883,13 @@ impl<'a, C, NC, A> PretargetingConfigGetCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5825,7 +5901,7 @@ impl<'a, C, NC, A> PretargetingConfigGetCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The account id to get the pretargeting config for. + /// The account id to get the pretargeting config for. pub fn account_id(mut self, new_value: &str) -> PretargetingConfigGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -5835,7 +5911,7 @@ impl<'a, C, NC, A> PretargetingConfigGetCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The specific id of the configuration to retrieve. + /// The specific id of the configuration to retrieve. pub fn config_id(mut self, new_value: &str) -> PretargetingConfigGetCall<'a, C, NC, A> { self._config_id = new_value.to_string(); self @@ -5896,7 +5972,7 @@ impl<'a, C, NC, A> PretargetingConfigGetCall<'a, C, NC, A> where NC: hyper::net: /// Inserts a new pretargeting configuration. /// /// A builder for the *insert* method supported by a *pretargetingConfig* resource. -/// It is not used directly, but through a `PretargetingConfigMethods`. +/// It is not used directly, but through a `PretargetingConfigMethods` instance. /// /// # Example /// @@ -5961,7 +6037,7 @@ impl<'a, C, NC, A> PretargetingConfigInsertCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6018,7 +6094,7 @@ impl<'a, C, NC, A> PretargetingConfigInsertCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6034,7 +6110,6 @@ impl<'a, C, NC, A> PretargetingConfigInsertCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -6044,7 +6119,7 @@ impl<'a, C, NC, A> PretargetingConfigInsertCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6055,7 +6130,7 @@ impl<'a, C, NC, A> PretargetingConfigInsertCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6064,13 +6139,13 @@ impl<'a, C, NC, A> PretargetingConfigInsertCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6091,7 +6166,7 @@ impl<'a, C, NC, A> PretargetingConfigInsertCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The account id to insert the pretargeting config for. + /// The account id to insert the pretargeting config for. pub fn account_id(mut self, new_value: &str) -> PretargetingConfigInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -6152,7 +6227,7 @@ impl<'a, C, NC, A> PretargetingConfigInsertCall<'a, C, NC, A> where NC: hyper::n /// Retrieves a list of the authenticated user's pretargeting configurations. /// /// A builder for the *list* method supported by a *pretargetingConfig* resource. -/// It is not used directly, but through a `PretargetingConfigMethods`. +/// It is not used directly, but through a `PretargetingConfigMethods` instance. /// /// # Example /// @@ -6210,7 +6285,7 @@ impl<'a, C, NC, A> PretargetingConfigListCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6263,7 +6338,7 @@ impl<'a, C, NC, A> PretargetingConfigListCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6275,7 +6350,6 @@ impl<'a, C, NC, A> PretargetingConfigListCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -6285,7 +6359,7 @@ impl<'a, C, NC, A> PretargetingConfigListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6296,7 +6370,7 @@ impl<'a, C, NC, A> PretargetingConfigListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6305,13 +6379,13 @@ impl<'a, C, NC, A> PretargetingConfigListCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6323,7 +6397,7 @@ impl<'a, C, NC, A> PretargetingConfigListCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The account id to get the pretargeting configs for. + /// The account id to get the pretargeting configs for. pub fn account_id(mut self, new_value: &str) -> PretargetingConfigListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -6384,7 +6458,7 @@ impl<'a, C, NC, A> PretargetingConfigListCall<'a, C, NC, A> where NC: hyper::net /// Updates an existing pretargeting config. /// /// A builder for the *update* method supported by a *pretargetingConfig* resource. -/// It is not used directly, but through a `PretargetingConfigMethods`. +/// It is not used directly, but through a `PretargetingConfigMethods` instance. /// /// # Example /// @@ -6451,7 +6525,7 @@ impl<'a, C, NC, A> PretargetingConfigUpdateCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "accountId", "configId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6508,7 +6582,7 @@ impl<'a, C, NC, A> PretargetingConfigUpdateCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6524,7 +6598,6 @@ impl<'a, C, NC, A> PretargetingConfigUpdateCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -6534,7 +6607,7 @@ impl<'a, C, NC, A> PretargetingConfigUpdateCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6545,7 +6618,7 @@ impl<'a, C, NC, A> PretargetingConfigUpdateCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6554,13 +6627,13 @@ impl<'a, C, NC, A> PretargetingConfigUpdateCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6581,7 +6654,7 @@ impl<'a, C, NC, A> PretargetingConfigUpdateCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The account id to update the pretargeting config for. + /// The account id to update the pretargeting config for. pub fn account_id(mut self, new_value: &str) -> PretargetingConfigUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -6591,7 +6664,7 @@ impl<'a, C, NC, A> PretargetingConfigUpdateCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The specific id of the configuration to update. + /// The specific id of the configuration to update. pub fn config_id(mut self, new_value: &str) -> PretargetingConfigUpdateCall<'a, C, NC, A> { self._config_id = new_value.to_string(); self diff --git a/gen/adexchangeseller2/Cargo.toml b/gen/adexchangeseller2/Cargo.toml index 6ee19747f9..aea0a72c3b 100644 --- a/gen/adexchangeseller2/Cargo.toml +++ b/gen/adexchangeseller2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-adexchangeseller2" -version = "0.1.1+20150313" +version = "0.1.2+20150309" authors = ["Sebastian Thiel "] description = "A complete library to interact with Ad Exchange Seller (protocol v2.0)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adexchangeseller2" @@ -16,7 +16,7 @@ keywords = ["adexchangeseller", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/adexchangeseller2/README.md b/gen/adexchangeseller2/README.md index 145109d34e..c5a7dce4a1 100644 --- a/gen/adexchangeseller2/README.md +++ b/gen/adexchangeseller2/README.md @@ -1,11 +1,11 @@ The `google-adexchangeseller2` library allows access to all features of the *Google Ad Exchange Seller* service. -This documentation was generated from *Ad Exchange Seller* crate version *0.1.1+20150313*, where *20150313* is the exact revision of the *adexchangeseller:v2.0* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *Ad Exchange Seller* crate version *0.1.2+20150309*, where *20150309* is the exact revision of the *adexchangeseller:v2.0* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *Ad Exchange Seller* *v2* API can be found at the [official documentation site](https://developers.google.com/ad-exchange/seller-rest/). @@ -29,6 +29,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-adexchangeseller2/struct.AdExchangeSeller.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-adexchangeseller2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-adexchangeseller2/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-adexchangeseller2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -38,6 +40,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-adexchangeseller2/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -85,7 +89,7 @@ google-adexchangeseller2 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-adexchangeseller2" as adexchangeseller2; -use adexchangeseller2::Result; +use adexchangeseller2::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use adexchangeseller2::AdExchangeSeller; @@ -116,15 +120,17 @@ let result = hub.accounts().reports_generate("accountId", "startDate", "endDate" .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -137,7 +143,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-adexchangeseller2/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-adexchangeseller2/trait.ResponseResult.html), it will return that by default. @@ -160,8 +166,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-adexchangesell ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-adexchangeseller2/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-adexchangeseller2/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-adexchangeseller2/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-adexchangeseller2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-adexchangeseller2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/adexchangeseller2/src/cmn.rs b/gen/adexchangeseller2/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/adexchangeseller2/src/cmn.rs +++ b/gen/adexchangeseller2/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/adexchangeseller2/src/lib.rs b/gen/adexchangeseller2/src/lib.rs index 488be304c4..6b70bcbd1b 100644 --- a/gen/adexchangeseller2/src/lib.rs +++ b/gen/adexchangeseller2/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Ad Exchange Seller* crate version *0.1.1+20150313*, where *20150313* is the exact revision of the *adexchangeseller:v2.0* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *Ad Exchange Seller* crate version *0.1.2+20150309*, where *20150309* is the exact revision of the *adexchangeseller:v2.0* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *Ad Exchange Seller* *v2* API can be found at the //! [official documentation site](https://developers.google.com/ad-exchange/seller-rest/). @@ -29,6 +29,8 @@ //! //! * **[Hub](struct.AdExchangeSeller.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -38,6 +40,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -85,7 +89,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-adexchangeseller2" as adexchangeseller2; -//! use adexchangeseller2::Result; +//! use adexchangeseller2::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -117,15 +121,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -138,7 +144,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -161,8 +167,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -211,7 +218,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -261,7 +268,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-adexchangeseller2" as adexchangeseller2; -/// use adexchangeseller2::Result; +/// use adexchangeseller2::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -293,15 +300,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -322,7 +331,7 @@ impl<'a, C, NC, A> AdExchangeSeller AdExchangeSeller { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -332,7 +341,7 @@ impl<'a, C, NC, A> AdExchangeSeller } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -357,14 +366,14 @@ impl<'a, C, NC, A> AdExchangeSeller /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UrlChannels { - /// Continuation token used to page through URL channels. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through URL channels. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The URL channels returned in this list response. + /// The URL channels returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adexchangeseller#urlChannels. + /// Kind of list this is, in this case adexchangeseller#urlChannels. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -395,11 +404,11 @@ impl ResponseResult for UrlChannels {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Account { - /// Kind of resource this is, in this case adexchangeseller#account. + /// Kind of resource this is, in this case adexchangeseller#account. pub kind: String, - /// Unique identifier of this account. + /// Unique identifier of this account. pub id: String, - /// Name of this account. + /// Name of this account. pub name: String, } @@ -418,14 +427,14 @@ impl ResponseResult for Account {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomChannels { - /// Continuation token used to page through custom channels. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through custom channels. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The custom channels returned in this list response. + /// The custom channels returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adexchangeseller#customChannels. + /// Kind of list this is, in this case adexchangeseller#customChannels. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -443,9 +452,9 @@ impl ResponseResult for CustomChannels {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Alerts { - /// The alerts returned in this list response. + /// The alerts returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adexchangeseller#alerts. + /// Kind of list this is, in this case adexchangeseller#alerts. pub kind: String, } @@ -458,11 +467,11 @@ impl ResponseResult for Alerts {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SavedReport { - /// Kind of resource this is, in this case adexchangeseller#savedReport. + /// Kind of resource this is, in this case adexchangeseller#savedReport. pub kind: String, - /// Unique identifier of this saved report. + /// Unique identifier of this saved report. pub id: String, - /// This saved report's name. + /// This saved report's name. pub name: String, } @@ -475,17 +484,17 @@ impl Part for SavedReport {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdClient { - /// This ad client's product code, which corresponds to the PRODUCT_CODE report dimension. + /// This ad client's product code, which corresponds to the PRODUCT_CODE report dimension. #[serde(alias="productCode")] pub product_code: String, - /// Kind of resource this is, in this case adexchangeseller#adClient. + /// Kind of resource this is, in this case adexchangeseller#adClient. pub kind: String, - /// Unique identifier of this ad client. + /// Unique identifier of this ad client. pub id: String, - /// Whether this ad client is opted in to ARC. + /// Whether this ad client is opted in to ARC. #[serde(alias="arcOptIn")] pub arc_opt_in: bool, - /// Whether this ad client supports being reported on. + /// Whether this ad client supports being reported on. #[serde(alias="supportsReporting")] pub supports_reporting: bool, } @@ -504,9 +513,9 @@ impl Part for AdClient {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PreferredDeals { - /// The preferred deals returned in this list response. + /// The preferred deals returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adexchangeseller#preferredDeals. + /// Kind of list this is, in this case adexchangeseller#preferredDeals. pub kind: String, } @@ -519,23 +528,23 @@ impl ResponseResult for PreferredDeals {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReportingMetadataEntry { - /// The names of the metrics which the dimension or metric this reporting metadata entry describes requires to also be present in order for the report to be valid. Omitting these will not cause an error or warning, but may result in data which cannot be correctly interpreted. + /// The names of the metrics which the dimension or metric this reporting metadata entry describes requires to also be present in order for the report to be valid. Omitting these will not cause an error or warning, but may result in data which cannot be correctly interpreted. #[serde(alias="requiredMetrics")] pub required_metrics: Vec, - /// Kind of resource this is, in this case adexchangeseller#reportingMetadataEntry. + /// Kind of resource this is, in this case adexchangeseller#reportingMetadataEntry. pub kind: String, - /// The names of the metrics the dimension or metric this reporting metadata entry describes is compatible with. + /// The names of the metrics the dimension or metric this reporting metadata entry describes is compatible with. #[serde(alias="compatibleMetrics")] pub compatible_metrics: Vec, - /// For metrics this is a list of dimension IDs which the metric is compatible with, for dimensions it is a list of compatibility groups the dimension belongs to. + /// For metrics this is a list of dimension IDs which the metric is compatible with, for dimensions it is a list of compatibility groups the dimension belongs to. #[serde(alias="compatibleDimensions")] pub compatible_dimensions: Vec, - /// Unique identifier of this reporting metadata entry, corresponding to the name of the appropriate dimension or metric. + /// Unique identifier of this reporting metadata entry, corresponding to the name of the appropriate dimension or metric. pub id: String, - /// The names of the dimensions which the dimension or metric this reporting metadata entry describes requires to also be present in order for the report to be valid. Omitting these will not cause an error or warning, but may result in data which cannot be correctly interpreted. + /// The names of the dimensions which the dimension or metric this reporting metadata entry describes requires to also be present in order for the report to be valid. Omitting these will not cause an error or warning, but may result in data which cannot be correctly interpreted. #[serde(alias="requiredDimensions")] pub required_dimensions: Vec, - /// The codes of the projects supported by the dimension or metric this reporting metadata entry describes. + /// The codes of the projects supported by the dimension or metric this reporting metadata entry describes. #[serde(alias="supportedProducts")] pub supported_products: Vec, } @@ -549,14 +558,14 @@ impl Part for ReportingMetadataEntry {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomChannelTargetingInfo { - /// The external description of the channel. + /// The external description of the channel. pub description: String, - /// The language of the sites ads will be displayed on. + /// The language of the sites ads will be displayed on. #[serde(alias="siteLanguage")] pub site_language: String, - /// The locations in which ads appear. (Only valid for content and mobile content ads). Acceptable values for content ads are: TOP_LEFT, TOP_CENTER, TOP_RIGHT, MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, MULTIPLE_LOCATIONS. Acceptable values for mobile content ads are: TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS. + /// The locations in which ads appear. (Only valid for content and mobile content ads). Acceptable values for content ads are: TOP_LEFT, TOP_CENTER, TOP_RIGHT, MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, MULTIPLE_LOCATIONS. Acceptable values for mobile content ads are: TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS. pub location: String, - /// The name used to describe this channel externally. + /// The name used to describe this channel externally. #[serde(alias="adsAppearOn")] pub ads_appear_on: String, } @@ -577,9 +586,9 @@ impl Part for CustomChannelTargetingInfo {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Metadata { - /// no description provided + /// no description provided pub items: Vec, - /// Kind of list this is, in this case adexchangeseller#metadata. + /// Kind of list this is, in this case adexchangeseller#metadata. pub kind: String, } @@ -592,11 +601,11 @@ impl ResponseResult for Metadata {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UrlChannel { - /// Kind of resource this is, in this case adexchangeseller#urlChannel. + /// Kind of resource this is, in this case adexchangeseller#urlChannel. pub kind: String, - /// Unique identifier of this URL channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. + /// Unique identifier of this URL channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. pub id: String, - /// URL Pattern of this URL channel. Does not include "http://" or "https://". Example: www.example.com/home + /// URL Pattern of this URL channel. Does not include "http://" or "https://". Example: www.example.com/home #[serde(alias="urlPattern")] pub url_pattern: String, } @@ -615,14 +624,14 @@ impl Part for UrlChannel {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdClients { - /// Continuation token used to page through ad clients. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through ad clients. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The ad clients returned in this list response. + /// The ad clients returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adexchangeseller#adClients. + /// Kind of list this is, in this case adexchangeseller#adClients. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -640,27 +649,27 @@ impl ResponseResult for AdClients {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PreferredDeal { - /// Kind of resource this is, in this case adexchangeseller#preferredDeal. + /// Kind of resource this is, in this case adexchangeseller#preferredDeal. pub kind: String, - /// The name of the buyer network this deal is for. + /// The name of the buyer network this deal is for. #[serde(alias="buyerNetworkName")] pub buyer_network_name: String, - /// The currency code that applies to the fixed_cpm value. If not set then assumed to be USD. + /// The currency code that applies to the fixed_cpm value. If not set then assumed to be USD. #[serde(alias="currencyCode")] pub currency_code: String, - /// The name of the advertiser this deal is for. + /// The name of the advertiser this deal is for. #[serde(alias="advertiserName")] pub advertiser_name: String, - /// The fixed price for this preferred deal. In cpm micros of currency according to currencyCode. If set, then this preferred deal is eligible for the fixed price tier of buying (highest priority, pay exactly the configured fixed price). + /// The fixed price for this preferred deal. In cpm micros of currency according to currencyCode. If set, then this preferred deal is eligible for the fixed price tier of buying (highest priority, pay exactly the configured fixed price). #[serde(alias="fixedCpm")] pub fixed_cpm: String, - /// Time when this deal becomes active in seconds since the epoch (GMT). If not set then this deal is active immediately upon creation. + /// Time when this deal becomes active in seconds since the epoch (GMT). If not set then this deal is active immediately upon creation. #[serde(alias="startTime")] pub start_time: String, - /// Time when this deal stops being active in seconds since the epoch (GMT). If not set then this deal is valid until manually disabled by the publisher. + /// Time when this deal stops being active in seconds since the epoch (GMT). If not set then this deal is valid until manually disabled by the publisher. #[serde(alias="endTime")] pub end_time: String, - /// Unique identifier of this preferred deal. + /// Unique identifier of this preferred deal. pub id: String, } @@ -678,14 +687,14 @@ impl ResponseResult for PreferredDeal {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SavedReports { - /// Continuation token used to page through saved reports. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through saved reports. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The saved reports returned in this list response. + /// The saved reports returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adexchangeseller#savedReports. + /// Kind of list this is, in this case adexchangeseller#savedReports. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -698,12 +707,12 @@ impl ResponseResult for SavedReports {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReportHeaders { - /// The currency of this column. Only present if the header type is METRIC_CURRENCY. + /// The currency of this column. Only present if the header type is METRIC_CURRENCY. pub currency: String, - /// The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or METRIC_CURRENCY. + /// The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or METRIC_CURRENCY. #[serde(alias="type")] pub type_: String, - /// The name of the header. + /// The name of the header. pub name: String, } @@ -717,16 +726,16 @@ impl Part for ReportHeaders {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Alert { - /// Unique identifier of this alert. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. + /// Unique identifier of this alert. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. pub id: String, - /// Kind of resource this is, in this case adexchangeseller#alert. + /// Kind of resource this is, in this case adexchangeseller#alert. pub kind: String, - /// Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3, ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY, GRAYLISTED_PUBLISHER, API_HOLD. + /// Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3, ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY, GRAYLISTED_PUBLISHER, API_HOLD. #[serde(alias="type")] pub type_: String, - /// The localized alert message. + /// The localized alert message. pub message: String, - /// Severity of this alert. Possible values: INFO, WARNING, SEVERE. + /// Severity of this alert. Possible values: INFO, WARNING, SEVERE. pub severity: String, } @@ -744,14 +753,14 @@ impl Part for Alert {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Accounts { - /// Continuation token used to page through accounts. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through accounts. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The accounts returned in this list response. + /// The accounts returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adexchangeseller#accounts. + /// Kind of list this is, in this case adexchangeseller#accounts. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -770,20 +779,20 @@ impl ResponseResult for Accounts {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Report { - /// The header information of the columns requested in the report. This is a list of headers; one for each dimension in the request, followed by one for each metric in the request. + /// The header information of the columns requested in the report. This is a list of headers; one for each dimension in the request, followed by one for each metric in the request. pub headers: Vec, - /// Kind this is, in this case adexchangeseller#report. + /// Kind this is, in this case adexchangeseller#report. pub kind: String, - /// The output rows of the report. Each row is a list of cells; one for each dimension in the request, followed by one for each metric in the request. The dimension cells contain strings, and the metric cells contain numbers. + /// The output rows of the report. Each row is a list of cells; one for each dimension in the request, followed by one for each metric in the request. The dimension cells contain strings, and the metric cells contain numbers. pub rows: Vec>, - /// The total number of rows matched by the report request. Fewer rows may be returned in the response due to being limited by the row count requested or the report row limit. + /// The total number of rows matched by the report request. Fewer rows may be returned in the response due to being limited by the row count requested or the report row limit. #[serde(alias="totalMatchedRows")] pub total_matched_rows: String, - /// Any warnings associated with generation of the report. + /// Any warnings associated with generation of the report. pub warnings: Vec, - /// The averages of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. + /// The averages of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. pub averages: Vec, - /// The totals of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. + /// The totals of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. pub totals: Vec, } @@ -801,16 +810,16 @@ impl ResponseResult for Report {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomChannel { - /// Kind of resource this is, in this case adexchangeseller#customChannel. + /// Kind of resource this is, in this case adexchangeseller#customChannel. pub kind: String, - /// Code of this custom channel, not necessarily unique across ad clients. + /// Code of this custom channel, not necessarily unique across ad clients. pub code: String, - /// The targeting information of this custom channel, if activated. + /// The targeting information of this custom channel, if activated. #[serde(alias="targetingInfo")] pub targeting_info: CustomChannelTargetingInfo, - /// Unique identifier of this custom channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. + /// Unique identifier of this custom channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. pub id: String, - /// Name of this custom channel. + /// Name of this custom channel. pub name: String, } @@ -856,13 +865,18 @@ pub struct AccountMethods<'a, C, NC, A> hub: &'a AdExchangeSeller, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AccountMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AccountMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Generate an Ad Exchange report based on the saved report ID sent in the query parameters. + /// Generate an Ad Exchange report based on the saved report ID sent in the query parameters. + /// + /// # Arguments + /// + /// * `accountId` - Account owning the saved report. + /// * `savedReportId` - The saved report to retrieve. pub fn reports_saved_generate(&self, account_id: &str, saved_report_id: &str) -> AccountReportSavedGenerateCall<'a, C, NC, A> { AccountReportSavedGenerateCall { hub: self.hub, @@ -879,7 +893,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List the metadata for the metrics available to this AdExchange account. + /// List the metadata for the metrics available to this AdExchange account. + /// + /// # Arguments + /// + /// * `accountId` - Account with visibility to the metrics. pub fn metadata_metrics_list(&self, account_id: &str) -> AccountMetadataMetricListCall<'a, C, NC, A> { AccountMetadataMetricListCall { hub: self.hub, @@ -892,7 +910,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Generate an Ad Exchange report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. + /// Generate an Ad Exchange report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. + /// + /// # Arguments + /// + /// * `accountId` - Account which owns the generated report. + /// * `startDate` - Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// * `endDate` - End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn reports_generate(&self, account_id: &str, start_date: &str, end_date: &str) -> AccountReportGenerateCall<'a, C, NC, A> { AccountReportGenerateCall { hub: self.hub, @@ -914,7 +938,12 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all URL channels in the specified ad client for this Ad Exchange account. + /// List all URL channels in the specified ad client for this Ad Exchange account. + /// + /// # Arguments + /// + /// * `accountId` - Account to which the ad client belongs. + /// * `adClientId` - Ad client for which to list URL channels. pub fn urlchannels_list(&self, account_id: &str, ad_client_id: &str) -> AccountUrlchannelListCall<'a, C, NC, A> { AccountUrlchannelListCall { hub: self.hub, @@ -930,7 +959,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all saved reports in this Ad Exchange account. + /// List all saved reports in this Ad Exchange account. + /// + /// # Arguments + /// + /// * `accountId` - Account owning the saved reports. pub fn reports_saved_list(&self, account_id: &str) -> AccountReportSavedListCall<'a, C, NC, A> { AccountReportSavedListCall { hub: self.hub, @@ -945,7 +978,12 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get information about the selected Ad Exchange Preferred Deal. + /// Get information about the selected Ad Exchange Preferred Deal. + /// + /// # Arguments + /// + /// * `accountId` - Account owning the deal. + /// * `dealId` - Preferred deal to get information about. pub fn preferreddeals_get(&self, account_id: &str, deal_id: &str) -> AccountPreferreddealGetCall<'a, C, NC, A> { AccountPreferreddealGetCall { hub: self.hub, @@ -959,7 +997,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all ad clients in this Ad Exchange account. + /// List all ad clients in this Ad Exchange account. + /// + /// # Arguments + /// + /// * `accountId` - Account to which the ad client belongs. pub fn adclients_list(&self, account_id: &str) -> AccountAdclientListCall<'a, C, NC, A> { AccountAdclientListCall { hub: self.hub, @@ -974,7 +1016,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List the metadata for the dimensions available to this AdExchange account. + /// List the metadata for the dimensions available to this AdExchange account. + /// + /// # Arguments + /// + /// * `accountId` - Account with visibility to the dimensions. pub fn metadata_dimensions_list(&self, account_id: &str) -> AccountMetadataDimensionListCall<'a, C, NC, A> { AccountMetadataDimensionListCall { hub: self.hub, @@ -987,7 +1033,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get the specified custom channel from the specified ad client. + /// Get the specified custom channel from the specified ad client. + /// + /// # Arguments + /// + /// * `accountId` - Account to which the ad client belongs. + /// * `adClientId` - Ad client which contains the custom channel. + /// * `customChannelId` - Custom channel to retrieve. pub fn customchannels_get(&self, account_id: &str, ad_client_id: &str, custom_channel_id: &str) -> AccountCustomchannelGetCall<'a, C, NC, A> { AccountCustomchannelGetCall { hub: self.hub, @@ -1002,7 +1054,12 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all custom channels in the specified ad client for this Ad Exchange account. + /// List all custom channels in the specified ad client for this Ad Exchange account. + /// + /// # Arguments + /// + /// * `accountId` - Account to which the ad client belongs. + /// * `adClientId` - Ad client for which to list custom channels. pub fn customchannels_list(&self, account_id: &str, ad_client_id: &str) -> AccountCustomchannelListCall<'a, C, NC, A> { AccountCustomchannelListCall { hub: self.hub, @@ -1018,7 +1075,7 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all accounts available to this Ad Exchange account. + /// List all accounts available to this Ad Exchange account. pub fn list(&self) -> AccountListCall<'a, C, NC, A> { AccountListCall { hub: self.hub, @@ -1032,7 +1089,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List the alerts for this Ad Exchange account. + /// List the alerts for this Ad Exchange account. + /// + /// # Arguments + /// + /// * `accountId` - Account owning the alerts. pub fn alerts_list(&self, account_id: &str) -> AccountAlertListCall<'a, C, NC, A> { AccountAlertListCall { hub: self.hub, @@ -1046,7 +1107,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List the preferred deals for this Ad Exchange account. + /// List the preferred deals for this Ad Exchange account. + /// + /// # Arguments + /// + /// * `accountId` - Account owning the deals. pub fn preferreddeals_list(&self, account_id: &str) -> AccountPreferreddealListCall<'a, C, NC, A> { AccountPreferreddealListCall { hub: self.hub, @@ -1059,7 +1124,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get information about the selected Ad Exchange account. + /// Get information about the selected Ad Exchange account. + /// + /// # Arguments + /// + /// * `accountId` - Account to get information about. Tip: 'myaccount' is a valid ID. pub fn get(&self, account_id: &str) -> AccountGetCall<'a, C, NC, A> { AccountGetCall { hub: self.hub, @@ -1082,7 +1151,7 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Generate an Ad Exchange report based on the saved report ID sent in the query parameters. /// /// A builder for the *reports.saved.generate* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -1157,7 +1226,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "accountId", "savedReportId", "startIndex", "maxResults", "locale"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1210,7 +1279,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1222,7 +1291,6 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -1232,7 +1300,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1243,7 +1311,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1252,13 +1320,13 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1270,7 +1338,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account owning the saved report. + /// Account owning the saved report. pub fn account_id(mut self, new_value: &str) -> AccountReportSavedGenerateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -1280,7 +1348,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The saved report to retrieve. + /// The saved report to retrieve. pub fn saved_report_id(mut self, new_value: &str) -> AccountReportSavedGenerateCall<'a, C, NC, A> { self._saved_report_id = new_value.to_string(); self @@ -1288,7 +1356,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: /// Sets the *start index* query property to the given value. /// /// - /// Index of the first row of report data to return. + /// Index of the first row of report data to return. pub fn start_index(mut self, new_value: i32) -> AccountReportSavedGenerateCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -1296,7 +1364,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of rows of report data to return. + /// The maximum number of rows of report data to return. pub fn max_results(mut self, new_value: i32) -> AccountReportSavedGenerateCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -1304,7 +1372,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: /// Sets the *locale* query property to the given value. /// /// - /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. pub fn locale(mut self, new_value: &str) -> AccountReportSavedGenerateCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -1365,7 +1433,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: /// List the metadata for the metrics available to this AdExchange account. /// /// A builder for the *metadata.metrics.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -1423,7 +1491,7 @@ impl<'a, C, NC, A> AccountMetadataMetricListCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1476,7 +1544,7 @@ impl<'a, C, NC, A> AccountMetadataMetricListCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1488,7 +1556,6 @@ impl<'a, C, NC, A> AccountMetadataMetricListCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -1498,7 +1565,7 @@ impl<'a, C, NC, A> AccountMetadataMetricListCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1509,7 +1576,7 @@ impl<'a, C, NC, A> AccountMetadataMetricListCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1518,13 +1585,13 @@ impl<'a, C, NC, A> AccountMetadataMetricListCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1536,7 +1603,7 @@ impl<'a, C, NC, A> AccountMetadataMetricListCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account with visibility to the metrics. + /// Account with visibility to the metrics. pub fn account_id(mut self, new_value: &str) -> AccountMetadataMetricListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -1602,7 +1669,7 @@ impl<'a, C, NC, A> AccountMetadataMetricListCall<'a, C, NC, A> where NC: hyper:: /// but not the `Report` structure that you would usually get. The latter will be a default value. /// /// A builder for the *reports.generate* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -1715,7 +1782,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: for &field in ["accountId", "startDate", "endDate", "startIndex", "sort", "metric", "maxResults", "locale", "filter", "dimension"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1784,7 +1851,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1796,7 +1863,6 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -1806,7 +1872,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1817,7 +1883,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = if enable_resource_parsing { let mut json_response = String::new(); @@ -1826,13 +1892,13 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } } else { (res, Default::default()) }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1844,7 +1910,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account which owns the generated report. + /// Account which owns the generated report. pub fn account_id(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -1854,7 +1920,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn start_date(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._start_date = new_value.to_string(); self @@ -1864,7 +1930,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn end_date(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._end_date = new_value.to_string(); self @@ -1872,7 +1938,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *start index* query property to the given value. /// /// - /// Index of the first row of report data to return. + /// Index of the first row of report data to return. pub fn start_index(mut self, new_value: u32) -> AccountReportGenerateCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -1881,7 +1947,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. + /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. pub fn add_sort(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._sort.push(new_value.to_string()); self @@ -1890,7 +1956,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Numeric columns to include in the report. + /// Numeric columns to include in the report. pub fn add_metric(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._metric.push(new_value.to_string()); self @@ -1898,7 +1964,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of rows of report data to return. + /// The maximum number of rows of report data to return. pub fn max_results(mut self, new_value: u32) -> AccountReportGenerateCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -1906,7 +1972,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *locale* query property to the given value. /// /// - /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. pub fn locale(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -1915,7 +1981,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Filters to be run on the report. + /// Filters to be run on the report. pub fn add_filter(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._filter.push(new_value.to_string()); self @@ -1924,7 +1990,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Dimensions to base the report on. + /// Dimensions to base the report on. pub fn add_dimension(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._dimension.push(new_value.to_string()); self @@ -1985,7 +2051,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// List all URL channels in the specified ad client for this Ad Exchange account. /// /// A builder for the *urlchannels.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -2055,7 +2121,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "accountId", "adClientId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2108,7 +2174,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2120,7 +2186,6 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -2130,7 +2195,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2141,7 +2206,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2150,13 +2215,13 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2168,7 +2233,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to which the ad client belongs. + /// Account to which the ad client belongs. pub fn account_id(mut self, new_value: &str) -> AccountUrlchannelListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -2178,7 +2243,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to list URL channels. + /// Ad client for which to list URL channels. pub fn ad_client_id(mut self, new_value: &str) -> AccountUrlchannelListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -2186,7 +2251,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountUrlchannelListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2194,7 +2259,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of URL channels to include in the response, used for paging. + /// The maximum number of URL channels to include in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> AccountUrlchannelListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2255,7 +2320,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: /// List all saved reports in this Ad Exchange account. /// /// A builder for the *reports.saved.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -2323,7 +2388,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "accountId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2376,7 +2441,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2388,7 +2453,6 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -2398,7 +2462,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2409,7 +2473,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2418,13 +2482,13 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2436,7 +2500,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account owning the saved reports. + /// Account owning the saved reports. pub fn account_id(mut self, new_value: &str) -> AccountReportSavedListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -2444,7 +2508,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountReportSavedListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2452,7 +2516,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of saved reports to include in the response, used for paging. + /// The maximum number of saved reports to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> AccountReportSavedListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2513,7 +2577,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net /// Get information about the selected Ad Exchange Preferred Deal. /// /// A builder for the *preferreddeals.get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -2573,7 +2637,7 @@ impl<'a, C, NC, A> AccountPreferreddealGetCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "accountId", "dealId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2626,7 +2690,7 @@ impl<'a, C, NC, A> AccountPreferreddealGetCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2638,7 +2702,6 @@ impl<'a, C, NC, A> AccountPreferreddealGetCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -2648,7 +2711,7 @@ impl<'a, C, NC, A> AccountPreferreddealGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2659,7 +2722,7 @@ impl<'a, C, NC, A> AccountPreferreddealGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2668,13 +2731,13 @@ impl<'a, C, NC, A> AccountPreferreddealGetCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2686,7 +2749,7 @@ impl<'a, C, NC, A> AccountPreferreddealGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account owning the deal. + /// Account owning the deal. pub fn account_id(mut self, new_value: &str) -> AccountPreferreddealGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -2696,7 +2759,7 @@ impl<'a, C, NC, A> AccountPreferreddealGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Preferred deal to get information about. + /// Preferred deal to get information about. pub fn deal_id(mut self, new_value: &str) -> AccountPreferreddealGetCall<'a, C, NC, A> { self._deal_id = new_value.to_string(); self @@ -2757,7 +2820,7 @@ impl<'a, C, NC, A> AccountPreferreddealGetCall<'a, C, NC, A> where NC: hyper::ne /// List all ad clients in this Ad Exchange account. /// /// A builder for the *adclients.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -2825,7 +2888,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "accountId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2878,7 +2941,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2890,7 +2953,6 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -2900,7 +2962,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2911,7 +2973,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2920,13 +2982,13 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2938,7 +3000,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to which the ad client belongs. + /// Account to which the ad client belongs. pub fn account_id(mut self, new_value: &str) -> AccountAdclientListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -2946,7 +3008,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountAdclientListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2954,7 +3016,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of ad clients to include in the response, used for paging. + /// The maximum number of ad clients to include in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> AccountAdclientListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -3015,7 +3077,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N /// List the metadata for the dimensions available to this AdExchange account. /// /// A builder for the *metadata.dimensions.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -3073,7 +3135,7 @@ impl<'a, C, NC, A> AccountMetadataDimensionListCall<'a, C, NC, A> where NC: hype for &field in ["alt", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3126,7 +3188,7 @@ impl<'a, C, NC, A> AccountMetadataDimensionListCall<'a, C, NC, A> where NC: hype } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3138,7 +3200,6 @@ impl<'a, C, NC, A> AccountMetadataDimensionListCall<'a, C, NC, A> where NC: hype dlg.pre_request(); req.send() - }; match req_result { @@ -3148,7 +3209,7 @@ impl<'a, C, NC, A> AccountMetadataDimensionListCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3159,7 +3220,7 @@ impl<'a, C, NC, A> AccountMetadataDimensionListCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3168,13 +3229,13 @@ impl<'a, C, NC, A> AccountMetadataDimensionListCall<'a, C, NC, A> where NC: hype Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3186,7 +3247,7 @@ impl<'a, C, NC, A> AccountMetadataDimensionListCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account with visibility to the dimensions. + /// Account with visibility to the dimensions. pub fn account_id(mut self, new_value: &str) -> AccountMetadataDimensionListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -3247,7 +3308,7 @@ impl<'a, C, NC, A> AccountMetadataDimensionListCall<'a, C, NC, A> where NC: hype /// Get the specified custom channel from the specified ad client. /// /// A builder for the *customchannels.get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -3309,7 +3370,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "accountId", "adClientId", "customChannelId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3362,7 +3423,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3374,7 +3435,6 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -3384,7 +3444,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3395,7 +3455,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3404,13 +3464,13 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3422,7 +3482,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to which the ad client belongs. + /// Account to which the ad client belongs. pub fn account_id(mut self, new_value: &str) -> AccountCustomchannelGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -3432,7 +3492,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client which contains the custom channel. + /// Ad client which contains the custom channel. pub fn ad_client_id(mut self, new_value: &str) -> AccountCustomchannelGetCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -3442,7 +3502,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom channel to retrieve. + /// Custom channel to retrieve. pub fn custom_channel_id(mut self, new_value: &str) -> AccountCustomchannelGetCall<'a, C, NC, A> { self._custom_channel_id = new_value.to_string(); self @@ -3503,7 +3563,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne /// List all custom channels in the specified ad client for this Ad Exchange account. /// /// A builder for the *customchannels.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -3573,7 +3633,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "accountId", "adClientId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3626,7 +3686,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3638,7 +3698,6 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -3648,7 +3707,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3659,7 +3718,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3668,13 +3727,13 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3686,7 +3745,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to which the ad client belongs. + /// Account to which the ad client belongs. pub fn account_id(mut self, new_value: &str) -> AccountCustomchannelListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -3696,7 +3755,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to list custom channels. + /// Ad client for which to list custom channels. pub fn ad_client_id(mut self, new_value: &str) -> AccountCustomchannelListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -3704,7 +3763,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountCustomchannelListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -3712,7 +3771,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of custom channels to include in the response, used for paging. + /// The maximum number of custom channels to include in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> AccountCustomchannelListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -3773,7 +3832,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n /// List all accounts available to this Ad Exchange account. /// /// A builder for the *list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -3839,7 +3898,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3868,7 +3927,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3880,7 +3939,6 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -3890,7 +3948,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3901,7 +3959,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3910,13 +3968,13 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3926,7 +3984,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through accounts. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through accounts. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -3934,7 +3992,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of accounts to include in the response, used for paging. + /// The maximum number of accounts to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> AccountListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -3995,7 +4053,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// List the alerts for this Ad Exchange account. /// /// A builder for the *alerts.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -4058,7 +4116,7 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "accountId", "locale"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4111,7 +4169,7 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4123,7 +4181,6 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -4133,7 +4190,7 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4144,7 +4201,7 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4153,13 +4210,13 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4171,7 +4228,7 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account owning the alerts. + /// Account owning the alerts. pub fn account_id(mut self, new_value: &str) -> AccountAlertListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -4179,7 +4236,7 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *locale* query property to the given value. /// /// - /// The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported. + /// The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported. pub fn locale(mut self, new_value: &str) -> AccountAlertListCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -4240,7 +4297,7 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw /// List the preferred deals for this Ad Exchange account. /// /// A builder for the *preferreddeals.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -4298,7 +4355,7 @@ impl<'a, C, NC, A> AccountPreferreddealListCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4351,7 +4408,7 @@ impl<'a, C, NC, A> AccountPreferreddealListCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4363,7 +4420,6 @@ impl<'a, C, NC, A> AccountPreferreddealListCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -4373,7 +4429,7 @@ impl<'a, C, NC, A> AccountPreferreddealListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4384,7 +4440,7 @@ impl<'a, C, NC, A> AccountPreferreddealListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4393,13 +4449,13 @@ impl<'a, C, NC, A> AccountPreferreddealListCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4411,7 +4467,7 @@ impl<'a, C, NC, A> AccountPreferreddealListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account owning the deals. + /// Account owning the deals. pub fn account_id(mut self, new_value: &str) -> AccountPreferreddealListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -4472,7 +4528,7 @@ impl<'a, C, NC, A> AccountPreferreddealListCall<'a, C, NC, A> where NC: hyper::n /// Get information about the selected Ad Exchange account. /// /// A builder for the *get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -4530,7 +4586,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4583,7 +4639,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4595,7 +4651,6 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -4605,7 +4660,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4616,7 +4671,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4625,13 +4680,13 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4643,7 +4698,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to get information about. Tip: 'myaccount' is a valid ID. + /// Account to get information about. Tip: 'myaccount' is a valid ID. pub fn account_id(mut self, new_value: &str) -> AccountGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self diff --git a/gen/admin1_directory/Cargo.toml b/gen/admin1_directory/Cargo.toml index f0fb2b357d..5681912b62 100644 --- a/gen/admin1_directory/Cargo.toml +++ b/gen/admin1_directory/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-admin1_directory" -version = "0.1.1+20150123" +version = "0.1.2+20150123" authors = ["Sebastian Thiel "] description = "A complete library to interact with directory (protocol directory_v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/admin1_directory" @@ -16,7 +16,7 @@ keywords = ["admin", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/admin1_directory/README.md b/gen/admin1_directory/README.md index 9664e60bd1..cfb467607c 100644 --- a/gen/admin1_directory/README.md +++ b/gen/admin1_directory/README.md @@ -1,11 +1,11 @@ The `google-admin1_directory` library allows access to all features of the *Google directory* service. -This documentation was generated from *directory* crate version *0.1.1+20150123*, where *20150123* is the exact revision of the *admin:directory_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *directory* crate version *0.1.2+20150123*, where *20150123* is the exact revision of the *admin:directory_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *directory* *v1_directory* API can be found at the [official documentation site](https://developers.google.com/admin-sdk/directory/). @@ -55,6 +55,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-admin1_directory/struct.Directory.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-admin1_directory/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-admin1_directory/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-admin1_directory/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -64,6 +66,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-admin1_directory/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -115,7 +119,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-admin1_directory" as admin1_directory; use admin1_directory::Channel; -use admin1_directory::Result; +use admin1_directory::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use admin1_directory::Directory; @@ -156,15 +160,17 @@ let result = hub.users().watch(&req) .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -177,7 +183,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-admin1_directory/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-admin1_directory/trait.ResponseResult.html), it will return that by default. @@ -200,8 +206,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-admin1_directo ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-admin1_directory/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-admin1_directory/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-admin1_directory/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-admin1_directory/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-admin1_directory/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/admin1_directory/src/cmn.rs b/gen/admin1_directory/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/admin1_directory/src/cmn.rs +++ b/gen/admin1_directory/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/admin1_directory/src/lib.rs b/gen/admin1_directory/src/lib.rs index 6dc4f6b45d..d70c39198a 100644 --- a/gen/admin1_directory/src/lib.rs +++ b/gen/admin1_directory/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *directory* crate version *0.1.1+20150123*, where *20150123* is the exact revision of the *admin:directory_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *directory* crate version *0.1.2+20150123*, where *20150123* is the exact revision of the *admin:directory_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *directory* *v1_directory* API can be found at the //! [official documentation site](https://developers.google.com/admin-sdk/directory/). @@ -55,6 +55,8 @@ //! //! * **[Hub](struct.Directory.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -64,6 +66,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -115,7 +119,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-admin1_directory" as admin1_directory; //! use admin1_directory::Channel; -//! use admin1_directory::Result; +//! use admin1_directory::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -157,15 +161,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -178,7 +184,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -201,8 +207,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -251,7 +258,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -370,7 +377,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-admin1_directory" as admin1_directory; /// use admin1_directory::Channel; -/// use admin1_directory::Result; +/// use admin1_directory::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -412,15 +419,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -441,7 +450,7 @@ impl<'a, C, NC, A> Directory Directory { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -484,7 +493,7 @@ impl<'a, C, NC, A> Directory } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -504,13 +513,13 @@ impl<'a, C, NC, A> Directory /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserName { - /// Full Name + /// Full Name #[serde(alias="fullName")] pub full_name: String, - /// First Name + /// First Name #[serde(alias="givenName")] pub given_name: String, - /// Last Name + /// Last Name #[serde(alias="familyName")] pub family_name: String, } @@ -537,28 +546,28 @@ impl Part for UserName {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Group { - /// List of non editable aliases (Read-only) + /// List of non editable aliases (Read-only) #[serde(alias="nonEditableAliases")] pub non_editable_aliases: Option>, - /// Kind of resource this is. + /// Kind of resource this is. pub kind: Option, - /// Description of the group + /// Description of the group pub description: Option, - /// Is the group created by admin (Read-only) * + /// Is the group created by admin (Read-only) * #[serde(alias="adminCreated")] pub admin_created: Option, - /// Group direct members count + /// Group direct members count #[serde(alias="directMembersCount")] pub direct_members_count: Option, - /// Email of Group + /// Email of Group pub email: Option, - /// ETag of the resource. + /// ETag of the resource. pub etag: Option, - /// List of aliases (Read-only) + /// List of aliases (Read-only) pub aliases: Option>, - /// Unique identifier of Group (Read-only) + /// Unique identifier of Group (Read-only) pub id: Option, - /// Group name + /// Group name pub name: Option, } @@ -582,25 +591,25 @@ impl ResponseResult for Group {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Notification { - /// Body of the notification (Read-only) + /// Body of the notification (Read-only) pub body: Option, - /// The type of the resource. + /// The type of the resource. pub kind: Option, - /// ETag of the resource. + /// ETag of the resource. pub etag: Option, - /// Time at which notification was sent (Read-only) + /// Time at which notification was sent (Read-only) #[serde(alias="sendTime")] pub send_time: Option, - /// no description provided + /// no description provided #[serde(alias="notificationId")] pub notification_id: Option, - /// Address from which the notification is received (Read-only) + /// Address from which the notification is received (Read-only) #[serde(alias="fromAddress")] pub from_address: Option, - /// Boolean indicating whether the notification is unread or not. + /// Boolean indicating whether the notification is unread or not. #[serde(alias="isUnread")] pub is_unread: Option, - /// Subject of the notification (Read-only) + /// Subject of the notification (Read-only) pub subject: Option, } @@ -615,28 +624,28 @@ impl ResponseResult for Notification {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SchemaFieldSpec { - /// Kind of resource this is. + /// Kind of resource this is. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// Read ACLs on the field specifying who can view values of this field. Valid values are "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF". + /// Read ACLs on the field specifying who can view values of this field. Valid values are "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF". #[serde(alias="readAccessType")] pub read_access_type: String, - /// Type of the field. + /// Type of the field. #[serde(alias="fieldType")] pub field_type: String, - /// Boolean specifying whether the field is indexed or not. + /// Boolean specifying whether the field is indexed or not. pub indexed: bool, - /// Name of the field. + /// Name of the field. #[serde(alias="fieldName")] pub field_name: String, - /// Indexing spec for a numeric field. By default, only exact match queries will be supported for numeric fields. Setting the numericIndexingSpec allows range queries to be supported. + /// Indexing spec for a numeric field. By default, only exact match queries will be supported for numeric fields. Setting the numericIndexingSpec allows range queries to be supported. #[serde(alias="numericIndexingSpec")] pub numeric_indexing_spec: SchemaFieldSpecNumericIndexingSpec, - /// Unique identifier of Field (Read-only) + /// Unique identifier of Field (Read-only) #[serde(alias="fieldId")] pub field_id: String, - /// Boolean specifying whether this is a multi-valued field or not. + /// Boolean specifying whether this is a multi-valued field or not. #[serde(alias="multiValued")] pub multi_valued: bool, } @@ -660,18 +669,18 @@ impl Part for SchemaFieldSpec {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Member { - /// Kind of resource this is. + /// Kind of resource this is. pub kind: Option, - /// ETag of the resource. + /// ETag of the resource. pub etag: Option, - /// Role of member + /// Role of member pub role: Option, - /// Type of member (Immutable) + /// Type of member (Immutable) #[serde(alias="type")] pub type_: Option, - /// Email of member (Read-only) + /// Email of member (Read-only) pub email: Option, - /// Unique identifier of customer member (Read-only) Unique identifier of group (Read-only) Unique identifier of member (Read-only) + /// Unique identifier of customer member (Read-only) Unique identifier of group (Read-only) Unique identifier of member (Read-only) pub id: Option, } @@ -691,11 +700,11 @@ impl ResponseResult for Member {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OrgUnits { - /// Kind of resource this is. + /// Kind of resource this is. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// List of user objects. + /// List of user objects. #[serde(alias="organizationUnits")] pub organization_units: Vec, } @@ -716,24 +725,24 @@ impl ResponseResult for OrgUnits {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Token { - /// A list of authorization scopes the application is granted. + /// A list of authorization scopes the application is granted. pub scopes: Vec, - /// The type of the API resource. This is always admin#directory#token. + /// The type of the API resource. This is always admin#directory#token. pub kind: String, - /// The Client ID of the application the token is issued to. + /// The Client ID of the application the token is issued to. #[serde(alias="clientId")] pub client_id: String, - /// Whether the token is issued to an installed application. The value is true if the application is installed to a desktop or mobile device. + /// Whether the token is issued to an installed application. The value is true if the application is installed to a desktop or mobile device. #[serde(alias="nativeApp")] pub native_app: bool, - /// The displayable name of the application the token is issued to. + /// The displayable name of the application the token is issued to. #[serde(alias="displayText")] pub display_text: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// Whether the application is registered with Google. The value is true if the application has an anonymous Client ID. + /// Whether the application is registered with Google. The value is true if the application has an anonymous Client ID. pub anonymous: bool, - /// The unique ID of the user that issued the token. + /// The unique ID of the user that issued the token. #[serde(alias="userKey")] pub user_key: String, } @@ -753,11 +762,11 @@ impl ResponseResult for Token {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Asps { - /// A list of ASP resources. + /// A list of ASP resources. pub items: Vec, - /// The type of the API resource. This is always admin#directory#aspList. + /// The type of the API resource. This is always admin#directory#aspList. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, } @@ -777,28 +786,28 @@ impl ResponseResult for Asps {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Channel { - /// A version-specific identifier for the watched resource. + /// A version-specific identifier for the watched resource. #[serde(alias="resourceUri")] pub resource_uri: Option, - /// Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". + /// Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". pub kind: Option, - /// An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. + /// An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. #[serde(alias="resourceId")] pub resource_id: Option, - /// A UUID or similar unique string that identifies this channel. + /// A UUID or similar unique string that identifies this channel. pub id: Option, - /// An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. + /// An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. pub token: Option, - /// Additional parameters controlling delivery channel behavior. Optional. + /// Additional parameters controlling delivery channel behavior. Optional. pub params: Option>, - /// Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. + /// Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. pub expiration: Option, - /// The address where notifications are delivered for this channel. + /// The address where notifications are delivered for this channel. pub address: Option, - /// The type of delivery mechanism used for this channel. + /// The type of delivery mechanism used for this channel. #[serde(alias="type")] pub type_: Option, - /// A Boolean value to indicate whether payload is wanted. Optional. + /// A Boolean value to indicate whether payload is wanted. Optional. pub payload: Option, } @@ -823,16 +832,16 @@ impl ResponseResult for Channel {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Schema { - /// Fields of Schema + /// Fields of Schema pub fields: Option>, - /// Kind of resource this is. + /// Kind of resource this is. pub kind: Option, - /// ETag of the resource. + /// ETag of the resource. pub etag: Option, - /// Unique identifier of Schema (Read-only) + /// Unique identifier of Schema (Read-only) #[serde(alias="schemaId")] pub schema_id: Option, - /// Schema name + /// Schema name #[serde(alias="schemaName")] pub schema_name: Option, } @@ -855,22 +864,22 @@ impl ResponseResult for Schema {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Asp { - /// The type of the API resource. This is always admin#directory#asp. + /// The type of the API resource. This is always admin#directory#asp. pub kind: String, - /// ETag of the ASP. + /// ETag of the ASP. pub etag: String, - /// The name of the application that the user, represented by their userId, entered when the ASP was created. + /// The name of the application that the user, represented by their userId, entered when the ASP was created. pub name: String, - /// The unique ID of the ASP. + /// The unique ID of the ASP. #[serde(alias="codeId")] pub code_id: i32, - /// The time when the ASP was last used. Expressed in Unix time format. + /// The time when the ASP was last used. Expressed in Unix time format. #[serde(alias="lastTimeUsed")] pub last_time_used: String, - /// The unique ID of the user who issued the ASP. + /// The unique ID of the user who issued the ASP. #[serde(alias="userKey")] pub user_key: String, - /// The time when the ASP was created. Expressed in Unix time format. + /// The time when the ASP was created. Expressed in Unix time format. #[serde(alias="creationTime")] pub creation_time: String, } @@ -890,11 +899,11 @@ impl ResponseResult for Asp {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Tokens { - /// A list of Token resources. + /// A list of Token resources. pub items: Vec, - /// The type of the API resource. This is always admin#directory#tokenList. + /// The type of the API resource. This is always admin#directory#tokenList. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, } @@ -912,16 +921,16 @@ impl ResponseResult for Tokens {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Notifications { - /// Token for fetching the next page of notifications. + /// Token for fetching the next page of notifications. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// List of notifications in this page. + /// List of notifications in this page. pub items: Vec, - /// The type of the resource. + /// The type of the resource. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// Number of unread notification for the domain. + /// Number of unread notification for the domain. #[serde(alias="unreadNotificationsCount")] pub unread_notifications_count: i32, } @@ -942,70 +951,70 @@ impl ResponseResult for Notifications {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChromeOsDevice { - /// List of recent device users, in descending order by last login time (Read-only) + /// List of recent device users, in descending order by last login time (Read-only) #[serde(alias="recentUsers")] pub recent_users: Option>, - /// Chromebook Mac Address on wifi network interface (Read-only) + /// Chromebook Mac Address on wifi network interface (Read-only) #[serde(alias="macAddress")] pub mac_address: Option, - /// Chromebook serial number (Read-only) + /// Chromebook serial number (Read-only) #[serde(alias="serialNumber")] pub serial_number: Option, - /// Date and time the device was last synchronized with the policy settings in the Google Apps administrator control panel (Read-only) + /// Date and time the device was last synchronized with the policy settings in the Google Apps administrator control panel (Read-only) #[serde(alias="lastSync")] pub last_sync: Option, - /// Chromebook order number (Read-only) + /// Chromebook order number (Read-only) #[serde(alias="orderNumber")] pub order_number: Option, - /// Mobile Equipment identifier for the 3G mobile card in the Chromebook (Read-only) + /// Mobile Equipment identifier for the 3G mobile card in the Chromebook (Read-only) pub meid: Option, - /// Address or location of the device as noted by the administrator + /// Address or location of the device as noted by the administrator #[serde(alias="annotatedLocation")] pub annotated_location: Option, - /// User of the device + /// User of the device #[serde(alias="annotatedUser")] pub annotated_user: Option, - /// Chromebook platform version (Read-only) + /// Chromebook platform version (Read-only) #[serde(alias="platformVersion")] pub platform_version: Option, - /// List of active time ranges (Read-only) + /// List of active time ranges (Read-only) #[serde(alias="activeTimeRanges")] pub active_time_ranges: Option>, - /// Unique identifier of Chrome OS Device (Read-only) + /// Unique identifier of Chrome OS Device (Read-only) #[serde(alias="deviceId")] pub device_id: Option, - /// Chromebook Mac Address on ethernet network interface (Read-only) + /// Chromebook Mac Address on ethernet network interface (Read-only) #[serde(alias="ethernetMacAddress")] pub ethernet_mac_address: Option, - /// Chromebook Os Version (Read-only) + /// Chromebook Os Version (Read-only) #[serde(alias="osVersion")] pub os_version: Option, - /// Chromebook firmware version (Read-only) + /// Chromebook firmware version (Read-only) #[serde(alias="firmwareVersion")] pub firmware_version: Option, - /// Date and time the device was last enrolled (Read-only) + /// Date and time the device was last enrolled (Read-only) #[serde(alias="lastEnrollmentTime")] pub last_enrollment_time: Option, - /// Kind of resource this is. + /// Kind of resource this is. pub kind: Option, - /// Notes added by the administrator + /// Notes added by the administrator pub notes: Option, - /// Will Chromebook auto renew after support end date (Read-only) + /// Will Chromebook auto renew after support end date (Read-only) #[serde(alias="willAutoRenew")] pub will_auto_renew: Option, - /// Chromebook boot mode (Read-only) + /// Chromebook boot mode (Read-only) #[serde(alias="bootMode")] pub boot_mode: Option, - /// ETag of the resource. + /// ETag of the resource. pub etag: Option, - /// status of the device (Read-only) + /// status of the device (Read-only) pub status: Option, - /// OrgUnit of the device + /// OrgUnit of the device #[serde(alias="orgUnitPath")] pub org_unit_path: Option, - /// Chromebook Model (Read-only) + /// Chromebook Model (Read-only) pub model: Option, - /// Final date the device will be supported (Read-only) + /// Final date the device will be supported (Read-only) #[serde(alias="supportEndDate")] pub support_end_date: Option, } @@ -1042,91 +1051,91 @@ impl ResponseResult for ChromeOsDevice {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct User { - /// no description provided + /// no description provided pub addresses: Option, - /// no description provided + /// no description provided pub phones: Option, - /// Boolean indicating if the user is delegated admin (Read-only) + /// Boolean indicating if the user is delegated admin (Read-only) #[serde(alias="isDelegatedAdmin")] pub is_delegated_admin: Option, - /// Indicates if user is suspended + /// Indicates if user is suspended pub suspended: Option, - /// Unique identifier of User (Read-only) + /// Unique identifier of User (Read-only) pub id: Option, - /// List of aliases (Read-only) + /// List of aliases (Read-only) pub aliases: Option>, - /// List of non editable aliases (Read-only) + /// List of non editable aliases (Read-only) #[serde(alias="nonEditableAliases")] pub non_editable_aliases: Option>, - /// Custom fields of the user. + /// Custom fields of the user. #[serde(alias="customSchemas")] pub custom_schemas: Option>, - /// no description provided + /// no description provided #[serde(alias="deletionTime")] pub deletion_time: Option, - /// Suspension reason if user is suspended (Read-only) + /// Suspension reason if user is suspended (Read-only) #[serde(alias="suspensionReason")] pub suspension_reason: Option, - /// Photo Url of the user (Read-only) + /// Photo Url of the user (Read-only) #[serde(alias="thumbnailPhotoUrl")] pub thumbnail_photo_url: Option, - /// Boolean indicating if the user is admin (Read-only) + /// Boolean indicating if the user is admin (Read-only) #[serde(alias="isAdmin")] pub is_admin: Option, - /// no description provided + /// no description provided pub relations: Option, - /// Boolean indicating if user is included in Global Address List + /// Boolean indicating if user is included in Global Address List #[serde(alias="includeInGlobalAddressList")] pub include_in_global_address_list: Option, - /// ETag of the resource. + /// ETag of the resource. pub etag: Option, - /// User's last login time. (Read-only) + /// User's last login time. (Read-only) #[serde(alias="lastLoginTime")] pub last_login_time: Option, - /// OrgUnit of User + /// OrgUnit of User #[serde(alias="orgUnitPath")] pub org_unit_path: Option, - /// Indicates if user has agreed to terms (Read-only) + /// Indicates if user has agreed to terms (Read-only) #[serde(alias="agreedToTerms")] pub agreed_to_terms: Option, - /// no description provided + /// no description provided #[serde(alias="externalIds")] pub external_ids: Option, - /// Boolean indicating if ip is whitelisted + /// Boolean indicating if ip is whitelisted #[serde(alias="ipWhitelisted")] pub ip_whitelisted: Option, - /// Kind of resource this is. + /// Kind of resource this is. pub kind: Option, - /// Is mailbox setup (Read-only) + /// Is mailbox setup (Read-only) #[serde(alias="isMailboxSetup")] pub is_mailbox_setup: Option, - /// User's password + /// User's password pub password: Option, - /// no description provided + /// no description provided pub emails: Option, - /// no description provided + /// no description provided pub organizations: Option, - /// username of User + /// username of User #[serde(alias="primaryEmail")] pub primary_email: Option, - /// Hash function name for password. Supported are MD5, SHA-1 and crypt + /// Hash function name for password. Supported are MD5, SHA-1 and crypt #[serde(alias="hashFunction")] pub hash_function: Option, - /// User's name + /// User's name pub name: Option, - /// no description provided + /// no description provided pub notes: Option, - /// User's Google account creation time. (Read-only) + /// User's Google account creation time. (Read-only) #[serde(alias="creationTime")] pub creation_time: Option, - /// no description provided + /// no description provided pub websites: Option, - /// Boolean indicating if the user should change password in next login + /// Boolean indicating if the user should change password in next login #[serde(alias="changePasswordAtNextLogin")] pub change_password_at_next_login: Option, - /// no description provided + /// no description provided pub ims: Option, - /// CustomerId of User (Read-only) + /// CustomerId of User (Read-only) #[serde(alias="customerId")] pub customer_id: Option, } @@ -1147,14 +1156,14 @@ impl ResponseResult for User {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Groups { - /// Token used to access next page of this result. + /// Token used to access next page of this result. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Kind of resource this is. + /// Kind of resource this is. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// List of group objects. + /// List of group objects. pub groups: Vec, } @@ -1167,10 +1176,10 @@ impl ResponseResult for Groups {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChromeOsDeviceRecentUsers { - /// The type of the user + /// The type of the user #[serde(alias="type")] pub type_: String, - /// Email address of the user. Present only if the user type is managed + /// Email address of the user. Present only if the user type is managed pub email: String, } @@ -1184,19 +1193,19 @@ impl Part for ChromeOsDeviceRecentUsers {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct MobileDeviceApplications { - /// Version code of application + /// Version code of application #[serde(alias="versionCode")] pub version_code: i32, - /// Package name of application + /// Package name of application #[serde(alias="packageName")] pub package_name: String, - /// Display name of application + /// Display name of application #[serde(alias="displayName")] pub display_name: String, - /// Version name of application + /// Version name of application #[serde(alias="versionName")] pub version_name: String, - /// List of Permissions for application + /// List of Permissions for application pub permission: Vec, } @@ -1225,14 +1234,14 @@ impl Part for UserCustomProperties {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Members { - /// Token used to access next page of this result. + /// Token used to access next page of this result. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Kind of resource this is. + /// Kind of resource this is. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// List of member objects. + /// List of member objects. pub members: Vec, } @@ -1250,7 +1259,7 @@ impl ResponseResult for Members {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct UserUndelete { - /// OrgUnit of User + /// OrgUnit of User #[serde(alias="orgUnitPath")] pub org_unit_path: Option, } @@ -1269,11 +1278,11 @@ impl RequestValue for UserUndelete {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VerificationCodes { - /// A list of verification code resources. + /// A list of verification code resources. pub items: Vec, - /// The type of the resource. This is always admin#directory#verificationCodesList. + /// The type of the resource. This is always admin#directory#verificationCodesList. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, } @@ -1292,16 +1301,16 @@ impl ResponseResult for VerificationCodes {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Alias { - /// A alias email + /// A alias email pub alias: Option, - /// Kind of resource this is. + /// Kind of resource this is. pub kind: Option, - /// ETag of the resource. + /// ETag of the resource. pub etag: Option, - /// Group's primary email (Read-only) User's primary email (Read-only) + /// Group's primary email (Read-only) User's primary email (Read-only) #[serde(alias="primaryEmail")] pub primary_email: Option, - /// Unique id of the group (Read-only) Unique id of the user (Read-only) + /// Unique id of the group (Read-only) Unique id of the user (Read-only) pub id: Option, } @@ -1320,14 +1329,14 @@ impl ResponseResult for Alias {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct MobileDevices { - /// Token used to access next page of this result. + /// Token used to access next page of this result. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Kind of resource this is. + /// Kind of resource this is. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// List of Mobile Device objects. + /// List of Mobile Device objects. pub mobiledevices: Vec, } @@ -1340,9 +1349,9 @@ impl ResponseResult for MobileDevices {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ChromeOsDeviceActiveTimeRanges { - /// Date of usage + /// Date of usage pub date: String, - /// Duration in milliseconds + /// Duration in milliseconds #[serde(alias="activeTime")] pub active_time: i32, } @@ -1364,24 +1373,24 @@ impl Part for ChromeOsDeviceActiveTimeRanges {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserPhoto { - /// Mime Type of the photo + /// Mime Type of the photo #[serde(alias="mimeType")] pub mime_type: Option, - /// Kind of resource this is. + /// Kind of resource this is. pub kind: Option, - /// Base64 encoded photo data + /// Base64 encoded photo data #[serde(alias="photoData")] pub photo_data: Option, - /// Height in pixels of the photo + /// Height in pixels of the photo pub height: Option, - /// Width in pixels of the photo + /// Width in pixels of the photo pub width: Option, - /// ETag of the resource. + /// ETag of the resource. pub etag: Option, - /// Primary email of User (Read-only) + /// Primary email of User (Read-only) #[serde(alias="primaryEmail")] pub primary_email: Option, - /// Unique identifier of User (Read-only) + /// Unique identifier of User (Read-only) pub id: Option, } @@ -1400,7 +1409,7 @@ impl ResponseResult for UserPhoto {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct MobileDeviceAction { - /// Action to be taken on the Mobile Device + /// Action to be taken on the Mobile Device pub action: Option, } @@ -1418,7 +1427,7 @@ impl RequestValue for MobileDeviceAction {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct UserMakeAdmin { - /// Boolean indicating new admin status of the user + /// Boolean indicating new admin status of the user pub status: Option, } @@ -1436,16 +1445,16 @@ impl RequestValue for UserMakeAdmin {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Users { - /// Token used to access next page of this result. + /// Token used to access next page of this result. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Kind of resource this is. + /// Kind of resource this is. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// Event that triggered this response (only used in case of Push Response) + /// Event that triggered this response (only used in case of Push Response) pub trigger_event: String, - /// List of user objects. + /// List of user objects. pub users: Vec, } @@ -1463,72 +1472,72 @@ impl ResponseResult for Users {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct MobileDevice { - /// Mobile Device Kernel version (Read-only) + /// Mobile Device Kernel version (Read-only) #[serde(alias="kernelVersion")] pub kernel_version: String, - /// Date and time the device was last synchronized with the policy settings in the Google Apps administrator control panel (Read-only) + /// Date and time the device was last synchronized with the policy settings in the Google Apps administrator control panel (Read-only) #[serde(alias="lastSync")] pub last_sync: String, - /// Mobile Device compromised status (Read-only) + /// Mobile Device compromised status (Read-only) #[serde(alias="deviceCompromisedStatus")] pub device_compromised_status: String, - /// Unique identifier of Mobile Device (Read-only) + /// Unique identifier of Mobile Device (Read-only) #[serde(alias="resourceId")] pub resource_id: String, - /// Mobile Device MEID number (Read-only) + /// Mobile Device MEID number (Read-only) pub meid: String, - /// The default locale used on the Mobile Device (Read-only) + /// The default locale used on the Mobile Device (Read-only) #[serde(alias="defaultLanguage")] pub default_language: String, - /// Mobile Device Build number (Read-only) + /// Mobile Device Build number (Read-only) #[serde(alias="buildNumber")] pub build_number: String, - /// List of applications installed on Mobile Device + /// List of applications installed on Mobile Device pub applications: Vec, - /// Mobile Device serial number (Read-only) + /// Mobile Device serial number (Read-only) #[serde(alias="deviceId")] pub device_id: String, - /// Mobile Device IMEI number (Read-only) + /// Mobile Device IMEI number (Read-only) pub imei: String, - /// Mobile Device user agent + /// Mobile Device user agent #[serde(alias="userAgent")] pub user_agent: String, - /// Mobile Device Baseband version (Read-only) + /// Mobile Device Baseband version (Read-only) #[serde(alias="basebandVersion")] pub baseband_version: String, - /// Kind of resource this is. + /// Kind of resource this is. pub kind: String, - /// List of owner user's names (Read-only) + /// List of owner user's names (Read-only) pub name: Vec, - /// Date and time the device was first synchronized with the policy settings in the Google Apps administrator control panel (Read-only) + /// Date and time the device was first synchronized with the policy settings in the Google Apps administrator control panel (Read-only) #[serde(alias="firstSync")] pub first_sync: String, - /// Name of the mobile operating system + /// Name of the mobile operating system pub os: String, - /// Mobile Device SSN or Serial Number (Read-only) + /// Mobile Device SSN or Serial Number (Read-only) #[serde(alias="serialNumber")] pub serial_number: String, - /// Mobile Device Hardware Id (Read-only) + /// Mobile Device Hardware Id (Read-only) #[serde(alias="hardwareId")] pub hardware_id: String, - /// Mobile Device mobile or network operator (if available) (Read-only) + /// Mobile Device mobile or network operator (if available) (Read-only) #[serde(alias="networkOperator")] pub network_operator: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// Status of the device (Read-only) + /// Status of the device (Read-only) pub status: String, - /// Boolean indicating if this account is on owner/primary profile or not (Read-only) + /// Boolean indicating if this account is on owner/primary profile or not (Read-only) #[serde(alias="managedAccountIsOnOwnerProfile")] pub managed_account_is_on_owner_profile: bool, - /// Name of the model of the device + /// Name of the model of the device pub model: String, - /// The type of device (Read-only) + /// The type of device (Read-only) #[serde(alias="type")] pub type_: String, - /// List of owner user's email addresses (Read-only) + /// List of owner user's email addresses (Read-only) pub email: Vec, - /// Mobile Device WiFi MAC address (Read-only) + /// Mobile Device WiFi MAC address (Read-only) #[serde(alias="wifiMacAddress")] pub wifi_mac_address: String, } @@ -1548,14 +1557,14 @@ impl ResponseResult for MobileDevice {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ChromeOsDevices { - /// Token used to access next page of this result. + /// Token used to access next page of this result. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// List of Chrome OS Device objects. + /// List of Chrome OS Device objects. pub chromeosdevices: Vec, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// Kind of resource this is. + /// Kind of resource this is. pub kind: String, } @@ -1576,22 +1585,22 @@ impl ResponseResult for ChromeOsDevices {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OrgUnit { - /// Kind of resource this is. + /// Kind of resource this is. pub kind: Option, - /// ETag of the resource. + /// ETag of the resource. pub etag: Option, - /// Path of parent OrgUnit + /// Path of parent OrgUnit #[serde(alias="parentOrgUnitPath")] pub parent_org_unit_path: Option, - /// Name of OrgUnit + /// Name of OrgUnit pub name: Option, - /// Should block inheritance + /// Should block inheritance #[serde(alias="blockInheritance")] pub block_inheritance: Option, - /// Path of OrgUnit + /// Path of OrgUnit #[serde(alias="orgUnitPath")] pub org_unit_path: Option, - /// Description of OrgUnit + /// Description of OrgUnit pub description: Option, } @@ -1613,14 +1622,14 @@ impl ResponseResult for OrgUnit {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VerificationCode { - /// The type of the resource. This is always admin#directory#verificationCode. + /// The type of the resource. This is always admin#directory#verificationCode. pub kind: Option, - /// ETag of the resource. + /// ETag of the resource. pub etag: Option, - /// The obfuscated unique ID of the user. + /// The obfuscated unique ID of the user. #[serde(alias="userId")] pub user_id: Option, - /// A current verification code for the user. Invalidated or used verification codes are not returned as part of the result. + /// A current verification code for the user. Invalidated or used verification codes are not returned as part of the result. #[serde(alias="verificationCode")] pub verification_code: Option, } @@ -1634,10 +1643,10 @@ impl Resource for VerificationCode {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SchemaFieldSpecNumericIndexingSpec { - /// Maximum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant. + /// Maximum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant. #[serde(alias="maxValue")] pub max_value: f64, - /// Minimum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant. + /// Minimum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant. #[serde(alias="minValue")] pub min_value: f64, } @@ -1657,11 +1666,11 @@ impl Part for SchemaFieldSpecNumericIndexingSpec {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Schemas { - /// Kind of resource this is. + /// Kind of resource this is. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// List of UserSchema objects. + /// List of UserSchema objects. pub schemas: Vec, } @@ -1680,11 +1689,11 @@ impl ResponseResult for Schemas {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Aliases { - /// Kind of resource this is. + /// Kind of resource this is. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// List of alias objects. + /// List of alias objects. pub aliases: Vec, } @@ -1730,13 +1739,18 @@ pub struct TokenMethods<'a, C, NC, A> hub: &'a Directory, } -impl<'a, C, NC, A> ResourceMethodsBuilder for TokenMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for TokenMethods<'a, C, NC, A> {} impl<'a, C, NC, A> TokenMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get information about an access token issued by a user. + /// Get information about an access token issued by a user. + /// + /// # Arguments + /// + /// * `userKey` - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// * `clientId` - The Client ID of the application the token is issued to. pub fn get(&self, user_key: &str, client_id: &str) -> TokenGetCall<'a, C, NC, A> { TokenGetCall { hub: self.hub, @@ -1750,7 +1764,11 @@ impl<'a, C, NC, A> TokenMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the set of tokens specified user has issued to 3rd party applications. + /// Returns the set of tokens specified user has issued to 3rd party applications. + /// + /// # Arguments + /// + /// * `userKey` - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn list(&self, user_key: &str) -> TokenListCall<'a, C, NC, A> { TokenListCall { hub: self.hub, @@ -1763,7 +1781,12 @@ impl<'a, C, NC, A> TokenMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete all access tokens issued by a user for an application. + /// Delete all access tokens issued by a user for an application. + /// + /// # Arguments + /// + /// * `userKey` - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// * `clientId` - The Client ID of the application the token is issued to. pub fn delete(&self, user_key: &str, client_id: &str) -> TokenDeleteCall<'a, C, NC, A> { TokenDeleteCall { hub: self.hub, @@ -1812,13 +1835,17 @@ pub struct ChannelMethods<'a, C, NC, A> hub: &'a Directory, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ChannelMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ChannelMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ChannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Stop watching resources through this channel + /// Stop watching resources through this channel + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn stop(&self, request: &Channel) -> ChannelStopCall<'a, C, NC, A> { ChannelStopCall { hub: self.hub, @@ -1866,13 +1893,18 @@ pub struct OrgunitMethods<'a, C, NC, A> hub: &'a Directory, } -impl<'a, C, NC, A> ResourceMethodsBuilder for OrgunitMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for OrgunitMethods<'a, C, NC, A> {} impl<'a, C, NC, A> OrgunitMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Add Organization Unit + /// Add Organization Unit + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `customerId` - Immutable id of the Google Apps account pub fn insert(&self, request: &OrgUnit, customer_id: &str) -> OrgunitInsertCall<'a, C, NC, A> { OrgunitInsertCall { hub: self.hub, @@ -1886,7 +1918,11 @@ impl<'a, C, NC, A> OrgunitMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve all Organization Units + /// Retrieve all Organization Units + /// + /// # Arguments + /// + /// * `customerId` - Immutable id of the Google Apps account pub fn list(&self, customer_id: &str) -> OrgunitListCall<'a, C, NC, A> { OrgunitListCall { hub: self.hub, @@ -1901,7 +1937,12 @@ impl<'a, C, NC, A> OrgunitMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve Organization Unit + /// Retrieve Organization Unit + /// + /// # Arguments + /// + /// * `customerId` - Immutable id of the Google Apps account + /// * `orgUnitPath` - Full path of the organization unit pub fn get(&self, customer_id: &str, org_unit_path: &Vec) -> OrgunitGetCall<'a, C, NC, A> { OrgunitGetCall { hub: self.hub, @@ -1915,7 +1956,13 @@ impl<'a, C, NC, A> OrgunitMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update Organization Unit + /// Update Organization Unit + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `customerId` - Immutable id of the Google Apps account + /// * `orgUnitPath` - Full path of the organization unit pub fn update(&self, request: &OrgUnit, customer_id: &str, org_unit_path: &Vec) -> OrgunitUpdateCall<'a, C, NC, A> { OrgunitUpdateCall { hub: self.hub, @@ -1930,7 +1977,12 @@ impl<'a, C, NC, A> OrgunitMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Remove Organization Unit + /// Remove Organization Unit + /// + /// # Arguments + /// + /// * `customerId` - Immutable id of the Google Apps account + /// * `orgUnitPath` - Full path of the organization unit pub fn delete(&self, customer_id: &str, org_unit_path: &Vec) -> OrgunitDeleteCall<'a, C, NC, A> { OrgunitDeleteCall { hub: self.hub, @@ -1944,7 +1996,13 @@ impl<'a, C, NC, A> OrgunitMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update Organization Unit. This method supports patch semantics. + /// Update Organization Unit. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `customerId` - Immutable id of the Google Apps account + /// * `orgUnitPath` - Full path of the organization unit pub fn patch(&self, request: &OrgUnit, customer_id: &str, org_unit_path: &Vec) -> OrgunitPatchCall<'a, C, NC, A> { OrgunitPatchCall { hub: self.hub, @@ -1994,13 +2052,17 @@ pub struct UserMethods<'a, C, NC, A> hub: &'a Directory, } -impl<'a, C, NC, A> ResourceMethodsBuilder for UserMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for UserMethods<'a, C, NC, A> {} impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// create user. + /// create user. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn insert(&self, request: &User) -> UserInsertCall<'a, C, NC, A> { UserInsertCall { hub: self.hub, @@ -2013,7 +2075,11 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Remove photos for the user + /// Remove photos for the user + /// + /// # Arguments + /// + /// * `userKey` - Email or immutable Id of the user pub fn photos_delete(&self, user_key: &str) -> UserPhotoDeleteCall<'a, C, NC, A> { UserPhotoDeleteCall { hub: self.hub, @@ -2026,7 +2092,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Undelete a deleted user + /// Undelete a deleted user + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userKey` - The immutable id of the user pub fn undelete(&self, request: &UserUndelete, user_key: &str) -> UserUndeleteCall<'a, C, NC, A> { UserUndeleteCall { hub: self.hub, @@ -2040,7 +2111,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// change admin status of a user + /// change admin status of a user + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userKey` - Email or immutable Id of the user as admin pub fn make_admin(&self, request: &UserMakeAdmin, user_key: &str) -> UserMakeAdminCall<'a, C, NC, A> { UserMakeAdminCall { hub: self.hub, @@ -2054,7 +2130,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// update user. This method supports patch semantics. + /// update user. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userKey` - Email or immutable Id of the user. If Id, it should match with id of user object pub fn patch(&self, request: &User, user_key: &str) -> UserPatchCall<'a, C, NC, A> { UserPatchCall { hub: self.hub, @@ -2068,7 +2149,11 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Watch for changes in users list + /// Watch for changes in users list + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn watch(&self, request: &Channel) -> UserWatchCall<'a, C, NC, A> { UserWatchCall { hub: self.hub, @@ -2093,7 +2178,11 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete user + /// Delete user + /// + /// # Arguments + /// + /// * `userKey` - Email or immutable Id of the user pub fn delete(&self, user_key: &str) -> UserDeleteCall<'a, C, NC, A> { UserDeleteCall { hub: self.hub, @@ -2106,7 +2195,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Add a photo for the user + /// Add a photo for the user + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userKey` - Email or immutable Id of the user pub fn photos_update(&self, request: &UserPhoto, user_key: &str) -> UserPhotoUpdateCall<'a, C, NC, A> { UserPhotoUpdateCall { hub: self.hub, @@ -2120,7 +2214,11 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// retrieve user + /// retrieve user + /// + /// # Arguments + /// + /// * `userKey` - Email or immutable Id of the user pub fn get(&self, user_key: &str) -> UserGetCall<'a, C, NC, A> { UserGetCall { hub: self.hub, @@ -2136,7 +2234,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Add a alias for the user + /// Add a alias for the user + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userKey` - Email or immutable Id of the user pub fn aliases_insert(&self, request: &Alias, user_key: &str) -> UserAliaseInsertCall<'a, C, NC, A> { UserAliaseInsertCall { hub: self.hub, @@ -2150,7 +2253,7 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve either deleted users or all users in a domain (paginated) + /// Retrieve either deleted users or all users in a domain (paginated) pub fn list(&self) -> UserListCall<'a, C, NC, A> { UserListCall { hub: self.hub, @@ -2174,7 +2277,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Remove a alias for the user + /// Remove a alias for the user + /// + /// # Arguments + /// + /// * `userKey` - Email or immutable Id of the user + /// * `alias` - The alias to be removed pub fn aliases_delete(&self, user_key: &str, alias: &str) -> UserAliaseDeleteCall<'a, C, NC, A> { UserAliaseDeleteCall { hub: self.hub, @@ -2188,7 +2296,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// update user + /// update user + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userKey` - Email or immutable Id of the user. If Id, it should match with id of user object pub fn update(&self, request: &User, user_key: &str) -> UserUpdateCall<'a, C, NC, A> { UserUpdateCall { hub: self.hub, @@ -2202,7 +2315,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Watch for changes in user aliases list + /// Watch for changes in user aliases list + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userKey` - Email or immutable Id of the user pub fn aliases_watch(&self, request: &Channel, user_key: &str) -> UserAliaseWatchCall<'a, C, NC, A> { UserAliaseWatchCall { hub: self.hub, @@ -2217,7 +2335,11 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all aliases for a user + /// List all aliases for a user + /// + /// # Arguments + /// + /// * `userKey` - Email or immutable Id of the user pub fn aliases_list(&self, user_key: &str) -> UserAliaseListCall<'a, C, NC, A> { UserAliaseListCall { hub: self.hub, @@ -2231,7 +2353,11 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve photo of a user + /// Retrieve photo of a user + /// + /// # Arguments + /// + /// * `userKey` - Email or immutable Id of the user pub fn photos_get(&self, user_key: &str) -> UserPhotoGetCall<'a, C, NC, A> { UserPhotoGetCall { hub: self.hub, @@ -2244,7 +2370,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Add a photo for the user. This method supports patch semantics. + /// Add a photo for the user. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userKey` - Email or immutable Id of the user pub fn photos_patch(&self, request: &UserPhoto, user_key: &str) -> UserPhotoPatchCall<'a, C, NC, A> { UserPhotoPatchCall { hub: self.hub, @@ -2293,13 +2424,18 @@ pub struct MobiledeviceMethods<'a, C, NC, A> hub: &'a Directory, } -impl<'a, C, NC, A> ResourceMethodsBuilder for MobiledeviceMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for MobiledeviceMethods<'a, C, NC, A> {} impl<'a, C, NC, A> MobiledeviceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete Mobile Device + /// Delete Mobile Device + /// + /// # Arguments + /// + /// * `customerId` - Immutable id of the Google Apps account + /// * `resourceId` - Immutable id of Mobile Device pub fn delete(&self, customer_id: &str, resource_id: &str) -> MobiledeviceDeleteCall<'a, C, NC, A> { MobiledeviceDeleteCall { hub: self.hub, @@ -2313,7 +2449,12 @@ impl<'a, C, NC, A> MobiledeviceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve Mobile Device + /// Retrieve Mobile Device + /// + /// # Arguments + /// + /// * `customerId` - Immutable id of the Google Apps account + /// * `resourceId` - Immutable id of Mobile Device pub fn get(&self, customer_id: &str, resource_id: &str) -> MobiledeviceGetCall<'a, C, NC, A> { MobiledeviceGetCall { hub: self.hub, @@ -2328,7 +2469,11 @@ impl<'a, C, NC, A> MobiledeviceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve all Mobile Devices of a customer (paginated) + /// Retrieve all Mobile Devices of a customer (paginated) + /// + /// # Arguments + /// + /// * `customerId` - Immutable id of the Google Apps account pub fn list(&self, customer_id: &str) -> MobiledeviceListCall<'a, C, NC, A> { MobiledeviceListCall { hub: self.hub, @@ -2347,7 +2492,13 @@ impl<'a, C, NC, A> MobiledeviceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Take action on Mobile Device + /// Take action on Mobile Device + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `customerId` - Immutable id of the Google Apps account + /// * `resourceId` - Immutable id of Mobile Device pub fn action(&self, request: &MobileDeviceAction, customer_id: &str, resource_id: &str) -> MobiledeviceActionCall<'a, C, NC, A> { MobiledeviceActionCall { hub: self.hub, @@ -2397,13 +2548,19 @@ pub struct MemberMethods<'a, C, NC, A> hub: &'a Directory, } -impl<'a, C, NC, A> ResourceMethodsBuilder for MemberMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for MemberMethods<'a, C, NC, A> {} impl<'a, C, NC, A> MemberMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update membership of a user in the specified group. + /// Update membership of a user in the specified group. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `groupKey` - Email or immutable Id of the group. If Id, it should match with id of group object + /// * `memberKey` - Email or immutable Id of the user. If Id, it should match with id of member object pub fn update(&self, request: &Member, group_key: &str, member_key: &str) -> MemberUpdateCall<'a, C, NC, A> { MemberUpdateCall { hub: self.hub, @@ -2418,7 +2575,12 @@ impl<'a, C, NC, A> MemberMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve Group Member + /// Retrieve Group Member + /// + /// # Arguments + /// + /// * `groupKey` - Email or immutable Id of the group + /// * `memberKey` - Email or immutable Id of the member pub fn get(&self, group_key: &str, member_key: &str) -> MemberGetCall<'a, C, NC, A> { MemberGetCall { hub: self.hub, @@ -2432,7 +2594,12 @@ impl<'a, C, NC, A> MemberMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Add user to the specified group. + /// Add user to the specified group. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `groupKey` - Email or immutable Id of the group pub fn insert(&self, request: &Member, group_key: &str) -> MemberInsertCall<'a, C, NC, A> { MemberInsertCall { hub: self.hub, @@ -2446,7 +2613,13 @@ impl<'a, C, NC, A> MemberMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update membership of a user in the specified group. This method supports patch semantics. + /// Update membership of a user in the specified group. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `groupKey` - Email or immutable Id of the group. If Id, it should match with id of group object + /// * `memberKey` - Email or immutable Id of the user. If Id, it should match with id of member object pub fn patch(&self, request: &Member, group_key: &str, member_key: &str) -> MemberPatchCall<'a, C, NC, A> { MemberPatchCall { hub: self.hub, @@ -2461,7 +2634,12 @@ impl<'a, C, NC, A> MemberMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Remove membership. + /// Remove membership. + /// + /// # Arguments + /// + /// * `groupKey` - Email or immutable Id of the group + /// * `memberKey` - Email or immutable Id of the member pub fn delete(&self, group_key: &str, member_key: &str) -> MemberDeleteCall<'a, C, NC, A> { MemberDeleteCall { hub: self.hub, @@ -2475,7 +2653,11 @@ impl<'a, C, NC, A> MemberMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve all members in a group (paginated) + /// Retrieve all members in a group (paginated) + /// + /// # Arguments + /// + /// * `groupKey` - Email or immutable Id of the group pub fn list(&self, group_key: &str) -> MemberListCall<'a, C, NC, A> { MemberListCall { hub: self.hub, @@ -2526,13 +2708,17 @@ pub struct NotificationMethods<'a, C, NC, A> hub: &'a Directory, } -impl<'a, C, NC, A> ResourceMethodsBuilder for NotificationMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for NotificationMethods<'a, C, NC, A> {} impl<'a, C, NC, A> NotificationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of notifications. + /// Retrieves a list of notifications. + /// + /// # Arguments + /// + /// * `customer` - The unique ID for the customer's Google account. pub fn list(&self, customer: &str) -> NotificationListCall<'a, C, NC, A> { NotificationListCall { hub: self.hub, @@ -2548,7 +2734,12 @@ impl<'a, C, NC, A> NotificationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a notification + /// Deletes a notification + /// + /// # Arguments + /// + /// * `customer` - The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource. + /// * `notificationId` - The unique ID of the notification. pub fn delete(&self, customer: &str, notification_id: &str) -> NotificationDeleteCall<'a, C, NC, A> { NotificationDeleteCall { hub: self.hub, @@ -2562,7 +2753,13 @@ impl<'a, C, NC, A> NotificationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a notification. This method supports patch semantics. + /// Updates a notification. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `customer` - The unique ID for the customer's Google account. + /// * `notificationId` - The unique ID of the notification. pub fn patch(&self, request: &Notification, customer: &str, notification_id: &str) -> NotificationPatchCall<'a, C, NC, A> { NotificationPatchCall { hub: self.hub, @@ -2577,7 +2774,13 @@ impl<'a, C, NC, A> NotificationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a notification. + /// Updates a notification. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `customer` - The unique ID for the customer's Google account. + /// * `notificationId` - The unique ID of the notification. pub fn update(&self, request: &Notification, customer: &str, notification_id: &str) -> NotificationUpdateCall<'a, C, NC, A> { NotificationUpdateCall { hub: self.hub, @@ -2592,7 +2795,12 @@ impl<'a, C, NC, A> NotificationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a notification. + /// Retrieves a notification. + /// + /// # Arguments + /// + /// * `customer` - The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource. + /// * `notificationId` - The unique ID of the notification. pub fn get(&self, customer: &str, notification_id: &str) -> NotificationGetCall<'a, C, NC, A> { NotificationGetCall { hub: self.hub, @@ -2641,13 +2849,17 @@ pub struct ChromeosdeviceMethods<'a, C, NC, A> hub: &'a Directory, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ChromeosdeviceMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ChromeosdeviceMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ChromeosdeviceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve all Chrome OS Devices of a customer (paginated) + /// Retrieve all Chrome OS Devices of a customer (paginated) + /// + /// # Arguments + /// + /// * `customerId` - Immutable id of the Google Apps account pub fn list(&self, customer_id: &str) -> ChromeosdeviceListCall<'a, C, NC, A> { ChromeosdeviceListCall { hub: self.hub, @@ -2666,7 +2878,13 @@ impl<'a, C, NC, A> ChromeosdeviceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update Chrome OS Device. This method supports patch semantics. + /// Update Chrome OS Device. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `customerId` - Immutable id of the Google Apps account + /// * `deviceId` - Immutable id of Chrome OS Device pub fn patch(&self, request: &ChromeOsDevice, customer_id: &str, device_id: &str) -> ChromeosdevicePatchCall<'a, C, NC, A> { ChromeosdevicePatchCall { hub: self.hub, @@ -2682,7 +2900,12 @@ impl<'a, C, NC, A> ChromeosdeviceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve Chrome OS Device + /// Retrieve Chrome OS Device + /// + /// # Arguments + /// + /// * `customerId` - Immutable id of the Google Apps account + /// * `deviceId` - Immutable id of Chrome OS Device pub fn get(&self, customer_id: &str, device_id: &str) -> ChromeosdeviceGetCall<'a, C, NC, A> { ChromeosdeviceGetCall { hub: self.hub, @@ -2697,7 +2920,13 @@ impl<'a, C, NC, A> ChromeosdeviceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update Chrome OS Device + /// Update Chrome OS Device + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `customerId` - Immutable id of the Google Apps account + /// * `deviceId` - Immutable id of Chrome OS Device pub fn update(&self, request: &ChromeOsDevice, customer_id: &str, device_id: &str) -> ChromeosdeviceUpdateCall<'a, C, NC, A> { ChromeosdeviceUpdateCall { hub: self.hub, @@ -2748,13 +2977,17 @@ pub struct VerificationCodeMethods<'a, C, NC, A> hub: &'a Directory, } -impl<'a, C, NC, A> ResourceMethodsBuilder for VerificationCodeMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for VerificationCodeMethods<'a, C, NC, A> {} impl<'a, C, NC, A> VerificationCodeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Generate new backup verification codes for the user. + /// Generate new backup verification codes for the user. + /// + /// # Arguments + /// + /// * `userKey` - Email or immutable Id of the user pub fn generate(&self, user_key: &str) -> VerificationCodeGenerateCall<'a, C, NC, A> { VerificationCodeGenerateCall { hub: self.hub, @@ -2767,7 +3000,11 @@ impl<'a, C, NC, A> VerificationCodeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Invalidate the current backup verification codes for the user. + /// Invalidate the current backup verification codes for the user. + /// + /// # Arguments + /// + /// * `userKey` - Email or immutable Id of the user pub fn invalidate(&self, user_key: &str) -> VerificationCodeInvalidateCall<'a, C, NC, A> { VerificationCodeInvalidateCall { hub: self.hub, @@ -2780,7 +3017,11 @@ impl<'a, C, NC, A> VerificationCodeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the current set of valid backup verification codes for the specified user. + /// Returns the current set of valid backup verification codes for the specified user. + /// + /// # Arguments + /// + /// * `userKey` - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn list(&self, user_key: &str) -> VerificationCodeListCall<'a, C, NC, A> { VerificationCodeListCall { hub: self.hub, @@ -2828,13 +3069,17 @@ pub struct GroupMethods<'a, C, NC, A> hub: &'a Directory, } -impl<'a, C, NC, A> ResourceMethodsBuilder for GroupMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for GroupMethods<'a, C, NC, A> {} impl<'a, C, NC, A> GroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve Group + /// Retrieve Group + /// + /// # Arguments + /// + /// * `groupKey` - Email or immutable Id of the group pub fn get(&self, group_key: &str) -> GroupGetCall<'a, C, NC, A> { GroupGetCall { hub: self.hub, @@ -2847,7 +3092,7 @@ impl<'a, C, NC, A> GroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve all groups in a domain (paginated) + /// Retrieve all groups in a domain (paginated) pub fn list(&self) -> GroupListCall<'a, C, NC, A> { GroupListCall { hub: self.hub, @@ -2864,7 +3109,11 @@ impl<'a, C, NC, A> GroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all aliases for a group + /// List all aliases for a group + /// + /// # Arguments + /// + /// * `groupKey` - Email or immutable Id of the group pub fn aliases_list(&self, group_key: &str) -> GroupAliaseListCall<'a, C, NC, A> { GroupAliaseListCall { hub: self.hub, @@ -2877,7 +3126,12 @@ impl<'a, C, NC, A> GroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update Group. This method supports patch semantics. + /// Update Group. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `groupKey` - Email or immutable Id of the group. If Id, it should match with id of group object pub fn patch(&self, request: &Group, group_key: &str) -> GroupPatchCall<'a, C, NC, A> { GroupPatchCall { hub: self.hub, @@ -2891,7 +3145,12 @@ impl<'a, C, NC, A> GroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update Group + /// Update Group + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `groupKey` - Email or immutable Id of the group. If Id, it should match with id of group object pub fn update(&self, request: &Group, group_key: &str) -> GroupUpdateCall<'a, C, NC, A> { GroupUpdateCall { hub: self.hub, @@ -2905,7 +3164,11 @@ impl<'a, C, NC, A> GroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete Group + /// Delete Group + /// + /// # Arguments + /// + /// * `groupKey` - Email or immutable Id of the group pub fn delete(&self, group_key: &str) -> GroupDeleteCall<'a, C, NC, A> { GroupDeleteCall { hub: self.hub, @@ -2918,7 +3181,12 @@ impl<'a, C, NC, A> GroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Add a alias for the group + /// Add a alias for the group + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `groupKey` - Email or immutable Id of the group pub fn aliases_insert(&self, request: &Alias, group_key: &str) -> GroupAliaseInsertCall<'a, C, NC, A> { GroupAliaseInsertCall { hub: self.hub, @@ -2932,7 +3200,12 @@ impl<'a, C, NC, A> GroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Remove a alias for the group + /// Remove a alias for the group + /// + /// # Arguments + /// + /// * `groupKey` - Email or immutable Id of the group + /// * `alias` - The alias to be removed pub fn aliases_delete(&self, group_key: &str, alias: &str) -> GroupAliaseDeleteCall<'a, C, NC, A> { GroupAliaseDeleteCall { hub: self.hub, @@ -2946,7 +3219,11 @@ impl<'a, C, NC, A> GroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Create Group + /// Create Group + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn insert(&self, request: &Group) -> GroupInsertCall<'a, C, NC, A> { GroupInsertCall { hub: self.hub, @@ -2994,13 +3271,18 @@ pub struct AspMethods<'a, C, NC, A> hub: &'a Directory, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AspMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AspMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AspMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete an ASP issued by a user. + /// Delete an ASP issued by a user. + /// + /// # Arguments + /// + /// * `userKey` - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// * `codeId` - The unique ID of the ASP to be deleted. pub fn delete(&self, user_key: &str, code_id: i32) -> AspDeleteCall<'a, C, NC, A> { AspDeleteCall { hub: self.hub, @@ -3014,7 +3296,11 @@ impl<'a, C, NC, A> AspMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List the ASPs issued by a user. + /// List the ASPs issued by a user. + /// + /// # Arguments + /// + /// * `userKey` - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn list(&self, user_key: &str) -> AspListCall<'a, C, NC, A> { AspListCall { hub: self.hub, @@ -3027,7 +3313,12 @@ impl<'a, C, NC, A> AspMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get information about an ASP issued by a user. + /// Get information about an ASP issued by a user. + /// + /// # Arguments + /// + /// * `userKey` - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// * `codeId` - The unique ID of the ASP. pub fn get(&self, user_key: &str, code_id: i32) -> AspGetCall<'a, C, NC, A> { AspGetCall { hub: self.hub, @@ -3076,13 +3367,17 @@ pub struct SchemaMethods<'a, C, NC, A> hub: &'a Directory, } -impl<'a, C, NC, A> ResourceMethodsBuilder for SchemaMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for SchemaMethods<'a, C, NC, A> {} impl<'a, C, NC, A> SchemaMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve all schemas for a customer + /// Retrieve all schemas for a customer + /// + /// # Arguments + /// + /// * `customerId` - Immutable id of the Google Apps account pub fn list(&self, customer_id: &str) -> SchemaListCall<'a, C, NC, A> { SchemaListCall { hub: self.hub, @@ -3095,7 +3390,12 @@ impl<'a, C, NC, A> SchemaMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve schema + /// Retrieve schema + /// + /// # Arguments + /// + /// * `customerId` - Immutable id of the Google Apps account + /// * `schemaKey` - Name or immutable Id of the schema pub fn get(&self, customer_id: &str, schema_key: &str) -> SchemaGetCall<'a, C, NC, A> { SchemaGetCall { hub: self.hub, @@ -3109,7 +3409,13 @@ impl<'a, C, NC, A> SchemaMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update schema. This method supports patch semantics. + /// Update schema. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `customerId` - Immutable id of the Google Apps account + /// * `schemaKey` - Name or immutable Id of the schema. pub fn patch(&self, request: &Schema, customer_id: &str, schema_key: &str) -> SchemaPatchCall<'a, C, NC, A> { SchemaPatchCall { hub: self.hub, @@ -3124,7 +3430,12 @@ impl<'a, C, NC, A> SchemaMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Create schema. + /// Create schema. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `customerId` - Immutable id of the Google Apps account pub fn insert(&self, request: &Schema, customer_id: &str) -> SchemaInsertCall<'a, C, NC, A> { SchemaInsertCall { hub: self.hub, @@ -3138,7 +3449,12 @@ impl<'a, C, NC, A> SchemaMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete schema + /// Delete schema + /// + /// # Arguments + /// + /// * `customerId` - Immutable id of the Google Apps account + /// * `schemaKey` - Name or immutable Id of the schema pub fn delete(&self, customer_id: &str, schema_key: &str) -> SchemaDeleteCall<'a, C, NC, A> { SchemaDeleteCall { hub: self.hub, @@ -3152,7 +3468,13 @@ impl<'a, C, NC, A> SchemaMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update schema + /// Update schema + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `customerId` - Immutable id of the Google Apps account + /// * `schemaKey` - Name or immutable Id of the schema. pub fn update(&self, request: &Schema, customer_id: &str, schema_key: &str) -> SchemaUpdateCall<'a, C, NC, A> { SchemaUpdateCall { hub: self.hub, @@ -3177,7 +3499,7 @@ impl<'a, C, NC, A> SchemaMethods<'a, C, NC, A> { /// Get information about an access token issued by a user. /// /// A builder for the *get* method supported by a *token* resource. -/// It is not used directly, but through a `TokenMethods`. +/// It is not used directly, but through a `TokenMethods` instance. /// /// # Example /// @@ -3237,7 +3559,7 @@ impl<'a, C, NC, A> TokenGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "userKey", "clientId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3290,7 +3612,7 @@ impl<'a, C, NC, A> TokenGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3302,7 +3624,6 @@ impl<'a, C, NC, A> TokenGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -3312,7 +3633,7 @@ impl<'a, C, NC, A> TokenGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3323,7 +3644,7 @@ impl<'a, C, NC, A> TokenGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3332,13 +3653,13 @@ impl<'a, C, NC, A> TokenGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3350,7 +3671,7 @@ impl<'a, C, NC, A> TokenGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn user_key(mut self, new_value: &str) -> TokenGetCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -3360,7 +3681,7 @@ impl<'a, C, NC, A> TokenGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Client ID of the application the token is issued to. + /// The Client ID of the application the token is issued to. pub fn client_id(mut self, new_value: &str) -> TokenGetCall<'a, C, NC, A> { self._client_id = new_value.to_string(); self @@ -3421,7 +3742,7 @@ impl<'a, C, NC, A> TokenGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Returns the set of tokens specified user has issued to 3rd party applications. /// /// A builder for the *list* method supported by a *token* resource. -/// It is not used directly, but through a `TokenMethods`. +/// It is not used directly, but through a `TokenMethods` instance. /// /// # Example /// @@ -3479,7 +3800,7 @@ impl<'a, C, NC, A> TokenListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3532,7 +3853,7 @@ impl<'a, C, NC, A> TokenListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3544,7 +3865,6 @@ impl<'a, C, NC, A> TokenListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -3554,7 +3874,7 @@ impl<'a, C, NC, A> TokenListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3565,7 +3885,7 @@ impl<'a, C, NC, A> TokenListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3574,13 +3894,13 @@ impl<'a, C, NC, A> TokenListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3592,7 +3912,7 @@ impl<'a, C, NC, A> TokenListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn user_key(mut self, new_value: &str) -> TokenListCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -3653,7 +3973,7 @@ impl<'a, C, NC, A> TokenListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Delete all access tokens issued by a user for an application. /// /// A builder for the *delete* method supported by a *token* resource. -/// It is not used directly, but through a `TokenMethods`. +/// It is not used directly, but through a `TokenMethods` instance. /// /// # Example /// @@ -3713,7 +4033,7 @@ impl<'a, C, NC, A> TokenDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["userKey", "clientId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3765,7 +4085,7 @@ impl<'a, C, NC, A> TokenDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3777,7 +4097,6 @@ impl<'a, C, NC, A> TokenDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -3787,7 +4106,7 @@ impl<'a, C, NC, A> TokenDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3798,12 +4117,12 @@ impl<'a, C, NC, A> TokenDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3815,7 +4134,7 @@ impl<'a, C, NC, A> TokenDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn user_key(mut self, new_value: &str) -> TokenDeleteCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -3825,7 +4144,7 @@ impl<'a, C, NC, A> TokenDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Client ID of the application the token is issued to. + /// The Client ID of the application the token is issued to. pub fn client_id(mut self, new_value: &str) -> TokenDeleteCall<'a, C, NC, A> { self._client_id = new_value.to_string(); self @@ -3886,7 +4205,7 @@ impl<'a, C, NC, A> TokenDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Stop watching resources through this channel /// /// A builder for the *stop* method supported by a *channel* resource. -/// It is not used directly, but through a `ChannelMethods`. +/// It is not used directly, but through a `ChannelMethods` instance. /// /// # Example /// @@ -3949,7 +4268,7 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in [].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3981,7 +4300,7 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3997,7 +4316,6 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -4007,7 +4325,7 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4018,12 +4336,12 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4095,7 +4413,7 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Add Organization Unit /// /// A builder for the *insert* method supported by a *orgunit* resource. -/// It is not used directly, but through a `OrgunitMethods`. +/// It is not used directly, but through a `OrgunitMethods` instance. /// /// # Example /// @@ -4160,7 +4478,7 @@ impl<'a, C, NC, A> OrgunitInsertCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "customerId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4217,7 +4535,7 @@ impl<'a, C, NC, A> OrgunitInsertCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4233,7 +4551,6 @@ impl<'a, C, NC, A> OrgunitInsertCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -4243,7 +4560,7 @@ impl<'a, C, NC, A> OrgunitInsertCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4254,7 +4571,7 @@ impl<'a, C, NC, A> OrgunitInsertCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4263,13 +4580,13 @@ impl<'a, C, NC, A> OrgunitInsertCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4290,7 +4607,7 @@ impl<'a, C, NC, A> OrgunitInsertCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> OrgunitInsertCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -4351,7 +4668,7 @@ impl<'a, C, NC, A> OrgunitInsertCall<'a, C, NC, A> where NC: hyper::net::Network /// Retrieve all Organization Units /// /// A builder for the *list* method supported by a *orgunit* resource. -/// It is not used directly, but through a `OrgunitMethods`. +/// It is not used directly, but through a `OrgunitMethods` instance. /// /// # Example /// @@ -4419,7 +4736,7 @@ impl<'a, C, NC, A> OrgunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "customerId", "type", "orgUnitPath"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4472,7 +4789,7 @@ impl<'a, C, NC, A> OrgunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4484,7 +4801,6 @@ impl<'a, C, NC, A> OrgunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -4494,7 +4810,7 @@ impl<'a, C, NC, A> OrgunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4505,7 +4821,7 @@ impl<'a, C, NC, A> OrgunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4514,13 +4830,13 @@ impl<'a, C, NC, A> OrgunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4532,7 +4848,7 @@ impl<'a, C, NC, A> OrgunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> OrgunitListCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -4540,7 +4856,7 @@ impl<'a, C, NC, A> OrgunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *type* query property to the given value. /// /// - /// Whether to return all sub-organizations or just immediate children + /// Whether to return all sub-organizations or just immediate children pub fn type_(mut self, new_value: &str) -> OrgunitListCall<'a, C, NC, A> { self._type_ = Some(new_value.to_string()); self @@ -4548,7 +4864,7 @@ impl<'a, C, NC, A> OrgunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *org unit path* query property to the given value. /// /// - /// the URL-encoded organization unit + /// the URL-encoded organization unit pub fn org_unit_path(mut self, new_value: &str) -> OrgunitListCall<'a, C, NC, A> { self._org_unit_path = Some(new_value.to_string()); self @@ -4609,7 +4925,7 @@ impl<'a, C, NC, A> OrgunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Retrieve Organization Unit /// /// A builder for the *get* method supported by a *orgunit* resource. -/// It is not used directly, but through a `OrgunitMethods`. +/// It is not used directly, but through a `OrgunitMethods` instance. /// /// # Example /// @@ -4675,7 +4991,7 @@ impl<'a, C, NC, A> OrgunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "customerId", "orgUnitPath"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4728,7 +5044,7 @@ impl<'a, C, NC, A> OrgunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4740,7 +5056,6 @@ impl<'a, C, NC, A> OrgunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -4750,7 +5065,7 @@ impl<'a, C, NC, A> OrgunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4761,7 +5076,7 @@ impl<'a, C, NC, A> OrgunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4770,13 +5085,13 @@ impl<'a, C, NC, A> OrgunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4788,7 +5103,7 @@ impl<'a, C, NC, A> OrgunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> OrgunitGetCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -4799,7 +5114,7 @@ impl<'a, C, NC, A> OrgunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Full path of the organization unit + /// Full path of the organization unit pub fn add_org_unit_path(mut self, new_value: &str) -> OrgunitGetCall<'a, C, NC, A> { self._org_unit_path.push(new_value.to_string()); self @@ -4860,7 +5175,7 @@ impl<'a, C, NC, A> OrgunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Update Organization Unit /// /// A builder for the *update* method supported by a *orgunit* resource. -/// It is not used directly, but through a `OrgunitMethods`. +/// It is not used directly, but through a `OrgunitMethods` instance. /// /// # Example /// @@ -4933,7 +5248,7 @@ impl<'a, C, NC, A> OrgunitUpdateCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "customerId", "orgUnitPath"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4990,7 +5305,7 @@ impl<'a, C, NC, A> OrgunitUpdateCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5006,7 +5321,6 @@ impl<'a, C, NC, A> OrgunitUpdateCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -5016,7 +5330,7 @@ impl<'a, C, NC, A> OrgunitUpdateCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5027,7 +5341,7 @@ impl<'a, C, NC, A> OrgunitUpdateCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5036,13 +5350,13 @@ impl<'a, C, NC, A> OrgunitUpdateCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5063,7 +5377,7 @@ impl<'a, C, NC, A> OrgunitUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> OrgunitUpdateCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -5074,7 +5388,7 @@ impl<'a, C, NC, A> OrgunitUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Full path of the organization unit + /// Full path of the organization unit pub fn add_org_unit_path(mut self, new_value: &str) -> OrgunitUpdateCall<'a, C, NC, A> { self._org_unit_path.push(new_value.to_string()); self @@ -5135,7 +5449,7 @@ impl<'a, C, NC, A> OrgunitUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Remove Organization Unit /// /// A builder for the *delete* method supported by a *orgunit* resource. -/// It is not used directly, but through a `OrgunitMethods`. +/// It is not used directly, but through a `OrgunitMethods` instance. /// /// # Example /// @@ -5201,7 +5515,7 @@ impl<'a, C, NC, A> OrgunitDeleteCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["customerId", "orgUnitPath"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5253,7 +5567,7 @@ impl<'a, C, NC, A> OrgunitDeleteCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5265,7 +5579,6 @@ impl<'a, C, NC, A> OrgunitDeleteCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -5275,7 +5588,7 @@ impl<'a, C, NC, A> OrgunitDeleteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5286,12 +5599,12 @@ impl<'a, C, NC, A> OrgunitDeleteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5303,7 +5616,7 @@ impl<'a, C, NC, A> OrgunitDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> OrgunitDeleteCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -5314,7 +5627,7 @@ impl<'a, C, NC, A> OrgunitDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Full path of the organization unit + /// Full path of the organization unit pub fn add_org_unit_path(mut self, new_value: &str) -> OrgunitDeleteCall<'a, C, NC, A> { self._org_unit_path.push(new_value.to_string()); self @@ -5375,7 +5688,7 @@ impl<'a, C, NC, A> OrgunitDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Update Organization Unit. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *orgunit* resource. -/// It is not used directly, but through a `OrgunitMethods`. +/// It is not used directly, but through a `OrgunitMethods` instance. /// /// # Example /// @@ -5448,7 +5761,7 @@ impl<'a, C, NC, A> OrgunitPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "customerId", "orgUnitPath"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5505,7 +5818,7 @@ impl<'a, C, NC, A> OrgunitPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5521,7 +5834,6 @@ impl<'a, C, NC, A> OrgunitPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -5531,7 +5843,7 @@ impl<'a, C, NC, A> OrgunitPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5542,7 +5854,7 @@ impl<'a, C, NC, A> OrgunitPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5551,13 +5863,13 @@ impl<'a, C, NC, A> OrgunitPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5578,7 +5890,7 @@ impl<'a, C, NC, A> OrgunitPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> OrgunitPatchCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -5589,7 +5901,7 @@ impl<'a, C, NC, A> OrgunitPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Full path of the organization unit + /// Full path of the organization unit pub fn add_org_unit_path(mut self, new_value: &str) -> OrgunitPatchCall<'a, C, NC, A> { self._org_unit_path.push(new_value.to_string()); self @@ -5650,7 +5962,7 @@ impl<'a, C, NC, A> OrgunitPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// create user. /// /// A builder for the *insert* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -5713,7 +6025,7 @@ impl<'a, C, NC, A> UserInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5746,7 +6058,7 @@ impl<'a, C, NC, A> UserInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5762,7 +6074,6 @@ impl<'a, C, NC, A> UserInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -5772,7 +6083,7 @@ impl<'a, C, NC, A> UserInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5783,7 +6094,7 @@ impl<'a, C, NC, A> UserInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5792,13 +6103,13 @@ impl<'a, C, NC, A> UserInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5870,7 +6181,7 @@ impl<'a, C, NC, A> UserInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Remove photos for the user /// /// A builder for the *photos.delete* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -5928,7 +6239,7 @@ impl<'a, C, NC, A> UserPhotoDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5980,7 +6291,7 @@ impl<'a, C, NC, A> UserPhotoDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5992,7 +6303,6 @@ impl<'a, C, NC, A> UserPhotoDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -6002,7 +6312,7 @@ impl<'a, C, NC, A> UserPhotoDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6013,12 +6323,12 @@ impl<'a, C, NC, A> UserPhotoDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6030,7 +6340,7 @@ impl<'a, C, NC, A> UserPhotoDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user + /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserPhotoDeleteCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -6091,7 +6401,7 @@ impl<'a, C, NC, A> UserPhotoDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Undelete a deleted user /// /// A builder for the *undelete* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -6156,7 +6466,7 @@ impl<'a, C, NC, A> UserUndeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6212,7 +6522,7 @@ impl<'a, C, NC, A> UserUndeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6228,7 +6538,6 @@ impl<'a, C, NC, A> UserUndeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -6238,7 +6547,7 @@ impl<'a, C, NC, A> UserUndeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6249,12 +6558,12 @@ impl<'a, C, NC, A> UserUndeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6275,7 +6584,7 @@ impl<'a, C, NC, A> UserUndeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The immutable id of the user + /// The immutable id of the user pub fn user_key(mut self, new_value: &str) -> UserUndeleteCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -6336,7 +6645,7 @@ impl<'a, C, NC, A> UserUndeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// change admin status of a user /// /// A builder for the *makeAdmin* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -6401,7 +6710,7 @@ impl<'a, C, NC, A> UserMakeAdminCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6457,7 +6766,7 @@ impl<'a, C, NC, A> UserMakeAdminCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6473,7 +6782,6 @@ impl<'a, C, NC, A> UserMakeAdminCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -6483,7 +6791,7 @@ impl<'a, C, NC, A> UserMakeAdminCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6494,12 +6802,12 @@ impl<'a, C, NC, A> UserMakeAdminCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6520,7 +6828,7 @@ impl<'a, C, NC, A> UserMakeAdminCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user as admin + /// Email or immutable Id of the user as admin pub fn user_key(mut self, new_value: &str) -> UserMakeAdminCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -6581,7 +6889,7 @@ impl<'a, C, NC, A> UserMakeAdminCall<'a, C, NC, A> where NC: hyper::net::Network /// update user. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -6646,7 +6954,7 @@ impl<'a, C, NC, A> UserPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6703,7 +7011,7 @@ impl<'a, C, NC, A> UserPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6719,7 +7027,6 @@ impl<'a, C, NC, A> UserPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -6729,7 +7036,7 @@ impl<'a, C, NC, A> UserPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6740,7 +7047,7 @@ impl<'a, C, NC, A> UserPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6749,13 +7056,13 @@ impl<'a, C, NC, A> UserPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6776,7 +7083,7 @@ impl<'a, C, NC, A> UserPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user. If Id, it should match with id of user object + /// Email or immutable Id of the user. If Id, it should match with id of user object pub fn user_key(mut self, new_value: &str) -> UserPatchCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -6837,7 +7144,7 @@ impl<'a, C, NC, A> UserPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Watch for changes in users list /// /// A builder for the *watch* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -6960,7 +7267,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "viewType", "sortOrder", "showDeleted", "query", "projection", "pageToken", "orderBy", "maxResults", "event", "domain", "customer", "customFieldMask"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6993,7 +7300,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7009,7 +7316,6 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -7019,7 +7325,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7030,7 +7336,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7039,13 +7345,13 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7064,7 +7370,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *view type* query property to the given value. /// /// - /// Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. + /// Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. pub fn view_type(mut self, new_value: &str) -> UserWatchCall<'a, C, NC, A> { self._view_type = Some(new_value.to_string()); self @@ -7072,7 +7378,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *sort order* query property to the given value. /// /// - /// Whether to return results in ascending or descending order. + /// Whether to return results in ascending or descending order. pub fn sort_order(mut self, new_value: &str) -> UserWatchCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -7080,7 +7386,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *show deleted* query property to the given value. /// /// - /// If set to true retrieves the list of deleted users. Default is false + /// If set to true retrieves the list of deleted users. Default is false pub fn show_deleted(mut self, new_value: &str) -> UserWatchCall<'a, C, NC, A> { self._show_deleted = Some(new_value.to_string()); self @@ -7088,7 +7394,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *query* query property to the given value. /// /// - /// Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users + /// Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users pub fn query(mut self, new_value: &str) -> UserWatchCall<'a, C, NC, A> { self._query = Some(new_value.to_string()); self @@ -7096,7 +7402,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *projection* query property to the given value. /// /// - /// What subset of fields to fetch for this user. + /// What subset of fields to fetch for this user. pub fn projection(mut self, new_value: &str) -> UserWatchCall<'a, C, NC, A> { self._projection = Some(new_value.to_string()); self @@ -7104,7 +7410,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *page token* query property to the given value. /// /// - /// Token to specify next page in the list + /// Token to specify next page in the list pub fn page_token(mut self, new_value: &str) -> UserWatchCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -7112,7 +7418,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *order by* query property to the given value. /// /// - /// Column to use for sorting results + /// Column to use for sorting results pub fn order_by(mut self, new_value: &str) -> UserWatchCall<'a, C, NC, A> { self._order_by = Some(new_value.to_string()); self @@ -7120,7 +7426,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. Default is 100. Max allowed is 500 + /// Maximum number of results to return. Default is 100. Max allowed is 500 pub fn max_results(mut self, new_value: i32) -> UserWatchCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -7128,7 +7434,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *event* query property to the given value. /// /// - /// Event on which subscription is intended (if subscribing) + /// Event on which subscription is intended (if subscribing) pub fn event(mut self, new_value: &str) -> UserWatchCall<'a, C, NC, A> { self._event = Some(new_value.to_string()); self @@ -7136,7 +7442,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *domain* query property to the given value. /// /// - /// Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead. + /// Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead. pub fn domain(mut self, new_value: &str) -> UserWatchCall<'a, C, NC, A> { self._domain = Some(new_value.to_string()); self @@ -7144,7 +7450,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *customer* query property to the given value. /// /// - /// Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain. + /// Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain. pub fn customer(mut self, new_value: &str) -> UserWatchCall<'a, C, NC, A> { self._customer = Some(new_value.to_string()); self @@ -7152,7 +7458,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *custom field mask* query property to the given value. /// /// - /// Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. + /// Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. pub fn custom_field_mask(mut self, new_value: &str) -> UserWatchCall<'a, C, NC, A> { self._custom_field_mask = Some(new_value.to_string()); self @@ -7213,7 +7519,7 @@ impl<'a, C, NC, A> UserWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Delete user /// /// A builder for the *delete* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -7271,7 +7577,7 @@ impl<'a, C, NC, A> UserDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7323,7 +7629,7 @@ impl<'a, C, NC, A> UserDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7335,7 +7641,6 @@ impl<'a, C, NC, A> UserDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -7345,7 +7650,7 @@ impl<'a, C, NC, A> UserDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7356,12 +7661,12 @@ impl<'a, C, NC, A> UserDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7373,7 +7678,7 @@ impl<'a, C, NC, A> UserDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user + /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserDeleteCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -7434,7 +7739,7 @@ impl<'a, C, NC, A> UserDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Add a photo for the user /// /// A builder for the *photos.update* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -7499,7 +7804,7 @@ impl<'a, C, NC, A> UserPhotoUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7556,7 +7861,7 @@ impl<'a, C, NC, A> UserPhotoUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7572,7 +7877,6 @@ impl<'a, C, NC, A> UserPhotoUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -7582,7 +7886,7 @@ impl<'a, C, NC, A> UserPhotoUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7593,7 +7897,7 @@ impl<'a, C, NC, A> UserPhotoUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7602,13 +7906,13 @@ impl<'a, C, NC, A> UserPhotoUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7629,7 +7933,7 @@ impl<'a, C, NC, A> UserPhotoUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user + /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserPhotoUpdateCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -7690,7 +7994,7 @@ impl<'a, C, NC, A> UserPhotoUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo /// retrieve user /// /// A builder for the *get* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -7763,7 +8067,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "userKey", "viewType", "projection", "customFieldMask"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7816,7 +8120,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7828,7 +8132,6 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -7838,7 +8141,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7849,7 +8152,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7858,13 +8161,13 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7876,7 +8179,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user + /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserGetCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -7884,7 +8187,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *view type* query property to the given value. /// /// - /// Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. + /// Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. pub fn view_type(mut self, new_value: &str) -> UserGetCall<'a, C, NC, A> { self._view_type = Some(new_value.to_string()); self @@ -7892,7 +8195,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *projection* query property to the given value. /// /// - /// What subset of fields to fetch for this user. + /// What subset of fields to fetch for this user. pub fn projection(mut self, new_value: &str) -> UserGetCall<'a, C, NC, A> { self._projection = Some(new_value.to_string()); self @@ -7900,7 +8203,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *custom field mask* query property to the given value. /// /// - /// Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. + /// Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. pub fn custom_field_mask(mut self, new_value: &str) -> UserGetCall<'a, C, NC, A> { self._custom_field_mask = Some(new_value.to_string()); self @@ -7961,7 +8264,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Add a alias for the user /// /// A builder for the *aliases.insert* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -8026,7 +8329,7 @@ impl<'a, C, NC, A> UserAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8083,7 +8386,7 @@ impl<'a, C, NC, A> UserAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8099,7 +8402,6 @@ impl<'a, C, NC, A> UserAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -8109,7 +8411,7 @@ impl<'a, C, NC, A> UserAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8120,7 +8422,7 @@ impl<'a, C, NC, A> UserAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8129,13 +8431,13 @@ impl<'a, C, NC, A> UserAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8156,7 +8458,7 @@ impl<'a, C, NC, A> UserAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user + /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserAliaseInsertCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -8217,7 +8519,7 @@ impl<'a, C, NC, A> UserAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Retrieve either deleted users or all users in a domain (paginated) /// /// A builder for the *list* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -8333,7 +8635,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "viewType", "sortOrder", "showDeleted", "query", "projection", "pageToken", "orderBy", "maxResults", "event", "domain", "customer", "customFieldMask"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8362,7 +8664,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8374,7 +8676,6 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -8384,7 +8685,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8395,7 +8696,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8404,13 +8705,13 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8420,7 +8721,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *view type* query property to the given value. /// /// - /// Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. + /// Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user. pub fn view_type(mut self, new_value: &str) -> UserListCall<'a, C, NC, A> { self._view_type = Some(new_value.to_string()); self @@ -8428,7 +8729,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *sort order* query property to the given value. /// /// - /// Whether to return results in ascending or descending order. + /// Whether to return results in ascending or descending order. pub fn sort_order(mut self, new_value: &str) -> UserListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -8436,7 +8737,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *show deleted* query property to the given value. /// /// - /// If set to true retrieves the list of deleted users. Default is false + /// If set to true retrieves the list of deleted users. Default is false pub fn show_deleted(mut self, new_value: &str) -> UserListCall<'a, C, NC, A> { self._show_deleted = Some(new_value.to_string()); self @@ -8444,7 +8745,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *query* query property to the given value. /// /// - /// Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users + /// Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users pub fn query(mut self, new_value: &str) -> UserListCall<'a, C, NC, A> { self._query = Some(new_value.to_string()); self @@ -8452,7 +8753,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *projection* query property to the given value. /// /// - /// What subset of fields to fetch for this user. + /// What subset of fields to fetch for this user. pub fn projection(mut self, new_value: &str) -> UserListCall<'a, C, NC, A> { self._projection = Some(new_value.to_string()); self @@ -8460,7 +8761,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *page token* query property to the given value. /// /// - /// Token to specify next page in the list + /// Token to specify next page in the list pub fn page_token(mut self, new_value: &str) -> UserListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -8468,7 +8769,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *order by* query property to the given value. /// /// - /// Column to use for sorting results + /// Column to use for sorting results pub fn order_by(mut self, new_value: &str) -> UserListCall<'a, C, NC, A> { self._order_by = Some(new_value.to_string()); self @@ -8476,7 +8777,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. Default is 100. Max allowed is 500 + /// Maximum number of results to return. Default is 100. Max allowed is 500 pub fn max_results(mut self, new_value: i32) -> UserListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -8484,7 +8785,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *event* query property to the given value. /// /// - /// Event on which subscription is intended (if subscribing) + /// Event on which subscription is intended (if subscribing) pub fn event(mut self, new_value: &str) -> UserListCall<'a, C, NC, A> { self._event = Some(new_value.to_string()); self @@ -8492,7 +8793,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *domain* query property to the given value. /// /// - /// Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead. + /// Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead. pub fn domain(mut self, new_value: &str) -> UserListCall<'a, C, NC, A> { self._domain = Some(new_value.to_string()); self @@ -8500,7 +8801,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *customer* query property to the given value. /// /// - /// Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain. + /// Immutable id of the Google Apps account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain. pub fn customer(mut self, new_value: &str) -> UserListCall<'a, C, NC, A> { self._customer = Some(new_value.to_string()); self @@ -8508,7 +8809,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *custom field mask* query property to the given value. /// /// - /// Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. + /// Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. pub fn custom_field_mask(mut self, new_value: &str) -> UserListCall<'a, C, NC, A> { self._custom_field_mask = Some(new_value.to_string()); self @@ -8569,7 +8870,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Remove a alias for the user /// /// A builder for the *aliases.delete* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -8629,7 +8930,7 @@ impl<'a, C, NC, A> UserAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["userKey", "alias"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8681,7 +8982,7 @@ impl<'a, C, NC, A> UserAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8693,7 +8994,6 @@ impl<'a, C, NC, A> UserAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -8703,7 +9003,7 @@ impl<'a, C, NC, A> UserAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8714,12 +9014,12 @@ impl<'a, C, NC, A> UserAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8731,7 +9031,7 @@ impl<'a, C, NC, A> UserAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user + /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserAliaseDeleteCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -8741,7 +9041,7 @@ impl<'a, C, NC, A> UserAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The alias to be removed + /// The alias to be removed pub fn alias(mut self, new_value: &str) -> UserAliaseDeleteCall<'a, C, NC, A> { self._alias = new_value.to_string(); self @@ -8802,7 +9102,7 @@ impl<'a, C, NC, A> UserAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// update user /// /// A builder for the *update* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -8867,7 +9167,7 @@ impl<'a, C, NC, A> UserUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8924,7 +9224,7 @@ impl<'a, C, NC, A> UserUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8940,7 +9240,6 @@ impl<'a, C, NC, A> UserUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -8950,7 +9249,7 @@ impl<'a, C, NC, A> UserUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8961,7 +9260,7 @@ impl<'a, C, NC, A> UserUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8970,13 +9269,13 @@ impl<'a, C, NC, A> UserUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8997,7 +9296,7 @@ impl<'a, C, NC, A> UserUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user. If Id, it should match with id of user object + /// Email or immutable Id of the user. If Id, it should match with id of user object pub fn user_key(mut self, new_value: &str) -> UserUpdateCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -9058,7 +9357,7 @@ impl<'a, C, NC, A> UserUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Watch for changes in user aliases list /// /// A builder for the *aliases.watch* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -9128,7 +9427,7 @@ impl<'a, C, NC, A> UserAliaseWatchCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "userKey", "event"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9185,7 +9484,7 @@ impl<'a, C, NC, A> UserAliaseWatchCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9201,7 +9500,6 @@ impl<'a, C, NC, A> UserAliaseWatchCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -9211,7 +9509,7 @@ impl<'a, C, NC, A> UserAliaseWatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9222,7 +9520,7 @@ impl<'a, C, NC, A> UserAliaseWatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9231,13 +9529,13 @@ impl<'a, C, NC, A> UserAliaseWatchCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9258,7 +9556,7 @@ impl<'a, C, NC, A> UserAliaseWatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user + /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserAliaseWatchCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -9266,7 +9564,7 @@ impl<'a, C, NC, A> UserAliaseWatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *event* query property to the given value. /// /// - /// Event on which subscription is intended (if subscribing) + /// Event on which subscription is intended (if subscribing) pub fn event(mut self, new_value: &str) -> UserAliaseWatchCall<'a, C, NC, A> { self._event = Some(new_value.to_string()); self @@ -9327,7 +9625,7 @@ impl<'a, C, NC, A> UserAliaseWatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// List all aliases for a user /// /// A builder for the *aliases.list* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -9390,7 +9688,7 @@ impl<'a, C, NC, A> UserAliaseListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "userKey", "event"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9443,7 +9741,7 @@ impl<'a, C, NC, A> UserAliaseListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9455,7 +9753,6 @@ impl<'a, C, NC, A> UserAliaseListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -9465,7 +9762,7 @@ impl<'a, C, NC, A> UserAliaseListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9476,7 +9773,7 @@ impl<'a, C, NC, A> UserAliaseListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9485,13 +9782,13 @@ impl<'a, C, NC, A> UserAliaseListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9503,7 +9800,7 @@ impl<'a, C, NC, A> UserAliaseListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user + /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserAliaseListCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -9511,7 +9808,7 @@ impl<'a, C, NC, A> UserAliaseListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *event* query property to the given value. /// /// - /// Event on which subscription is intended (if subscribing) + /// Event on which subscription is intended (if subscribing) pub fn event(mut self, new_value: &str) -> UserAliaseListCall<'a, C, NC, A> { self._event = Some(new_value.to_string()); self @@ -9572,7 +9869,7 @@ impl<'a, C, NC, A> UserAliaseListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieve photo of a user /// /// A builder for the *photos.get* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -9630,7 +9927,7 @@ impl<'a, C, NC, A> UserPhotoGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9683,7 +9980,7 @@ impl<'a, C, NC, A> UserPhotoGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9695,7 +9992,6 @@ impl<'a, C, NC, A> UserPhotoGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -9705,7 +10001,7 @@ impl<'a, C, NC, A> UserPhotoGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9716,7 +10012,7 @@ impl<'a, C, NC, A> UserPhotoGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9725,13 +10021,13 @@ impl<'a, C, NC, A> UserPhotoGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9743,7 +10039,7 @@ impl<'a, C, NC, A> UserPhotoGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user + /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserPhotoGetCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -9804,7 +10100,7 @@ impl<'a, C, NC, A> UserPhotoGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Add a photo for the user. This method supports patch semantics. /// /// A builder for the *photos.patch* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -9869,7 +10165,7 @@ impl<'a, C, NC, A> UserPhotoPatchCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9926,7 +10222,7 @@ impl<'a, C, NC, A> UserPhotoPatchCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9942,7 +10238,6 @@ impl<'a, C, NC, A> UserPhotoPatchCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -9952,7 +10247,7 @@ impl<'a, C, NC, A> UserPhotoPatchCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9963,7 +10258,7 @@ impl<'a, C, NC, A> UserPhotoPatchCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9972,13 +10267,13 @@ impl<'a, C, NC, A> UserPhotoPatchCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9999,7 +10294,7 @@ impl<'a, C, NC, A> UserPhotoPatchCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user + /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> UserPhotoPatchCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -10060,7 +10355,7 @@ impl<'a, C, NC, A> UserPhotoPatchCall<'a, C, NC, A> where NC: hyper::net::Networ /// Delete Mobile Device /// /// A builder for the *delete* method supported by a *mobiledevice* resource. -/// It is not used directly, but through a `MobiledeviceMethods`. +/// It is not used directly, but through a `MobiledeviceMethods` instance. /// /// # Example /// @@ -10120,7 +10415,7 @@ impl<'a, C, NC, A> MobiledeviceDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["customerId", "resourceId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10172,7 +10467,7 @@ impl<'a, C, NC, A> MobiledeviceDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10184,7 +10479,6 @@ impl<'a, C, NC, A> MobiledeviceDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -10194,7 +10488,7 @@ impl<'a, C, NC, A> MobiledeviceDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10205,12 +10499,12 @@ impl<'a, C, NC, A> MobiledeviceDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10222,7 +10516,7 @@ impl<'a, C, NC, A> MobiledeviceDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> MobiledeviceDeleteCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -10232,7 +10526,7 @@ impl<'a, C, NC, A> MobiledeviceDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of Mobile Device + /// Immutable id of Mobile Device pub fn resource_id(mut self, new_value: &str) -> MobiledeviceDeleteCall<'a, C, NC, A> { self._resource_id = new_value.to_string(); self @@ -10293,7 +10587,7 @@ impl<'a, C, NC, A> MobiledeviceDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne /// Retrieve Mobile Device /// /// A builder for the *get* method supported by a *mobiledevice* resource. -/// It is not used directly, but through a `MobiledeviceMethods`. +/// It is not used directly, but through a `MobiledeviceMethods` instance. /// /// # Example /// @@ -10358,7 +10652,7 @@ impl<'a, C, NC, A> MobiledeviceGetCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "customerId", "resourceId", "projection"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10411,7 +10705,7 @@ impl<'a, C, NC, A> MobiledeviceGetCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10423,7 +10717,6 @@ impl<'a, C, NC, A> MobiledeviceGetCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -10433,7 +10726,7 @@ impl<'a, C, NC, A> MobiledeviceGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10444,7 +10737,7 @@ impl<'a, C, NC, A> MobiledeviceGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10453,13 +10746,13 @@ impl<'a, C, NC, A> MobiledeviceGetCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10471,7 +10764,7 @@ impl<'a, C, NC, A> MobiledeviceGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> MobiledeviceGetCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -10481,7 +10774,7 @@ impl<'a, C, NC, A> MobiledeviceGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of Mobile Device + /// Immutable id of Mobile Device pub fn resource_id(mut self, new_value: &str) -> MobiledeviceGetCall<'a, C, NC, A> { self._resource_id = new_value.to_string(); self @@ -10489,7 +10782,7 @@ impl<'a, C, NC, A> MobiledeviceGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *projection* query property to the given value. /// /// - /// Restrict information returned to a set of selected fields. + /// Restrict information returned to a set of selected fields. pub fn projection(mut self, new_value: &str) -> MobiledeviceGetCall<'a, C, NC, A> { self._projection = Some(new_value.to_string()); self @@ -10550,7 +10843,7 @@ impl<'a, C, NC, A> MobiledeviceGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Retrieve all Mobile Devices of a customer (paginated) /// /// A builder for the *list* method supported by a *mobiledevice* resource. -/// It is not used directly, but through a `MobiledeviceMethods`. +/// It is not used directly, but through a `MobiledeviceMethods` instance. /// /// # Example /// @@ -10638,7 +10931,7 @@ impl<'a, C, NC, A> MobiledeviceListCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "customerId", "sortOrder", "query", "projection", "pageToken", "orderBy", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10691,7 +10984,7 @@ impl<'a, C, NC, A> MobiledeviceListCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10703,7 +10996,6 @@ impl<'a, C, NC, A> MobiledeviceListCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -10713,7 +11005,7 @@ impl<'a, C, NC, A> MobiledeviceListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10724,7 +11016,7 @@ impl<'a, C, NC, A> MobiledeviceListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10733,13 +11025,13 @@ impl<'a, C, NC, A> MobiledeviceListCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10751,7 +11043,7 @@ impl<'a, C, NC, A> MobiledeviceListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> MobiledeviceListCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -10759,7 +11051,7 @@ impl<'a, C, NC, A> MobiledeviceListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *sort order* query property to the given value. /// /// - /// Whether to return results in ascending or descending order. Only of use when orderBy is also used + /// Whether to return results in ascending or descending order. Only of use when orderBy is also used pub fn sort_order(mut self, new_value: &str) -> MobiledeviceListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -10767,7 +11059,7 @@ impl<'a, C, NC, A> MobiledeviceListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *query* query property to the given value. /// /// - /// Search string in the format given at http://support.google.com/a/bin/answer.py?hl=en&answer=1408863#search + /// Search string in the format given at http://support.google.com/a/bin/answer.py?hl=en&answer=1408863#search pub fn query(mut self, new_value: &str) -> MobiledeviceListCall<'a, C, NC, A> { self._query = Some(new_value.to_string()); self @@ -10775,7 +11067,7 @@ impl<'a, C, NC, A> MobiledeviceListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *projection* query property to the given value. /// /// - /// Restrict information returned to a set of selected fields. + /// Restrict information returned to a set of selected fields. pub fn projection(mut self, new_value: &str) -> MobiledeviceListCall<'a, C, NC, A> { self._projection = Some(new_value.to_string()); self @@ -10783,7 +11075,7 @@ impl<'a, C, NC, A> MobiledeviceListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *page token* query property to the given value. /// /// - /// Token to specify next page in the list + /// Token to specify next page in the list pub fn page_token(mut self, new_value: &str) -> MobiledeviceListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -10791,7 +11083,7 @@ impl<'a, C, NC, A> MobiledeviceListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *order by* query property to the given value. /// /// - /// Column to use for sorting results + /// Column to use for sorting results pub fn order_by(mut self, new_value: &str) -> MobiledeviceListCall<'a, C, NC, A> { self._order_by = Some(new_value.to_string()); self @@ -10799,7 +11091,7 @@ impl<'a, C, NC, A> MobiledeviceListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. Default is 100 + /// Maximum number of results to return. Default is 100 pub fn max_results(mut self, new_value: i32) -> MobiledeviceListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -10860,7 +11152,7 @@ impl<'a, C, NC, A> MobiledeviceListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Take action on Mobile Device /// /// A builder for the *action* method supported by a *mobiledevice* resource. -/// It is not used directly, but through a `MobiledeviceMethods`. +/// It is not used directly, but through a `MobiledeviceMethods` instance. /// /// # Example /// @@ -10927,7 +11219,7 @@ impl<'a, C, NC, A> MobiledeviceActionCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["customerId", "resourceId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10983,7 +11275,7 @@ impl<'a, C, NC, A> MobiledeviceActionCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10999,7 +11291,6 @@ impl<'a, C, NC, A> MobiledeviceActionCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -11009,7 +11300,7 @@ impl<'a, C, NC, A> MobiledeviceActionCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11020,12 +11311,12 @@ impl<'a, C, NC, A> MobiledeviceActionCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11046,7 +11337,7 @@ impl<'a, C, NC, A> MobiledeviceActionCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> MobiledeviceActionCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -11056,7 +11347,7 @@ impl<'a, C, NC, A> MobiledeviceActionCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of Mobile Device + /// Immutable id of Mobile Device pub fn resource_id(mut self, new_value: &str) -> MobiledeviceActionCall<'a, C, NC, A> { self._resource_id = new_value.to_string(); self @@ -11117,7 +11408,7 @@ impl<'a, C, NC, A> MobiledeviceActionCall<'a, C, NC, A> where NC: hyper::net::Ne /// Update membership of a user in the specified group. /// /// A builder for the *update* method supported by a *member* resource. -/// It is not used directly, but through a `MemberMethods`. +/// It is not used directly, but through a `MemberMethods` instance. /// /// # Example /// @@ -11184,7 +11475,7 @@ impl<'a, C, NC, A> MemberUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "groupKey", "memberKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11241,7 +11532,7 @@ impl<'a, C, NC, A> MemberUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11257,7 +11548,6 @@ impl<'a, C, NC, A> MemberUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -11267,7 +11557,7 @@ impl<'a, C, NC, A> MemberUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11278,7 +11568,7 @@ impl<'a, C, NC, A> MemberUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11287,13 +11577,13 @@ impl<'a, C, NC, A> MemberUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11314,7 +11604,7 @@ impl<'a, C, NC, A> MemberUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the group. If Id, it should match with id of group object + /// Email or immutable Id of the group. If Id, it should match with id of group object pub fn group_key(mut self, new_value: &str) -> MemberUpdateCall<'a, C, NC, A> { self._group_key = new_value.to_string(); self @@ -11324,7 +11614,7 @@ impl<'a, C, NC, A> MemberUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user. If Id, it should match with id of member object + /// Email or immutable Id of the user. If Id, it should match with id of member object pub fn member_key(mut self, new_value: &str) -> MemberUpdateCall<'a, C, NC, A> { self._member_key = new_value.to_string(); self @@ -11385,7 +11675,7 @@ impl<'a, C, NC, A> MemberUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Retrieve Group Member /// /// A builder for the *get* method supported by a *member* resource. -/// It is not used directly, but through a `MemberMethods`. +/// It is not used directly, but through a `MemberMethods` instance. /// /// # Example /// @@ -11445,7 +11735,7 @@ impl<'a, C, NC, A> MemberGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "groupKey", "memberKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11498,7 +11788,7 @@ impl<'a, C, NC, A> MemberGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11510,7 +11800,6 @@ impl<'a, C, NC, A> MemberGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -11520,7 +11809,7 @@ impl<'a, C, NC, A> MemberGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11531,7 +11820,7 @@ impl<'a, C, NC, A> MemberGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11540,13 +11829,13 @@ impl<'a, C, NC, A> MemberGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11558,7 +11847,7 @@ impl<'a, C, NC, A> MemberGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the group + /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> MemberGetCall<'a, C, NC, A> { self._group_key = new_value.to_string(); self @@ -11568,7 +11857,7 @@ impl<'a, C, NC, A> MemberGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the member + /// Email or immutable Id of the member pub fn member_key(mut self, new_value: &str) -> MemberGetCall<'a, C, NC, A> { self._member_key = new_value.to_string(); self @@ -11629,7 +11918,7 @@ impl<'a, C, NC, A> MemberGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Add user to the specified group. /// /// A builder for the *insert* method supported by a *member* resource. -/// It is not used directly, but through a `MemberMethods`. +/// It is not used directly, but through a `MemberMethods` instance. /// /// # Example /// @@ -11694,7 +11983,7 @@ impl<'a, C, NC, A> MemberInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "groupKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11751,7 +12040,7 @@ impl<'a, C, NC, A> MemberInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11767,7 +12056,6 @@ impl<'a, C, NC, A> MemberInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -11777,7 +12065,7 @@ impl<'a, C, NC, A> MemberInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11788,7 +12076,7 @@ impl<'a, C, NC, A> MemberInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11797,13 +12085,13 @@ impl<'a, C, NC, A> MemberInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11824,7 +12112,7 @@ impl<'a, C, NC, A> MemberInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the group + /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> MemberInsertCall<'a, C, NC, A> { self._group_key = new_value.to_string(); self @@ -11885,7 +12173,7 @@ impl<'a, C, NC, A> MemberInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Update membership of a user in the specified group. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *member* resource. -/// It is not used directly, but through a `MemberMethods`. +/// It is not used directly, but through a `MemberMethods` instance. /// /// # Example /// @@ -11952,7 +12240,7 @@ impl<'a, C, NC, A> MemberPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "groupKey", "memberKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12009,7 +12297,7 @@ impl<'a, C, NC, A> MemberPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12025,7 +12313,6 @@ impl<'a, C, NC, A> MemberPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -12035,7 +12322,7 @@ impl<'a, C, NC, A> MemberPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12046,7 +12333,7 @@ impl<'a, C, NC, A> MemberPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12055,13 +12342,13 @@ impl<'a, C, NC, A> MemberPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12082,7 +12369,7 @@ impl<'a, C, NC, A> MemberPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the group. If Id, it should match with id of group object + /// Email or immutable Id of the group. If Id, it should match with id of group object pub fn group_key(mut self, new_value: &str) -> MemberPatchCall<'a, C, NC, A> { self._group_key = new_value.to_string(); self @@ -12092,7 +12379,7 @@ impl<'a, C, NC, A> MemberPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user. If Id, it should match with id of member object + /// Email or immutable Id of the user. If Id, it should match with id of member object pub fn member_key(mut self, new_value: &str) -> MemberPatchCall<'a, C, NC, A> { self._member_key = new_value.to_string(); self @@ -12153,7 +12440,7 @@ impl<'a, C, NC, A> MemberPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Remove membership. /// /// A builder for the *delete* method supported by a *member* resource. -/// It is not used directly, but through a `MemberMethods`. +/// It is not used directly, but through a `MemberMethods` instance. /// /// # Example /// @@ -12213,7 +12500,7 @@ impl<'a, C, NC, A> MemberDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["groupKey", "memberKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12265,7 +12552,7 @@ impl<'a, C, NC, A> MemberDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12277,7 +12564,6 @@ impl<'a, C, NC, A> MemberDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -12287,7 +12573,7 @@ impl<'a, C, NC, A> MemberDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12298,12 +12584,12 @@ impl<'a, C, NC, A> MemberDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12315,7 +12601,7 @@ impl<'a, C, NC, A> MemberDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the group + /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> MemberDeleteCall<'a, C, NC, A> { self._group_key = new_value.to_string(); self @@ -12325,7 +12611,7 @@ impl<'a, C, NC, A> MemberDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the member + /// Email or immutable Id of the member pub fn member_key(mut self, new_value: &str) -> MemberDeleteCall<'a, C, NC, A> { self._member_key = new_value.to_string(); self @@ -12386,7 +12672,7 @@ impl<'a, C, NC, A> MemberDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Retrieve all members in a group (paginated) /// /// A builder for the *list* method supported by a *member* resource. -/// It is not used directly, but through a `MemberMethods`. +/// It is not used directly, but through a `MemberMethods` instance. /// /// # Example /// @@ -12459,7 +12745,7 @@ impl<'a, C, NC, A> MemberListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "groupKey", "roles", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12512,7 +12798,7 @@ impl<'a, C, NC, A> MemberListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12524,7 +12810,6 @@ impl<'a, C, NC, A> MemberListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -12534,7 +12819,7 @@ impl<'a, C, NC, A> MemberListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12545,7 +12830,7 @@ impl<'a, C, NC, A> MemberListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12554,13 +12839,13 @@ impl<'a, C, NC, A> MemberListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12572,7 +12857,7 @@ impl<'a, C, NC, A> MemberListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the group + /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> MemberListCall<'a, C, NC, A> { self._group_key = new_value.to_string(); self @@ -12580,7 +12865,7 @@ impl<'a, C, NC, A> MemberListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *roles* query property to the given value. /// /// - /// Comma separated role values to filter list results on. + /// Comma separated role values to filter list results on. pub fn roles(mut self, new_value: &str) -> MemberListCall<'a, C, NC, A> { self._roles = Some(new_value.to_string()); self @@ -12588,7 +12873,7 @@ impl<'a, C, NC, A> MemberListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *page token* query property to the given value. /// /// - /// Token to specify next page in the list + /// Token to specify next page in the list pub fn page_token(mut self, new_value: &str) -> MemberListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -12596,7 +12881,7 @@ impl<'a, C, NC, A> MemberListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. Default is 200 + /// Maximum number of results to return. Default is 200 pub fn max_results(mut self, new_value: i32) -> MemberListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -12657,7 +12942,7 @@ impl<'a, C, NC, A> MemberListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Retrieves a list of notifications. /// /// A builder for the *list* method supported by a *notification* resource. -/// It is not used directly, but through a `NotificationMethods`. +/// It is not used directly, but through a `NotificationMethods` instance. /// /// # Example /// @@ -12730,7 +13015,7 @@ impl<'a, C, NC, A> NotificationListCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "customer", "pageToken", "maxResults", "language"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12783,7 +13068,7 @@ impl<'a, C, NC, A> NotificationListCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12795,7 +13080,6 @@ impl<'a, C, NC, A> NotificationListCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -12805,7 +13089,7 @@ impl<'a, C, NC, A> NotificationListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12816,7 +13100,7 @@ impl<'a, C, NC, A> NotificationListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12825,13 +13109,13 @@ impl<'a, C, NC, A> NotificationListCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12843,7 +13127,7 @@ impl<'a, C, NC, A> NotificationListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The unique ID for the customer's Google account. + /// The unique ID for the customer's Google account. pub fn customer(mut self, new_value: &str) -> NotificationListCall<'a, C, NC, A> { self._customer = new_value.to_string(); self @@ -12851,7 +13135,7 @@ impl<'a, C, NC, A> NotificationListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *page token* query property to the given value. /// /// - /// The token to specify the page of results to retrieve. + /// The token to specify the page of results to retrieve. pub fn page_token(mut self, new_value: &str) -> NotificationListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -12859,7 +13143,7 @@ impl<'a, C, NC, A> NotificationListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of notifications to return per page. The default is 100. + /// Maximum number of notifications to return per page. The default is 100. pub fn max_results(mut self, new_value: u32) -> NotificationListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -12867,7 +13151,7 @@ impl<'a, C, NC, A> NotificationListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *language* query property to the given value. /// /// - /// The ISO 639-1 code of the language notifications are returned in. The default is English (en). + /// The ISO 639-1 code of the language notifications are returned in. The default is English (en). pub fn language(mut self, new_value: &str) -> NotificationListCall<'a, C, NC, A> { self._language = Some(new_value.to_string()); self @@ -12928,7 +13212,7 @@ impl<'a, C, NC, A> NotificationListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Deletes a notification /// /// A builder for the *delete* method supported by a *notification* resource. -/// It is not used directly, but through a `NotificationMethods`. +/// It is not used directly, but through a `NotificationMethods` instance. /// /// # Example /// @@ -12988,7 +13272,7 @@ impl<'a, C, NC, A> NotificationDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["customer", "notificationId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13040,7 +13324,7 @@ impl<'a, C, NC, A> NotificationDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13052,7 +13336,6 @@ impl<'a, C, NC, A> NotificationDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -13062,7 +13345,7 @@ impl<'a, C, NC, A> NotificationDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13073,12 +13356,12 @@ impl<'a, C, NC, A> NotificationDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13090,7 +13373,7 @@ impl<'a, C, NC, A> NotificationDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource. + /// The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource. pub fn customer(mut self, new_value: &str) -> NotificationDeleteCall<'a, C, NC, A> { self._customer = new_value.to_string(); self @@ -13100,7 +13383,7 @@ impl<'a, C, NC, A> NotificationDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The unique ID of the notification. + /// The unique ID of the notification. pub fn notification_id(mut self, new_value: &str) -> NotificationDeleteCall<'a, C, NC, A> { self._notification_id = new_value.to_string(); self @@ -13161,7 +13444,7 @@ impl<'a, C, NC, A> NotificationDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne /// Updates a notification. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *notification* resource. -/// It is not used directly, but through a `NotificationMethods`. +/// It is not used directly, but through a `NotificationMethods` instance. /// /// # Example /// @@ -13228,7 +13511,7 @@ impl<'a, C, NC, A> NotificationPatchCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "customer", "notificationId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13285,7 +13568,7 @@ impl<'a, C, NC, A> NotificationPatchCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13301,7 +13584,6 @@ impl<'a, C, NC, A> NotificationPatchCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -13311,7 +13593,7 @@ impl<'a, C, NC, A> NotificationPatchCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13322,7 +13604,7 @@ impl<'a, C, NC, A> NotificationPatchCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13331,13 +13613,13 @@ impl<'a, C, NC, A> NotificationPatchCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13358,7 +13640,7 @@ impl<'a, C, NC, A> NotificationPatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The unique ID for the customer's Google account. + /// The unique ID for the customer's Google account. pub fn customer(mut self, new_value: &str) -> NotificationPatchCall<'a, C, NC, A> { self._customer = new_value.to_string(); self @@ -13368,7 +13650,7 @@ impl<'a, C, NC, A> NotificationPatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The unique ID of the notification. + /// The unique ID of the notification. pub fn notification_id(mut self, new_value: &str) -> NotificationPatchCall<'a, C, NC, A> { self._notification_id = new_value.to_string(); self @@ -13429,7 +13711,7 @@ impl<'a, C, NC, A> NotificationPatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Updates a notification. /// /// A builder for the *update* method supported by a *notification* resource. -/// It is not used directly, but through a `NotificationMethods`. +/// It is not used directly, but through a `NotificationMethods` instance. /// /// # Example /// @@ -13496,7 +13778,7 @@ impl<'a, C, NC, A> NotificationUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "customer", "notificationId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13553,7 +13835,7 @@ impl<'a, C, NC, A> NotificationUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13569,7 +13851,6 @@ impl<'a, C, NC, A> NotificationUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -13579,7 +13860,7 @@ impl<'a, C, NC, A> NotificationUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13590,7 +13871,7 @@ impl<'a, C, NC, A> NotificationUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13599,13 +13880,13 @@ impl<'a, C, NC, A> NotificationUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13626,7 +13907,7 @@ impl<'a, C, NC, A> NotificationUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The unique ID for the customer's Google account. + /// The unique ID for the customer's Google account. pub fn customer(mut self, new_value: &str) -> NotificationUpdateCall<'a, C, NC, A> { self._customer = new_value.to_string(); self @@ -13636,7 +13917,7 @@ impl<'a, C, NC, A> NotificationUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The unique ID of the notification. + /// The unique ID of the notification. pub fn notification_id(mut self, new_value: &str) -> NotificationUpdateCall<'a, C, NC, A> { self._notification_id = new_value.to_string(); self @@ -13697,7 +13978,7 @@ impl<'a, C, NC, A> NotificationUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne /// Retrieves a notification. /// /// A builder for the *get* method supported by a *notification* resource. -/// It is not used directly, but through a `NotificationMethods`. +/// It is not used directly, but through a `NotificationMethods` instance. /// /// # Example /// @@ -13757,7 +14038,7 @@ impl<'a, C, NC, A> NotificationGetCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "customer", "notificationId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13810,7 +14091,7 @@ impl<'a, C, NC, A> NotificationGetCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13822,7 +14103,6 @@ impl<'a, C, NC, A> NotificationGetCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -13832,7 +14112,7 @@ impl<'a, C, NC, A> NotificationGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13843,7 +14123,7 @@ impl<'a, C, NC, A> NotificationGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13852,13 +14132,13 @@ impl<'a, C, NC, A> NotificationGetCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13870,7 +14150,7 @@ impl<'a, C, NC, A> NotificationGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource. + /// The unique ID for the customer's Google account. The customerId is also returned as part of the Users resource. pub fn customer(mut self, new_value: &str) -> NotificationGetCall<'a, C, NC, A> { self._customer = new_value.to_string(); self @@ -13880,7 +14160,7 @@ impl<'a, C, NC, A> NotificationGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The unique ID of the notification. + /// The unique ID of the notification. pub fn notification_id(mut self, new_value: &str) -> NotificationGetCall<'a, C, NC, A> { self._notification_id = new_value.to_string(); self @@ -13941,7 +14221,7 @@ impl<'a, C, NC, A> NotificationGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Retrieve all Chrome OS Devices of a customer (paginated) /// /// A builder for the *list* method supported by a *chromeosdevice* resource. -/// It is not used directly, but through a `ChromeosdeviceMethods`. +/// It is not used directly, but through a `ChromeosdeviceMethods` instance. /// /// # Example /// @@ -14029,7 +14309,7 @@ impl<'a, C, NC, A> ChromeosdeviceListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "customerId", "sortOrder", "query", "projection", "pageToken", "orderBy", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14082,7 +14362,7 @@ impl<'a, C, NC, A> ChromeosdeviceListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14094,7 +14374,6 @@ impl<'a, C, NC, A> ChromeosdeviceListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -14104,7 +14383,7 @@ impl<'a, C, NC, A> ChromeosdeviceListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14115,7 +14394,7 @@ impl<'a, C, NC, A> ChromeosdeviceListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14124,13 +14403,13 @@ impl<'a, C, NC, A> ChromeosdeviceListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14142,7 +14421,7 @@ impl<'a, C, NC, A> ChromeosdeviceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> ChromeosdeviceListCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -14150,7 +14429,7 @@ impl<'a, C, NC, A> ChromeosdeviceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *sort order* query property to the given value. /// /// - /// Whether to return results in ascending or descending order. Only of use when orderBy is also used + /// Whether to return results in ascending or descending order. Only of use when orderBy is also used pub fn sort_order(mut self, new_value: &str) -> ChromeosdeviceListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -14158,7 +14437,7 @@ impl<'a, C, NC, A> ChromeosdeviceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *query* query property to the given value. /// /// - /// Search string in the format given at http://support.google.com/chromeos/a/bin/answer.py?hl=en&answer=1698333 + /// Search string in the format given at http://support.google.com/chromeos/a/bin/answer.py?hl=en&answer=1698333 pub fn query(mut self, new_value: &str) -> ChromeosdeviceListCall<'a, C, NC, A> { self._query = Some(new_value.to_string()); self @@ -14166,7 +14445,7 @@ impl<'a, C, NC, A> ChromeosdeviceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *projection* query property to the given value. /// /// - /// Restrict information returned to a set of selected fields. + /// Restrict information returned to a set of selected fields. pub fn projection(mut self, new_value: &str) -> ChromeosdeviceListCall<'a, C, NC, A> { self._projection = Some(new_value.to_string()); self @@ -14174,7 +14453,7 @@ impl<'a, C, NC, A> ChromeosdeviceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *page token* query property to the given value. /// /// - /// Token to specify next page in the list + /// Token to specify next page in the list pub fn page_token(mut self, new_value: &str) -> ChromeosdeviceListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -14182,7 +14461,7 @@ impl<'a, C, NC, A> ChromeosdeviceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *order by* query property to the given value. /// /// - /// Column to use for sorting results + /// Column to use for sorting results pub fn order_by(mut self, new_value: &str) -> ChromeosdeviceListCall<'a, C, NC, A> { self._order_by = Some(new_value.to_string()); self @@ -14190,7 +14469,7 @@ impl<'a, C, NC, A> ChromeosdeviceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. Default is 100 + /// Maximum number of results to return. Default is 100 pub fn max_results(mut self, new_value: i32) -> ChromeosdeviceListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -14251,7 +14530,7 @@ impl<'a, C, NC, A> ChromeosdeviceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Update Chrome OS Device. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *chromeosdevice* resource. -/// It is not used directly, but through a `ChromeosdeviceMethods`. +/// It is not used directly, but through a `ChromeosdeviceMethods` instance. /// /// # Example /// @@ -14323,7 +14602,7 @@ impl<'a, C, NC, A> ChromeosdevicePatchCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "customerId", "deviceId", "projection"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14380,7 +14659,7 @@ impl<'a, C, NC, A> ChromeosdevicePatchCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14396,7 +14675,6 @@ impl<'a, C, NC, A> ChromeosdevicePatchCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -14406,7 +14684,7 @@ impl<'a, C, NC, A> ChromeosdevicePatchCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14417,7 +14695,7 @@ impl<'a, C, NC, A> ChromeosdevicePatchCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14426,13 +14704,13 @@ impl<'a, C, NC, A> ChromeosdevicePatchCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14453,7 +14731,7 @@ impl<'a, C, NC, A> ChromeosdevicePatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> ChromeosdevicePatchCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -14463,7 +14741,7 @@ impl<'a, C, NC, A> ChromeosdevicePatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of Chrome OS Device + /// Immutable id of Chrome OS Device pub fn device_id(mut self, new_value: &str) -> ChromeosdevicePatchCall<'a, C, NC, A> { self._device_id = new_value.to_string(); self @@ -14471,7 +14749,7 @@ impl<'a, C, NC, A> ChromeosdevicePatchCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *projection* query property to the given value. /// /// - /// Restrict information returned to a set of selected fields. + /// Restrict information returned to a set of selected fields. pub fn projection(mut self, new_value: &str) -> ChromeosdevicePatchCall<'a, C, NC, A> { self._projection = Some(new_value.to_string()); self @@ -14532,7 +14810,7 @@ impl<'a, C, NC, A> ChromeosdevicePatchCall<'a, C, NC, A> where NC: hyper::net::N /// Retrieve Chrome OS Device /// /// A builder for the *get* method supported by a *chromeosdevice* resource. -/// It is not used directly, but through a `ChromeosdeviceMethods`. +/// It is not used directly, but through a `ChromeosdeviceMethods` instance. /// /// # Example /// @@ -14597,7 +14875,7 @@ impl<'a, C, NC, A> ChromeosdeviceGetCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "customerId", "deviceId", "projection"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14650,7 +14928,7 @@ impl<'a, C, NC, A> ChromeosdeviceGetCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14662,7 +14940,6 @@ impl<'a, C, NC, A> ChromeosdeviceGetCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -14672,7 +14949,7 @@ impl<'a, C, NC, A> ChromeosdeviceGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14683,7 +14960,7 @@ impl<'a, C, NC, A> ChromeosdeviceGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14692,13 +14969,13 @@ impl<'a, C, NC, A> ChromeosdeviceGetCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14710,7 +14987,7 @@ impl<'a, C, NC, A> ChromeosdeviceGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> ChromeosdeviceGetCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -14720,7 +14997,7 @@ impl<'a, C, NC, A> ChromeosdeviceGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of Chrome OS Device + /// Immutable id of Chrome OS Device pub fn device_id(mut self, new_value: &str) -> ChromeosdeviceGetCall<'a, C, NC, A> { self._device_id = new_value.to_string(); self @@ -14728,7 +15005,7 @@ impl<'a, C, NC, A> ChromeosdeviceGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *projection* query property to the given value. /// /// - /// Restrict information returned to a set of selected fields. + /// Restrict information returned to a set of selected fields. pub fn projection(mut self, new_value: &str) -> ChromeosdeviceGetCall<'a, C, NC, A> { self._projection = Some(new_value.to_string()); self @@ -14789,7 +15066,7 @@ impl<'a, C, NC, A> ChromeosdeviceGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Update Chrome OS Device /// /// A builder for the *update* method supported by a *chromeosdevice* resource. -/// It is not used directly, but through a `ChromeosdeviceMethods`. +/// It is not used directly, but through a `ChromeosdeviceMethods` instance. /// /// # Example /// @@ -14861,7 +15138,7 @@ impl<'a, C, NC, A> ChromeosdeviceUpdateCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "customerId", "deviceId", "projection"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14918,7 +15195,7 @@ impl<'a, C, NC, A> ChromeosdeviceUpdateCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14934,7 +15211,6 @@ impl<'a, C, NC, A> ChromeosdeviceUpdateCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -14944,7 +15220,7 @@ impl<'a, C, NC, A> ChromeosdeviceUpdateCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14955,7 +15231,7 @@ impl<'a, C, NC, A> ChromeosdeviceUpdateCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14964,13 +15240,13 @@ impl<'a, C, NC, A> ChromeosdeviceUpdateCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14991,7 +15267,7 @@ impl<'a, C, NC, A> ChromeosdeviceUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> ChromeosdeviceUpdateCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -15001,7 +15277,7 @@ impl<'a, C, NC, A> ChromeosdeviceUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of Chrome OS Device + /// Immutable id of Chrome OS Device pub fn device_id(mut self, new_value: &str) -> ChromeosdeviceUpdateCall<'a, C, NC, A> { self._device_id = new_value.to_string(); self @@ -15009,7 +15285,7 @@ impl<'a, C, NC, A> ChromeosdeviceUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *projection* query property to the given value. /// /// - /// Restrict information returned to a set of selected fields. + /// Restrict information returned to a set of selected fields. pub fn projection(mut self, new_value: &str) -> ChromeosdeviceUpdateCall<'a, C, NC, A> { self._projection = Some(new_value.to_string()); self @@ -15070,7 +15346,7 @@ impl<'a, C, NC, A> ChromeosdeviceUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Generate new backup verification codes for the user. /// /// A builder for the *generate* method supported by a *verificationCode* resource. -/// It is not used directly, but through a `VerificationCodeMethods`. +/// It is not used directly, but through a `VerificationCodeMethods` instance. /// /// # Example /// @@ -15128,7 +15404,7 @@ impl<'a, C, NC, A> VerificationCodeGenerateCall<'a, C, NC, A> where NC: hyper::n for &field in ["userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15180,7 +15456,7 @@ impl<'a, C, NC, A> VerificationCodeGenerateCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15192,7 +15468,6 @@ impl<'a, C, NC, A> VerificationCodeGenerateCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -15202,7 +15477,7 @@ impl<'a, C, NC, A> VerificationCodeGenerateCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15213,12 +15488,12 @@ impl<'a, C, NC, A> VerificationCodeGenerateCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15230,7 +15505,7 @@ impl<'a, C, NC, A> VerificationCodeGenerateCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user + /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> VerificationCodeGenerateCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -15291,7 +15566,7 @@ impl<'a, C, NC, A> VerificationCodeGenerateCall<'a, C, NC, A> where NC: hyper::n /// Invalidate the current backup verification codes for the user. /// /// A builder for the *invalidate* method supported by a *verificationCode* resource. -/// It is not used directly, but through a `VerificationCodeMethods`. +/// It is not used directly, but through a `VerificationCodeMethods` instance. /// /// # Example /// @@ -15349,7 +15624,7 @@ impl<'a, C, NC, A> VerificationCodeInvalidateCall<'a, C, NC, A> where NC: hyper: for &field in ["userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15401,7 +15676,7 @@ impl<'a, C, NC, A> VerificationCodeInvalidateCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15413,7 +15688,6 @@ impl<'a, C, NC, A> VerificationCodeInvalidateCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -15423,7 +15697,7 @@ impl<'a, C, NC, A> VerificationCodeInvalidateCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15434,12 +15708,12 @@ impl<'a, C, NC, A> VerificationCodeInvalidateCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15451,7 +15725,7 @@ impl<'a, C, NC, A> VerificationCodeInvalidateCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the user + /// Email or immutable Id of the user pub fn user_key(mut self, new_value: &str) -> VerificationCodeInvalidateCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -15512,7 +15786,7 @@ impl<'a, C, NC, A> VerificationCodeInvalidateCall<'a, C, NC, A> where NC: hyper: /// Returns the current set of valid backup verification codes for the specified user. /// /// A builder for the *list* method supported by a *verificationCode* resource. -/// It is not used directly, but through a `VerificationCodeMethods`. +/// It is not used directly, but through a `VerificationCodeMethods` instance. /// /// # Example /// @@ -15570,7 +15844,7 @@ impl<'a, C, NC, A> VerificationCodeListCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15623,7 +15897,7 @@ impl<'a, C, NC, A> VerificationCodeListCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15635,7 +15909,6 @@ impl<'a, C, NC, A> VerificationCodeListCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -15645,7 +15918,7 @@ impl<'a, C, NC, A> VerificationCodeListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15656,7 +15929,7 @@ impl<'a, C, NC, A> VerificationCodeListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15665,13 +15938,13 @@ impl<'a, C, NC, A> VerificationCodeListCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15683,7 +15956,7 @@ impl<'a, C, NC, A> VerificationCodeListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn user_key(mut self, new_value: &str) -> VerificationCodeListCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -15744,7 +16017,7 @@ impl<'a, C, NC, A> VerificationCodeListCall<'a, C, NC, A> where NC: hyper::net:: /// Retrieve Group /// /// A builder for the *get* method supported by a *group* resource. -/// It is not used directly, but through a `GroupMethods`. +/// It is not used directly, but through a `GroupMethods` instance. /// /// # Example /// @@ -15802,7 +16075,7 @@ impl<'a, C, NC, A> GroupGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "groupKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15855,7 +16128,7 @@ impl<'a, C, NC, A> GroupGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15867,7 +16140,6 @@ impl<'a, C, NC, A> GroupGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -15877,7 +16149,7 @@ impl<'a, C, NC, A> GroupGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15888,7 +16160,7 @@ impl<'a, C, NC, A> GroupGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15897,13 +16169,13 @@ impl<'a, C, NC, A> GroupGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15915,7 +16187,7 @@ impl<'a, C, NC, A> GroupGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the group + /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> GroupGetCall<'a, C, NC, A> { self._group_key = new_value.to_string(); self @@ -15976,7 +16248,7 @@ impl<'a, C, NC, A> GroupGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Retrieve all groups in a domain (paginated) /// /// A builder for the *list* method supported by a *group* resource. -/// It is not used directly, but through a `GroupMethods`. +/// It is not used directly, but through a `GroupMethods` instance. /// /// # Example /// @@ -16057,7 +16329,7 @@ impl<'a, C, NC, A> GroupListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "userKey", "pageToken", "maxResults", "domain", "customer"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16086,7 +16358,7 @@ impl<'a, C, NC, A> GroupListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16098,7 +16370,6 @@ impl<'a, C, NC, A> GroupListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -16108,7 +16379,7 @@ impl<'a, C, NC, A> GroupListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16119,7 +16390,7 @@ impl<'a, C, NC, A> GroupListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16128,13 +16399,13 @@ impl<'a, C, NC, A> GroupListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16144,7 +16415,7 @@ impl<'a, C, NC, A> GroupListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *user key* query property to the given value. /// /// - /// Email or immutable Id of the user if only those groups are to be listed, the given user is a member of. If Id, it should match with id of user object + /// Email or immutable Id of the user if only those groups are to be listed, the given user is a member of. If Id, it should match with id of user object pub fn user_key(mut self, new_value: &str) -> GroupListCall<'a, C, NC, A> { self._user_key = Some(new_value.to_string()); self @@ -16152,7 +16423,7 @@ impl<'a, C, NC, A> GroupListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *page token* query property to the given value. /// /// - /// Token to specify next page in the list + /// Token to specify next page in the list pub fn page_token(mut self, new_value: &str) -> GroupListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -16160,7 +16431,7 @@ impl<'a, C, NC, A> GroupListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. Default is 200 + /// Maximum number of results to return. Default is 200 pub fn max_results(mut self, new_value: i32) -> GroupListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -16168,7 +16439,7 @@ impl<'a, C, NC, A> GroupListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *domain* query property to the given value. /// /// - /// Name of the domain. Fill this field to get groups from only this domain. To return all groups in a multi-domain fill customer field instead. + /// Name of the domain. Fill this field to get groups from only this domain. To return all groups in a multi-domain fill customer field instead. pub fn domain(mut self, new_value: &str) -> GroupListCall<'a, C, NC, A> { self._domain = Some(new_value.to_string()); self @@ -16176,7 +16447,7 @@ impl<'a, C, NC, A> GroupListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *customer* query property to the given value. /// /// - /// Immutable id of the Google Apps account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain. + /// Immutable id of the Google Apps account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain. pub fn customer(mut self, new_value: &str) -> GroupListCall<'a, C, NC, A> { self._customer = Some(new_value.to_string()); self @@ -16237,7 +16508,7 @@ impl<'a, C, NC, A> GroupListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// List all aliases for a group /// /// A builder for the *aliases.list* method supported by a *group* resource. -/// It is not used directly, but through a `GroupMethods`. +/// It is not used directly, but through a `GroupMethods` instance. /// /// # Example /// @@ -16295,7 +16566,7 @@ impl<'a, C, NC, A> GroupAliaseListCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "groupKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16348,7 +16619,7 @@ impl<'a, C, NC, A> GroupAliaseListCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16360,7 +16631,6 @@ impl<'a, C, NC, A> GroupAliaseListCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -16370,7 +16640,7 @@ impl<'a, C, NC, A> GroupAliaseListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16381,7 +16651,7 @@ impl<'a, C, NC, A> GroupAliaseListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16390,13 +16660,13 @@ impl<'a, C, NC, A> GroupAliaseListCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16408,7 +16678,7 @@ impl<'a, C, NC, A> GroupAliaseListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the group + /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> GroupAliaseListCall<'a, C, NC, A> { self._group_key = new_value.to_string(); self @@ -16469,7 +16739,7 @@ impl<'a, C, NC, A> GroupAliaseListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Update Group. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *group* resource. -/// It is not used directly, but through a `GroupMethods`. +/// It is not used directly, but through a `GroupMethods` instance. /// /// # Example /// @@ -16534,7 +16804,7 @@ impl<'a, C, NC, A> GroupPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "groupKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16591,7 +16861,7 @@ impl<'a, C, NC, A> GroupPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16607,7 +16877,6 @@ impl<'a, C, NC, A> GroupPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -16617,7 +16886,7 @@ impl<'a, C, NC, A> GroupPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16628,7 +16897,7 @@ impl<'a, C, NC, A> GroupPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16637,13 +16906,13 @@ impl<'a, C, NC, A> GroupPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16664,7 +16933,7 @@ impl<'a, C, NC, A> GroupPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the group. If Id, it should match with id of group object + /// Email or immutable Id of the group. If Id, it should match with id of group object pub fn group_key(mut self, new_value: &str) -> GroupPatchCall<'a, C, NC, A> { self._group_key = new_value.to_string(); self @@ -16725,7 +16994,7 @@ impl<'a, C, NC, A> GroupPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Update Group /// /// A builder for the *update* method supported by a *group* resource. -/// It is not used directly, but through a `GroupMethods`. +/// It is not used directly, but through a `GroupMethods` instance. /// /// # Example /// @@ -16790,7 +17059,7 @@ impl<'a, C, NC, A> GroupUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "groupKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16847,7 +17116,7 @@ impl<'a, C, NC, A> GroupUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16863,7 +17132,6 @@ impl<'a, C, NC, A> GroupUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -16873,7 +17141,7 @@ impl<'a, C, NC, A> GroupUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16884,7 +17152,7 @@ impl<'a, C, NC, A> GroupUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16893,13 +17161,13 @@ impl<'a, C, NC, A> GroupUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16920,7 +17188,7 @@ impl<'a, C, NC, A> GroupUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the group. If Id, it should match with id of group object + /// Email or immutable Id of the group. If Id, it should match with id of group object pub fn group_key(mut self, new_value: &str) -> GroupUpdateCall<'a, C, NC, A> { self._group_key = new_value.to_string(); self @@ -16981,7 +17249,7 @@ impl<'a, C, NC, A> GroupUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Delete Group /// /// A builder for the *delete* method supported by a *group* resource. -/// It is not used directly, but through a `GroupMethods`. +/// It is not used directly, but through a `GroupMethods` instance. /// /// # Example /// @@ -17039,7 +17307,7 @@ impl<'a, C, NC, A> GroupDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["groupKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17091,7 +17359,7 @@ impl<'a, C, NC, A> GroupDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17103,7 +17371,6 @@ impl<'a, C, NC, A> GroupDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -17113,7 +17380,7 @@ impl<'a, C, NC, A> GroupDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17124,12 +17391,12 @@ impl<'a, C, NC, A> GroupDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -17141,7 +17408,7 @@ impl<'a, C, NC, A> GroupDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the group + /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> GroupDeleteCall<'a, C, NC, A> { self._group_key = new_value.to_string(); self @@ -17202,7 +17469,7 @@ impl<'a, C, NC, A> GroupDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Add a alias for the group /// /// A builder for the *aliases.insert* method supported by a *group* resource. -/// It is not used directly, but through a `GroupMethods`. +/// It is not used directly, but through a `GroupMethods` instance. /// /// # Example /// @@ -17267,7 +17534,7 @@ impl<'a, C, NC, A> GroupAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "groupKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17324,7 +17591,7 @@ impl<'a, C, NC, A> GroupAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17340,7 +17607,6 @@ impl<'a, C, NC, A> GroupAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -17350,7 +17616,7 @@ impl<'a, C, NC, A> GroupAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17361,7 +17627,7 @@ impl<'a, C, NC, A> GroupAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -17370,13 +17636,13 @@ impl<'a, C, NC, A> GroupAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -17397,7 +17663,7 @@ impl<'a, C, NC, A> GroupAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the group + /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> GroupAliaseInsertCall<'a, C, NC, A> { self._group_key = new_value.to_string(); self @@ -17458,7 +17724,7 @@ impl<'a, C, NC, A> GroupAliaseInsertCall<'a, C, NC, A> where NC: hyper::net::Net /// Remove a alias for the group /// /// A builder for the *aliases.delete* method supported by a *group* resource. -/// It is not used directly, but through a `GroupMethods`. +/// It is not used directly, but through a `GroupMethods` instance. /// /// # Example /// @@ -17518,7 +17784,7 @@ impl<'a, C, NC, A> GroupAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["groupKey", "alias"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17570,7 +17836,7 @@ impl<'a, C, NC, A> GroupAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17582,7 +17848,6 @@ impl<'a, C, NC, A> GroupAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -17592,7 +17857,7 @@ impl<'a, C, NC, A> GroupAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17603,12 +17868,12 @@ impl<'a, C, NC, A> GroupAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -17620,7 +17885,7 @@ impl<'a, C, NC, A> GroupAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Email or immutable Id of the group + /// Email or immutable Id of the group pub fn group_key(mut self, new_value: &str) -> GroupAliaseDeleteCall<'a, C, NC, A> { self._group_key = new_value.to_string(); self @@ -17630,7 +17895,7 @@ impl<'a, C, NC, A> GroupAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The alias to be removed + /// The alias to be removed pub fn alias(mut self, new_value: &str) -> GroupAliaseDeleteCall<'a, C, NC, A> { self._alias = new_value.to_string(); self @@ -17691,7 +17956,7 @@ impl<'a, C, NC, A> GroupAliaseDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Create Group /// /// A builder for the *insert* method supported by a *group* resource. -/// It is not used directly, but through a `GroupMethods`. +/// It is not used directly, but through a `GroupMethods` instance. /// /// # Example /// @@ -17754,7 +18019,7 @@ impl<'a, C, NC, A> GroupInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17787,7 +18052,7 @@ impl<'a, C, NC, A> GroupInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17803,7 +18068,6 @@ impl<'a, C, NC, A> GroupInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -17813,7 +18077,7 @@ impl<'a, C, NC, A> GroupInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17824,7 +18088,7 @@ impl<'a, C, NC, A> GroupInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -17833,13 +18097,13 @@ impl<'a, C, NC, A> GroupInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -17911,7 +18175,7 @@ impl<'a, C, NC, A> GroupInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Delete an ASP issued by a user. /// /// A builder for the *delete* method supported by a *asp* resource. -/// It is not used directly, but through a `AspMethods`. +/// It is not used directly, but through a `AspMethods` instance. /// /// # Example /// @@ -17971,7 +18235,7 @@ impl<'a, C, NC, A> AspDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["userKey", "codeId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18023,7 +18287,7 @@ impl<'a, C, NC, A> AspDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18035,7 +18299,6 @@ impl<'a, C, NC, A> AspDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -18045,7 +18308,7 @@ impl<'a, C, NC, A> AspDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18056,12 +18319,12 @@ impl<'a, C, NC, A> AspDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18073,7 +18336,7 @@ impl<'a, C, NC, A> AspDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn user_key(mut self, new_value: &str) -> AspDeleteCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -18083,7 +18346,7 @@ impl<'a, C, NC, A> AspDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The unique ID of the ASP to be deleted. + /// The unique ID of the ASP to be deleted. pub fn code_id(mut self, new_value: i32) -> AspDeleteCall<'a, C, NC, A> { self._code_id = new_value; self @@ -18144,7 +18407,7 @@ impl<'a, C, NC, A> AspDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// List the ASPs issued by a user. /// /// A builder for the *list* method supported by a *asp* resource. -/// It is not used directly, but through a `AspMethods`. +/// It is not used directly, but through a `AspMethods` instance. /// /// # Example /// @@ -18202,7 +18465,7 @@ impl<'a, C, NC, A> AspListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18255,7 +18518,7 @@ impl<'a, C, NC, A> AspListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18267,7 +18530,6 @@ impl<'a, C, NC, A> AspListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -18277,7 +18539,7 @@ impl<'a, C, NC, A> AspListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18288,7 +18550,7 @@ impl<'a, C, NC, A> AspListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -18297,13 +18559,13 @@ impl<'a, C, NC, A> AspListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18315,7 +18577,7 @@ impl<'a, C, NC, A> AspListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn user_key(mut self, new_value: &str) -> AspListCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -18376,7 +18638,7 @@ impl<'a, C, NC, A> AspListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Get information about an ASP issued by a user. /// /// A builder for the *get* method supported by a *asp* resource. -/// It is not used directly, but through a `AspMethods`. +/// It is not used directly, but through a `AspMethods` instance. /// /// # Example /// @@ -18436,7 +18698,7 @@ impl<'a, C, NC, A> AspGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect for &field in ["alt", "userKey", "codeId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18489,7 +18751,7 @@ impl<'a, C, NC, A> AspGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18501,7 +18763,6 @@ impl<'a, C, NC, A> AspGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect dlg.pre_request(); req.send() - }; match req_result { @@ -18511,7 +18772,7 @@ impl<'a, C, NC, A> AspGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18522,7 +18783,7 @@ impl<'a, C, NC, A> AspGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -18531,13 +18792,13 @@ impl<'a, C, NC, A> AspGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18549,7 +18810,7 @@ impl<'a, C, NC, A> AspGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. + /// Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. pub fn user_key(mut self, new_value: &str) -> AspGetCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -18559,7 +18820,7 @@ impl<'a, C, NC, A> AspGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The unique ID of the ASP. + /// The unique ID of the ASP. pub fn code_id(mut self, new_value: i32) -> AspGetCall<'a, C, NC, A> { self._code_id = new_value; self @@ -18620,7 +18881,7 @@ impl<'a, C, NC, A> AspGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Retrieve all schemas for a customer /// /// A builder for the *list* method supported by a *schema* resource. -/// It is not used directly, but through a `SchemaMethods`. +/// It is not used directly, but through a `SchemaMethods` instance. /// /// # Example /// @@ -18678,7 +18939,7 @@ impl<'a, C, NC, A> SchemaListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "customerId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18731,7 +18992,7 @@ impl<'a, C, NC, A> SchemaListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18743,7 +19004,6 @@ impl<'a, C, NC, A> SchemaListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -18753,7 +19013,7 @@ impl<'a, C, NC, A> SchemaListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18764,7 +19024,7 @@ impl<'a, C, NC, A> SchemaListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -18773,13 +19033,13 @@ impl<'a, C, NC, A> SchemaListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18791,7 +19051,7 @@ impl<'a, C, NC, A> SchemaListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> SchemaListCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -18852,7 +19112,7 @@ impl<'a, C, NC, A> SchemaListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Retrieve schema /// /// A builder for the *get* method supported by a *schema* resource. -/// It is not used directly, but through a `SchemaMethods`. +/// It is not used directly, but through a `SchemaMethods` instance. /// /// # Example /// @@ -18912,7 +19172,7 @@ impl<'a, C, NC, A> SchemaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "customerId", "schemaKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18965,7 +19225,7 @@ impl<'a, C, NC, A> SchemaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18977,7 +19237,6 @@ impl<'a, C, NC, A> SchemaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -18987,7 +19246,7 @@ impl<'a, C, NC, A> SchemaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18998,7 +19257,7 @@ impl<'a, C, NC, A> SchemaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19007,13 +19266,13 @@ impl<'a, C, NC, A> SchemaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19025,7 +19284,7 @@ impl<'a, C, NC, A> SchemaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> SchemaGetCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -19035,7 +19294,7 @@ impl<'a, C, NC, A> SchemaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name or immutable Id of the schema + /// Name or immutable Id of the schema pub fn schema_key(mut self, new_value: &str) -> SchemaGetCall<'a, C, NC, A> { self._schema_key = new_value.to_string(); self @@ -19096,7 +19355,7 @@ impl<'a, C, NC, A> SchemaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Update schema. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *schema* resource. -/// It is not used directly, but through a `SchemaMethods`. +/// It is not used directly, but through a `SchemaMethods` instance. /// /// # Example /// @@ -19163,7 +19422,7 @@ impl<'a, C, NC, A> SchemaPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "customerId", "schemaKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19220,7 +19479,7 @@ impl<'a, C, NC, A> SchemaPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19236,7 +19495,6 @@ impl<'a, C, NC, A> SchemaPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -19246,7 +19504,7 @@ impl<'a, C, NC, A> SchemaPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19257,7 +19515,7 @@ impl<'a, C, NC, A> SchemaPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19266,13 +19524,13 @@ impl<'a, C, NC, A> SchemaPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19293,7 +19551,7 @@ impl<'a, C, NC, A> SchemaPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> SchemaPatchCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -19303,7 +19561,7 @@ impl<'a, C, NC, A> SchemaPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name or immutable Id of the schema. + /// Name or immutable Id of the schema. pub fn schema_key(mut self, new_value: &str) -> SchemaPatchCall<'a, C, NC, A> { self._schema_key = new_value.to_string(); self @@ -19364,7 +19622,7 @@ impl<'a, C, NC, A> SchemaPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Create schema. /// /// A builder for the *insert* method supported by a *schema* resource. -/// It is not used directly, but through a `SchemaMethods`. +/// It is not used directly, but through a `SchemaMethods` instance. /// /// # Example /// @@ -19429,7 +19687,7 @@ impl<'a, C, NC, A> SchemaInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "customerId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19486,7 +19744,7 @@ impl<'a, C, NC, A> SchemaInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19502,7 +19760,6 @@ impl<'a, C, NC, A> SchemaInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -19512,7 +19769,7 @@ impl<'a, C, NC, A> SchemaInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19523,7 +19780,7 @@ impl<'a, C, NC, A> SchemaInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19532,13 +19789,13 @@ impl<'a, C, NC, A> SchemaInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19559,7 +19816,7 @@ impl<'a, C, NC, A> SchemaInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> SchemaInsertCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -19620,7 +19877,7 @@ impl<'a, C, NC, A> SchemaInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Delete schema /// /// A builder for the *delete* method supported by a *schema* resource. -/// It is not used directly, but through a `SchemaMethods`. +/// It is not used directly, but through a `SchemaMethods` instance. /// /// # Example /// @@ -19680,7 +19937,7 @@ impl<'a, C, NC, A> SchemaDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["customerId", "schemaKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19732,7 +19989,7 @@ impl<'a, C, NC, A> SchemaDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19744,7 +20001,6 @@ impl<'a, C, NC, A> SchemaDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -19754,7 +20010,7 @@ impl<'a, C, NC, A> SchemaDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19765,12 +20021,12 @@ impl<'a, C, NC, A> SchemaDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19782,7 +20038,7 @@ impl<'a, C, NC, A> SchemaDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> SchemaDeleteCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -19792,7 +20048,7 @@ impl<'a, C, NC, A> SchemaDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name or immutable Id of the schema + /// Name or immutable Id of the schema pub fn schema_key(mut self, new_value: &str) -> SchemaDeleteCall<'a, C, NC, A> { self._schema_key = new_value.to_string(); self @@ -19853,7 +20109,7 @@ impl<'a, C, NC, A> SchemaDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Update schema /// /// A builder for the *update* method supported by a *schema* resource. -/// It is not used directly, but through a `SchemaMethods`. +/// It is not used directly, but through a `SchemaMethods` instance. /// /// # Example /// @@ -19920,7 +20176,7 @@ impl<'a, C, NC, A> SchemaUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "customerId", "schemaKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19977,7 +20233,7 @@ impl<'a, C, NC, A> SchemaUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19993,7 +20249,6 @@ impl<'a, C, NC, A> SchemaUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -20003,7 +20258,7 @@ impl<'a, C, NC, A> SchemaUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -20014,7 +20269,7 @@ impl<'a, C, NC, A> SchemaUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -20023,13 +20278,13 @@ impl<'a, C, NC, A> SchemaUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -20050,7 +20305,7 @@ impl<'a, C, NC, A> SchemaUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Immutable id of the Google Apps account + /// Immutable id of the Google Apps account pub fn customer_id(mut self, new_value: &str) -> SchemaUpdateCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -20060,7 +20315,7 @@ impl<'a, C, NC, A> SchemaUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name or immutable Id of the schema. + /// Name or immutable Id of the schema. pub fn schema_key(mut self, new_value: &str) -> SchemaUpdateCall<'a, C, NC, A> { self._schema_key = new_value.to_string(); self diff --git a/gen/admin1_reports/Cargo.toml b/gen/admin1_reports/Cargo.toml index 710102f168..596413d57f 100644 --- a/gen/admin1_reports/Cargo.toml +++ b/gen/admin1_reports/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-admin1_reports" -version = "0.1.1+20150115" +version = "0.1.2+20150115" authors = ["Sebastian Thiel "] description = "A complete library to interact with reports (protocol reports_v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/admin1_reports" @@ -16,7 +16,7 @@ keywords = ["admin", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/admin1_reports/README.md b/gen/admin1_reports/README.md index f8a6747db3..4fc8178438 100644 --- a/gen/admin1_reports/README.md +++ b/gen/admin1_reports/README.md @@ -1,11 +1,11 @@ The `google-admin1_reports` library allows access to all features of the *Google reports* service. -This documentation was generated from *reports* crate version *0.1.1+20150115*, where *20150115* is the exact revision of the *admin:reports_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *reports* crate version *0.1.2+20150115*, where *20150115* is the exact revision of the *admin:reports_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *reports* *v1_reports* API can be found at the [official documentation site](https://developers.google.com/admin-sdk/reports/). @@ -36,6 +36,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-admin1_reports/struct.Reports.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-admin1_reports/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-admin1_reports/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-admin1_reports/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -45,6 +47,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-admin1_reports/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -81,7 +85,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-admin1_reports" as admin1_reports; use admin1_reports::Channel; -use admin1_reports::Result; +use admin1_reports::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use admin1_reports::Reports; @@ -118,15 +122,17 @@ let result = hub.activities().watch(&req, "userKey", "applicationName") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -139,7 +145,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-admin1_reports/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-admin1_reports/trait.ResponseResult.html), it will return that by default. @@ -162,8 +168,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-admin1_reports ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-admin1_reports/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-admin1_reports/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-admin1_reports/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-admin1_reports/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-admin1_reports/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/admin1_reports/src/cmn.rs b/gen/admin1_reports/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/admin1_reports/src/cmn.rs +++ b/gen/admin1_reports/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/admin1_reports/src/lib.rs b/gen/admin1_reports/src/lib.rs index 78462d69b0..1c258ec590 100644 --- a/gen/admin1_reports/src/lib.rs +++ b/gen/admin1_reports/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *reports* crate version *0.1.1+20150115*, where *20150115* is the exact revision of the *admin:reports_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *reports* crate version *0.1.2+20150115*, where *20150115* is the exact revision of the *admin:reports_v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *reports* *v1_reports* API can be found at the //! [official documentation site](https://developers.google.com/admin-sdk/reports/). @@ -36,6 +36,8 @@ //! //! * **[Hub](struct.Reports.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -45,6 +47,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -81,7 +85,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-admin1_reports" as admin1_reports; //! use admin1_reports::Channel; -//! use admin1_reports::Result; +//! use admin1_reports::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -119,15 +123,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -140,7 +146,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -163,8 +169,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -213,7 +220,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -264,7 +271,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-admin1_reports" as admin1_reports; /// use admin1_reports::Channel; -/// use admin1_reports::Result; +/// use admin1_reports::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -302,15 +309,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -331,7 +340,7 @@ impl<'a, C, NC, A> Reports Reports { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -350,7 +359,7 @@ impl<'a, C, NC, A> Reports } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -375,14 +384,14 @@ impl<'a, C, NC, A> Reports /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Activities { - /// Token for retrieving the next page + /// Token for retrieving the next page #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Each record in read response. + /// Each record in read response. pub items: Vec, - /// Kind of list response this is. + /// Kind of list response this is. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, } @@ -395,9 +404,9 @@ impl ResponseResult for Activities {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UsageReportsWarningsData { - /// Key associated with a key-value pair to give detailed information on the warning. + /// Key associated with a key-value pair to give detailed information on the warning. pub key: String, - /// Value associated with a key-value pair to give detailed information on the warning. + /// Value associated with a key-value pair to give detailed information on the warning. pub value: String, } @@ -411,15 +420,15 @@ impl Part for UsageReportsWarningsData {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UsageReport { - /// The date to which the record belongs. + /// The date to which the record belongs. pub date: String, - /// The kind of object. + /// The kind of object. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// Parameter value pairs for various applications. + /// Parameter value pairs for various applications. pub parameters: Vec, - /// Information about the type of the item. + /// Information about the type of the item. pub entity: UsageReportEntity, } @@ -432,21 +441,21 @@ impl Part for UsageReport {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UsageReportParameters { - /// Nested message value of the parameter. + /// Nested message value of the parameter. #[serde(alias="msgValue")] pub msg_value: Vec>, - /// RFC 3339 formatted value of the parameter. + /// RFC 3339 formatted value of the parameter. #[serde(alias="datetimeValue")] pub datetime_value: String, - /// The name of the parameter. + /// The name of the parameter. pub name: String, - /// String value of the parameter. + /// String value of the parameter. #[serde(alias="stringValue")] pub string_value: String, - /// Boolean value of the parameter. + /// Boolean value of the parameter. #[serde(alias="boolValue")] pub bool_value: bool, - /// Integral value of the parameter. + /// Integral value of the parameter. #[serde(alias="intValue")] pub int_value: String, } @@ -461,14 +470,14 @@ impl Part for UsageReportParameters {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ActivityActor { - /// Obfuscated user id of the user. + /// Obfuscated user id of the user. #[serde(alias="profileId")] pub profile_id: String, - /// Email address of the user. + /// Email address of the user. pub email: String, - /// For OAuth 2LO API requests, consumer_key of the requestor. + /// For OAuth 2LO API requests, consumer_key of the requestor. pub key: String, - /// User or OAuth 2LO request. + /// User or OAuth 2LO request. #[serde(alias="callerType")] pub caller_type: String, } @@ -483,16 +492,16 @@ impl Part for ActivityActor {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ActivityId { - /// Application name to which the event belongs. + /// Application name to which the event belongs. #[serde(alias="applicationName")] pub application_name: String, - /// Unique qualifier if multiple events have the same time. + /// Unique qualifier if multiple events have the same time. #[serde(alias="uniqueQualifier")] pub unique_qualifier: String, - /// Obfuscated customer ID of the source customer. + /// Obfuscated customer ID of the source customer. #[serde(alias="customerId")] pub customer_id: String, - /// Time of occurrence of the activity. + /// Time of occurrence of the activity. pub time: String, } @@ -506,11 +515,11 @@ impl Part for ActivityId {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UsageReportsWarnings { - /// Human readable message for the warning. + /// Human readable message for the warning. pub message: String, - /// Machine readable code / warning type. + /// Machine readable code / warning type. pub code: String, - /// Key-Value pairs to give detailed information on the warning. + /// Key-Value pairs to give detailed information on the warning. pub data: Vec, } @@ -530,17 +539,17 @@ impl Part for UsageReportsWarnings {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UsageReports { - /// Token for retrieving the next page + /// Token for retrieving the next page #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The kind of object. + /// The kind of object. pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// Various application parameter records. + /// Various application parameter records. #[serde(alias="usageReports")] pub usage_reports: Vec, - /// Warnings if any. + /// Warnings if any. pub warnings: Vec, } @@ -553,21 +562,21 @@ impl ResponseResult for UsageReports {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Activity { - /// Kind of resource this is. + /// Kind of resource this is. pub kind: String, - /// ETag of the entry. + /// ETag of the entry. pub etag: String, - /// Activity events. + /// Activity events. pub events: Vec, - /// IP Address of the user doing the action. + /// IP Address of the user doing the action. #[serde(alias="ipAddress")] pub ip_address: String, - /// Domain of source customer. + /// Domain of source customer. #[serde(alias="ownerDomain")] pub owner_domain: String, - /// User doing the action. + /// User doing the action. pub actor: ActivityActor, - /// Unique identifier for each activity record. + /// Unique identifier for each activity record. pub id: ActivityId, } @@ -580,21 +589,21 @@ impl Part for Activity {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ActivityEventsParameters { - /// Boolean value of the parameter. + /// Boolean value of the parameter. #[serde(alias="boolValue")] pub bool_value: bool, - /// Multi-string value of the parameter. + /// Multi-string value of the parameter. #[serde(alias="multiValue")] pub multi_value: Vec, - /// The name of the parameter. + /// The name of the parameter. pub name: String, - /// Multi-int value of the parameter. + /// Multi-int value of the parameter. #[serde(alias="multiIntValue")] pub multi_int_value: Vec, - /// Integral value of the parameter. + /// Integral value of the parameter. #[serde(alias="intValue")] pub int_value: String, - /// String value of the parameter. + /// String value of the parameter. pub value: String, } @@ -608,12 +617,12 @@ impl Part for ActivityEventsParameters {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ActivityEvents { - /// Type of event. + /// Type of event. #[serde(alias="type")] pub type_: String, - /// Name of event. + /// Name of event. pub name: String, - /// Parameter value pairs for various applications. + /// Parameter value pairs for various applications. pub parameters: Vec, } @@ -627,16 +636,16 @@ impl Part for ActivityEvents {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UsageReportEntity { - /// Obfuscated user id for the record. + /// Obfuscated user id for the record. #[serde(alias="profileId")] pub profile_id: String, - /// user's email. + /// user's email. #[serde(alias="userEmail")] pub user_email: String, - /// The type of item, can be a customer or user. + /// The type of item, can be a customer or user. #[serde(alias="type")] pub type_: String, - /// Obfuscated customer id for the record. + /// Obfuscated customer id for the record. #[serde(alias="customerId")] pub customer_id: String, } @@ -657,28 +666,28 @@ impl Part for UsageReportEntity {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Channel { - /// A version-specific identifier for the watched resource. + /// A version-specific identifier for the watched resource. #[serde(alias="resourceUri")] pub resource_uri: Option, - /// Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". + /// Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". pub kind: Option, - /// An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. + /// An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. #[serde(alias="resourceId")] pub resource_id: Option, - /// A UUID or similar unique string that identifies this channel. + /// A UUID or similar unique string that identifies this channel. pub id: Option, - /// An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. + /// An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. pub token: Option, - /// Additional parameters controlling delivery channel behavior. Optional. + /// Additional parameters controlling delivery channel behavior. Optional. pub params: Option>, - /// Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. + /// Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. pub expiration: Option, - /// The address where notifications are delivered for this channel. + /// The address where notifications are delivered for this channel. pub address: Option, - /// The type of delivery mechanism used for this channel. + /// The type of delivery mechanism used for this channel. #[serde(alias="type")] pub type_: Option, - /// A Boolean value to indicate whether payload is wanted. Optional. + /// A Boolean value to indicate whether payload is wanted. Optional. pub payload: Option, } @@ -726,13 +735,17 @@ pub struct ChannelMethods<'a, C, NC, A> hub: &'a Reports, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ChannelMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ChannelMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ChannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Stop watching resources through this channel + /// Stop watching resources through this channel + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn stop(&self, request: &Channel) -> ChannelStopCall<'a, C, NC, A> { ChannelStopCall { hub: self.hub, @@ -780,13 +793,19 @@ pub struct ActivityMethods<'a, C, NC, A> hub: &'a Reports, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ActivityMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ActivityMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ActivityMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Push changes to activities + /// Push changes to activities + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userKey` - Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users. + /// * `applicationName` - Application name for which the events are to be retrieved. pub fn watch(&self, request: &Channel, user_key: &str, application_name: &str) -> ActivityWatchCall<'a, C, NC, A> { ActivityWatchCall { hub: self.hub, @@ -809,7 +828,12 @@ impl<'a, C, NC, A> ActivityMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of activities for a specific customer and application. + /// Retrieves a list of activities for a specific customer and application. + /// + /// # Arguments + /// + /// * `userKey` - Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users. + /// * `applicationName` - Application name for which the events are to be retrieved. pub fn list(&self, user_key: &str, application_name: &str) -> ActivityListCall<'a, C, NC, A> { ActivityListCall { hub: self.hub, @@ -866,13 +890,17 @@ pub struct CustomerUsageReportMethods<'a, C, NC, A> hub: &'a Reports, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CustomerUsageReportMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CustomerUsageReportMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CustomerUsageReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a report which is a collection of properties / statistics for a specific customer. + /// Retrieves a report which is a collection of properties / statistics for a specific customer. + /// + /// # Arguments + /// + /// * `date` - Represents the date in yyyy-mm-dd format for which the data is to be fetched. pub fn get(&self, date: &str) -> CustomerUsageReportGetCall<'a, C, NC, A> { CustomerUsageReportGetCall { hub: self.hub, @@ -923,13 +951,18 @@ pub struct UserUsageReportMethods<'a, C, NC, A> hub: &'a Reports, } -impl<'a, C, NC, A> ResourceMethodsBuilder for UserUsageReportMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for UserUsageReportMethods<'a, C, NC, A> {} impl<'a, C, NC, A> UserUsageReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a report which is a collection of properties / statistics for a set of users. + /// Retrieves a report which is a collection of properties / statistics for a set of users. + /// + /// # Arguments + /// + /// * `userKey` - Represents the profile id or the user email for which the data should be filtered. + /// * `date` - Represents the date in yyyy-mm-dd format for which the data is to be fetched. pub fn get(&self, user_key: &str, date: &str) -> UserUsageReportGetCall<'a, C, NC, A> { UserUsageReportGetCall { hub: self.hub, @@ -958,7 +991,7 @@ impl<'a, C, NC, A> UserUsageReportMethods<'a, C, NC, A> { /// Stop watching resources through this channel /// /// A builder for the *stop* method supported by a *channel* resource. -/// It is not used directly, but through a `ChannelMethods`. +/// It is not used directly, but through a `ChannelMethods` instance. /// /// # Example /// @@ -1021,7 +1054,7 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in [].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1053,7 +1086,7 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1069,7 +1102,6 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -1079,7 +1111,7 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1090,12 +1122,12 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1167,7 +1199,7 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Push changes to activities /// /// A builder for the *watch* method supported by a *activity* resource. -/// It is not used directly, but through a `ActivityMethods`. +/// It is not used directly, but through a `ActivityMethods` instance. /// /// # Example /// @@ -1274,7 +1306,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "userKey", "applicationName", "startTime", "pageToken", "maxResults", "filters", "eventName", "endTime", "customerId", "actorIpAddress"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1331,7 +1363,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1347,7 +1379,6 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -1357,7 +1388,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1368,7 +1399,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1377,13 +1408,13 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1404,7 +1435,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users. + /// Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users. pub fn user_key(mut self, new_value: &str) -> ActivityWatchCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -1414,7 +1445,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Application name for which the events are to be retrieved. + /// Application name for which the events are to be retrieved. pub fn application_name(mut self, new_value: &str) -> ActivityWatchCall<'a, C, NC, A> { self._application_name = new_value.to_string(); self @@ -1422,7 +1453,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *start time* query property to the given value. /// /// - /// Return events which occured at or after this time. + /// Return events which occured at or after this time. pub fn start_time(mut self, new_value: &str) -> ActivityWatchCall<'a, C, NC, A> { self._start_time = Some(new_value.to_string()); self @@ -1430,7 +1461,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *page token* query property to the given value. /// /// - /// Token to specify next page. + /// Token to specify next page. pub fn page_token(mut self, new_value: &str) -> ActivityWatchCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -1438,7 +1469,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *max results* query property to the given value. /// /// - /// Number of activity records to be shown in each page. + /// Number of activity records to be shown in each page. pub fn max_results(mut self, new_value: i32) -> ActivityWatchCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -1446,7 +1477,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *filters* query property to the given value. /// /// - /// Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],... + /// Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],... pub fn filters(mut self, new_value: &str) -> ActivityWatchCall<'a, C, NC, A> { self._filters = Some(new_value.to_string()); self @@ -1454,7 +1485,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *event name* query property to the given value. /// /// - /// Name of the event being queried. + /// Name of the event being queried. pub fn event_name(mut self, new_value: &str) -> ActivityWatchCall<'a, C, NC, A> { self._event_name = Some(new_value.to_string()); self @@ -1462,7 +1493,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *end time* query property to the given value. /// /// - /// Return events which occured at or before this time. + /// Return events which occured at or before this time. pub fn end_time(mut self, new_value: &str) -> ActivityWatchCall<'a, C, NC, A> { self._end_time = Some(new_value.to_string()); self @@ -1470,7 +1501,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *customer id* query property to the given value. /// /// - /// Represents the customer for which the data is to be fetched. + /// Represents the customer for which the data is to be fetched. pub fn customer_id(mut self, new_value: &str) -> ActivityWatchCall<'a, C, NC, A> { self._customer_id = Some(new_value.to_string()); self @@ -1478,7 +1509,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *actor ip address* query property to the given value. /// /// - /// IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses. + /// IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses. pub fn actor_ip_address(mut self, new_value: &str) -> ActivityWatchCall<'a, C, NC, A> { self._actor_ip_address = Some(new_value.to_string()); self @@ -1539,7 +1570,7 @@ impl<'a, C, NC, A> ActivityWatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Retrieves a list of activities for a specific customer and application. /// /// A builder for the *list* method supported by a *activity* resource. -/// It is not used directly, but through a `ActivityMethods`. +/// It is not used directly, but through a `ActivityMethods` instance. /// /// # Example /// @@ -1639,7 +1670,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "userKey", "applicationName", "startTime", "pageToken", "maxResults", "filters", "eventName", "endTime", "customerId", "actorIpAddress"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1692,7 +1723,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1704,7 +1735,6 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -1714,7 +1744,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1725,7 +1755,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1734,13 +1764,13 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1752,7 +1782,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users. + /// Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users. pub fn user_key(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -1762,7 +1792,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Application name for which the events are to be retrieved. + /// Application name for which the events are to be retrieved. pub fn application_name(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._application_name = new_value.to_string(); self @@ -1770,7 +1800,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *start time* query property to the given value. /// /// - /// Return events which occured at or after this time. + /// Return events which occured at or after this time. pub fn start_time(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._start_time = Some(new_value.to_string()); self @@ -1778,7 +1808,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// Token to specify next page. + /// Token to specify next page. pub fn page_token(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -1786,7 +1816,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Number of activity records to be shown in each page. + /// Number of activity records to be shown in each page. pub fn max_results(mut self, new_value: i32) -> ActivityListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -1794,7 +1824,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *filters* query property to the given value. /// /// - /// Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],... + /// Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],... pub fn filters(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._filters = Some(new_value.to_string()); self @@ -1802,7 +1832,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *event name* query property to the given value. /// /// - /// Name of the event being queried. + /// Name of the event being queried. pub fn event_name(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._event_name = Some(new_value.to_string()); self @@ -1810,7 +1840,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *end time* query property to the given value. /// /// - /// Return events which occured at or before this time. + /// Return events which occured at or before this time. pub fn end_time(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._end_time = Some(new_value.to_string()); self @@ -1818,7 +1848,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *customer id* query property to the given value. /// /// - /// Represents the customer for which the data is to be fetched. + /// Represents the customer for which the data is to be fetched. pub fn customer_id(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._customer_id = Some(new_value.to_string()); self @@ -1826,7 +1856,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *actor ip address* query property to the given value. /// /// - /// IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses. + /// IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses. pub fn actor_ip_address(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._actor_ip_address = Some(new_value.to_string()); self @@ -1887,7 +1917,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Retrieves a report which is a collection of properties / statistics for a specific customer. /// /// A builder for the *get* method supported by a *customerUsageReport* resource. -/// It is not used directly, but through a `CustomerUsageReportMethods`. +/// It is not used directly, but through a `CustomerUsageReportMethods` instance. /// /// # Example /// @@ -1960,7 +1990,7 @@ impl<'a, C, NC, A> CustomerUsageReportGetCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "date", "parameters", "pageToken", "customerId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2013,7 +2043,7 @@ impl<'a, C, NC, A> CustomerUsageReportGetCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2025,7 +2055,6 @@ impl<'a, C, NC, A> CustomerUsageReportGetCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -2035,7 +2064,7 @@ impl<'a, C, NC, A> CustomerUsageReportGetCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2046,7 +2075,7 @@ impl<'a, C, NC, A> CustomerUsageReportGetCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2055,13 +2084,13 @@ impl<'a, C, NC, A> CustomerUsageReportGetCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2073,7 +2102,7 @@ impl<'a, C, NC, A> CustomerUsageReportGetCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Represents the date in yyyy-mm-dd format for which the data is to be fetched. + /// Represents the date in yyyy-mm-dd format for which the data is to be fetched. pub fn date(mut self, new_value: &str) -> CustomerUsageReportGetCall<'a, C, NC, A> { self._date = new_value.to_string(); self @@ -2081,7 +2110,7 @@ impl<'a, C, NC, A> CustomerUsageReportGetCall<'a, C, NC, A> where NC: hyper::net /// Sets the *parameters* query property to the given value. /// /// - /// Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2. + /// Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2. pub fn parameters(mut self, new_value: &str) -> CustomerUsageReportGetCall<'a, C, NC, A> { self._parameters = Some(new_value.to_string()); self @@ -2089,7 +2118,7 @@ impl<'a, C, NC, A> CustomerUsageReportGetCall<'a, C, NC, A> where NC: hyper::net /// Sets the *page token* query property to the given value. /// /// - /// Token to specify next page. + /// Token to specify next page. pub fn page_token(mut self, new_value: &str) -> CustomerUsageReportGetCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2097,7 +2126,7 @@ impl<'a, C, NC, A> CustomerUsageReportGetCall<'a, C, NC, A> where NC: hyper::net /// Sets the *customer id* query property to the given value. /// /// - /// Represents the customer for which the data is to be fetched. + /// Represents the customer for which the data is to be fetched. pub fn customer_id(mut self, new_value: &str) -> CustomerUsageReportGetCall<'a, C, NC, A> { self._customer_id = Some(new_value.to_string()); self @@ -2158,7 +2187,7 @@ impl<'a, C, NC, A> CustomerUsageReportGetCall<'a, C, NC, A> where NC: hyper::net /// Retrieves a report which is a collection of properties / statistics for a set of users. /// /// A builder for the *get* method supported by a *userUsageReport* resource. -/// It is not used directly, but through a `UserUsageReportMethods`. +/// It is not used directly, but through a `UserUsageReportMethods` instance. /// /// # Example /// @@ -2243,7 +2272,7 @@ impl<'a, C, NC, A> UserUsageReportGetCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "userKey", "date", "parameters", "pageToken", "maxResults", "filters", "customerId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2296,7 +2325,7 @@ impl<'a, C, NC, A> UserUsageReportGetCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2308,7 +2337,6 @@ impl<'a, C, NC, A> UserUsageReportGetCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -2318,7 +2346,7 @@ impl<'a, C, NC, A> UserUsageReportGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2329,7 +2357,7 @@ impl<'a, C, NC, A> UserUsageReportGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2338,13 +2366,13 @@ impl<'a, C, NC, A> UserUsageReportGetCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2356,7 +2384,7 @@ impl<'a, C, NC, A> UserUsageReportGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Represents the profile id or the user email for which the data should be filtered. + /// Represents the profile id or the user email for which the data should be filtered. pub fn user_key(mut self, new_value: &str) -> UserUsageReportGetCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self @@ -2366,7 +2394,7 @@ impl<'a, C, NC, A> UserUsageReportGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Represents the date in yyyy-mm-dd format for which the data is to be fetched. + /// Represents the date in yyyy-mm-dd format for which the data is to be fetched. pub fn date(mut self, new_value: &str) -> UserUsageReportGetCall<'a, C, NC, A> { self._date = new_value.to_string(); self @@ -2374,7 +2402,7 @@ impl<'a, C, NC, A> UserUsageReportGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *parameters* query property to the given value. /// /// - /// Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2. + /// Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2. pub fn parameters(mut self, new_value: &str) -> UserUsageReportGetCall<'a, C, NC, A> { self._parameters = Some(new_value.to_string()); self @@ -2382,7 +2410,7 @@ impl<'a, C, NC, A> UserUsageReportGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *page token* query property to the given value. /// /// - /// Token to specify next page. + /// Token to specify next page. pub fn page_token(mut self, new_value: &str) -> UserUsageReportGetCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2390,7 +2418,7 @@ impl<'a, C, NC, A> UserUsageReportGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. Maximum allowed is 1000 + /// Maximum number of results to return. Maximum allowed is 1000 pub fn max_results(mut self, new_value: u32) -> UserUsageReportGetCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2398,7 +2426,7 @@ impl<'a, C, NC, A> UserUsageReportGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *filters* query property to the given value. /// /// - /// Represents the set of filters including parameter operator value. + /// Represents the set of filters including parameter operator value. pub fn filters(mut self, new_value: &str) -> UserUsageReportGetCall<'a, C, NC, A> { self._filters = Some(new_value.to_string()); self @@ -2406,7 +2434,7 @@ impl<'a, C, NC, A> UserUsageReportGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *customer id* query property to the given value. /// /// - /// Represents the customer for which the data is to be fetched. + /// Represents the customer for which the data is to be fetched. pub fn customer_id(mut self, new_value: &str) -> UserUsageReportGetCall<'a, C, NC, A> { self._customer_id = Some(new_value.to_string()); self diff --git a/gen/admin2_email_migration/Cargo.toml b/gen/admin2_email_migration/Cargo.toml index 58bb388e80..feefbf0264 100644 --- a/gen/admin2_email_migration/Cargo.toml +++ b/gen/admin2_email_migration/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-admin2_email_migration" -version = "0.1.1+20150303" +version = "0.1.2+20150303" authors = ["Sebastian Thiel "] description = "A complete library to interact with admin (protocol email_migration_v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/admin2_email_migration" @@ -16,7 +16,7 @@ keywords = ["admin", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/admin2_email_migration/README.md b/gen/admin2_email_migration/README.md index 9a36fff340..c1996a7329 100644 --- a/gen/admin2_email_migration/README.md +++ b/gen/admin2_email_migration/README.md @@ -1,11 +1,11 @@ The `google-admin2_email_migration` library allows access to all features of the *Google admin* service. -This documentation was generated from *admin* crate version *0.1.1+20150303*, where *20150303* is the exact revision of the *admin:email_migration_v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *admin* crate version *0.1.2+20150303*, where *20150303* is the exact revision of the *admin:email_migration_v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *admin* *v2_email_migration* API can be found at the [official documentation site](https://developers.google.com/admin-sdk/email-migration/v2/). @@ -29,6 +29,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-admin2_email_migration/struct.Admin.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-admin2_email_migration/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-admin2_email_migration/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-admin2_email_migration/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -38,6 +40,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-admin2_email_migration/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -73,7 +77,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-admin2_email_migration" as admin2_email_migration; use admin2_email_migration::MailItem; -use admin2_email_migration::Result; +use admin2_email_migration::{Result, Error}; use std::fs; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -103,15 +107,17 @@ let result = hub.mail().insert(&req, "userKey") .upload(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -124,7 +130,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-admin2_email_migration/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-admin2_email_migration/trait.ResponseResult.html), it will return that by default. @@ -147,8 +153,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-admin2_email_m ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-admin2_email_migration/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-admin2_email_migration/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-admin2_email_migration/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-admin2_email_migration/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-admin2_email_migration/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/admin2_email_migration/src/cmn.rs b/gen/admin2_email_migration/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/admin2_email_migration/src/cmn.rs +++ b/gen/admin2_email_migration/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/admin2_email_migration/src/lib.rs b/gen/admin2_email_migration/src/lib.rs index 7d3bc7ee6d..0bc4cb0d30 100644 --- a/gen/admin2_email_migration/src/lib.rs +++ b/gen/admin2_email_migration/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *admin* crate version *0.1.1+20150303*, where *20150303* is the exact revision of the *admin:email_migration_v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *admin* crate version *0.1.2+20150303*, where *20150303* is the exact revision of the *admin:email_migration_v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *admin* *v2_email_migration* API can be found at the //! [official documentation site](https://developers.google.com/admin-sdk/email-migration/v2/). @@ -29,6 +29,8 @@ //! //! * **[Hub](struct.Admin.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -38,6 +40,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -73,7 +77,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-admin2_email_migration" as admin2_email_migration; //! use admin2_email_migration::MailItem; -//! use admin2_email_migration::Result; +//! use admin2_email_migration::{Result, Error}; //! use std::fs; //! # #[test] fn egal() { //! use std::default::Default; @@ -104,15 +108,17 @@ //! .upload(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -125,7 +131,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -148,8 +154,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -198,7 +205,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -245,7 +252,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-admin2_email_migration" as admin2_email_migration; /// use admin2_email_migration::MailItem; -/// use admin2_email_migration::Result; +/// use admin2_email_migration::{Result, Error}; /// use std::fs; /// # #[test] fn egal() { /// use std::default::Default; @@ -276,15 +283,17 @@ impl Default for Scope { /// .upload(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -305,7 +314,7 @@ impl<'a, C, NC, A> Admin Admin { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -315,7 +324,7 @@ impl<'a, C, NC, A> Admin } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -340,29 +349,29 @@ impl<'a, C, NC, A> Admin /// #[derive(Default, Clone, Debug, Serialize)] pub struct MailItem { - /// Boolean indicating if the mail is in trash + /// Boolean indicating if the mail is in trash #[serde(alias="isTrash")] pub is_trash: Option, - /// Kind of resource this is. + /// Kind of resource this is. pub kind: Option, - /// List of labels (strings) + /// List of labels (strings) pub labels: Option>, - /// Boolean indicating if the mail is draft + /// Boolean indicating if the mail is draft #[serde(alias="isDraft")] pub is_draft: Option, - /// Boolean indicating if the mail is in inbox + /// Boolean indicating if the mail is in inbox #[serde(alias="isInbox")] pub is_inbox: Option, - /// Boolean indicating if the mail is in 'sent mails' + /// Boolean indicating if the mail is in 'sent mails' #[serde(alias="isSent")] pub is_sent: Option, - /// Boolean indicating if the mail is starred + /// Boolean indicating if the mail is starred #[serde(alias="isStarred")] pub is_starred: Option, - /// Boolean indicating if the mail is unread + /// Boolean indicating if the mail is unread #[serde(alias="isUnread")] pub is_unread: Option, - /// Boolean indicating if the mail is deleted (used in Vault) + /// Boolean indicating if the mail is deleted (used in Vault) #[serde(alias="isDeleted")] pub is_deleted: Option, } @@ -409,13 +418,18 @@ pub struct MailMethods<'a, C, NC, A> hub: &'a Admin, } -impl<'a, C, NC, A> ResourceMethodsBuilder for MailMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for MailMethods<'a, C, NC, A> {} impl<'a, C, NC, A> MailMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Insert Mail into Google's Gmail backends + /// Insert Mail into Google's Gmail backends + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userKey` - The email or immutable id of the user pub fn insert(&self, request: &MailItem, user_key: &str) -> MailInsertCall<'a, C, NC, A> { MailInsertCall { hub: self.hub, @@ -439,7 +453,7 @@ impl<'a, C, NC, A> MailMethods<'a, C, NC, A> { /// Insert Mail into Google's Gmail backends /// /// A builder for the *insert* method supported by a *mail* resource. -/// It is not used directly, but through a `MailMethods`. +/// It is not used directly, but through a `MailMethods` instance. /// /// # Example /// @@ -506,7 +520,7 @@ impl<'a, C, NC, A> MailInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["userKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -572,7 +586,7 @@ impl<'a, C, NC, A> MailInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -598,7 +612,7 @@ impl<'a, C, NC, A> MailInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); if size > 36700160 { - return Result::UploadSizeLimitExceeded(size, 36700160) + return Err(Error::UploadSizeLimitExceeded(size, 36700160)) } mp_reader.add_part(&mut request_value_reader, request_size, json_mime_type.clone()) .add_part(&mut reader, size, reader_mime_type.clone()); @@ -620,7 +634,6 @@ impl<'a, C, NC, A> MailInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - } }; @@ -631,7 +644,7 @@ impl<'a, C, NC, A> MailInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -642,13 +655,13 @@ impl<'a, C, NC, A> MailInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } if protocol == "resumable" { let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); if size > 36700160 { - return Result::UploadSizeLimitExceeded(size, 36700160) + return Err(Error::UploadSizeLimitExceeded(size, 36700160)) } let mut client = &mut *self.hub.client.borrow_mut(); let upload_result = { @@ -673,17 +686,17 @@ impl<'a, C, NC, A> MailInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon match upload_result { None => { dlg.finished(false); - return Result::Cancelled + return Err(Error::Cancelled) } Some(Err(err)) => { dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Some(Ok(upload_result)) => { res = upload_result; if !res.status.is_success() { dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } } } @@ -691,7 +704,7 @@ impl<'a, C, NC, A> MailInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -707,11 +720,14 @@ impl<'a, C, NC, A> MailInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon where RS: ReadSeek { self.doit(stream, mime_type, "simple") } - /// Upload media in a resumeable fashion. + /// Upload media in a resumable fashion. /// Even if the upload fails or is interrupted, it can be resumed for a /// certain amount of time as the server maintains state temporarily. /// - /// TODO: Write more about how delegation works in this particular case. + /// The delegate will be asked for an `upload_url()`, and if not provided, will be asked to store an upload URL + /// that was provided by the server, using `store_upload_url(...)`. The upload will be done in chunks, the delegate + /// may specify the `chunk_size()` and may cancel the operation before each chunk is uploaded, using + /// `cancel_chunk_upload(...)`. /// /// * *max size*: 35MB /// * *multipart*: yes @@ -735,7 +751,7 @@ impl<'a, C, NC, A> MailInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The email or immutable id of the user + /// The email or immutable id of the user pub fn user_key(mut self, new_value: &str) -> MailInsertCall<'a, C, NC, A> { self._user_key = new_value.to_string(); self diff --git a/gen/adsense1d4/Cargo.toml b/gen/adsense1d4/Cargo.toml index 6093eff4b7..18e4ed363b 100644 --- a/gen/adsense1d4/Cargo.toml +++ b/gen/adsense1d4/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-adsense1d4" -version = "0.1.1+20150312" +version = "0.1.2+20150303" authors = ["Sebastian Thiel "] description = "A complete library to interact with AdSense (protocol v1.4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adsense1d4" @@ -16,7 +16,7 @@ keywords = ["adsense", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/adsense1d4/README.md b/gen/adsense1d4/README.md index b559246de7..f38b15e285 100644 --- a/gen/adsense1d4/README.md +++ b/gen/adsense1d4/README.md @@ -1,11 +1,11 @@ The `google-adsense1d4` library allows access to all features of the *Google AdSense* service. -This documentation was generated from *AdSense* crate version *0.1.1+20150312*, where *20150312* is the exact revision of the *adsense:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *AdSense* crate version *0.1.2+20150303*, where *20150303* is the exact revision of the *adsense:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *AdSense* *v1d4* API can be found at the [official documentation site](https://developers.google.com/adsense/management/). @@ -48,6 +48,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-adsense1d4/struct.AdSense.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-adsense1d4/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-adsense1d4/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-adsense1d4/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -57,6 +59,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-adsense1d4/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -109,7 +113,7 @@ google-adsense1d4 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-adsense1d4" as adsense1d4; -use adsense1d4::Result; +use adsense1d4::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use adsense1d4::AdSense; @@ -142,15 +146,17 @@ let result = hub.accounts().reports_generate("accountId", "startDate", "endDate" .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -163,7 +169,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-adsense1d4/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-adsense1d4/trait.ResponseResult.html), it will return that by default. @@ -186,8 +192,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-adsense1d4/tra ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-adsense1d4/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-adsense1d4/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-adsense1d4/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-adsense1d4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-adsense1d4/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/adsense1d4/src/cmn.rs b/gen/adsense1d4/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/adsense1d4/src/cmn.rs +++ b/gen/adsense1d4/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/adsense1d4/src/lib.rs b/gen/adsense1d4/src/lib.rs index 0640ce6664..3488581048 100644 --- a/gen/adsense1d4/src/lib.rs +++ b/gen/adsense1d4/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *AdSense* crate version *0.1.1+20150312*, where *20150312* is the exact revision of the *adsense:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *AdSense* crate version *0.1.2+20150303*, where *20150303* is the exact revision of the *adsense:v1.4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *AdSense* *v1d4* API can be found at the //! [official documentation site](https://developers.google.com/adsense/management/). @@ -48,6 +48,8 @@ //! //! * **[Hub](struct.AdSense.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -57,6 +59,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -109,7 +113,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-adsense1d4" as adsense1d4; -//! use adsense1d4::Result; +//! use adsense1d4::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -143,15 +147,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -164,7 +170,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -187,8 +193,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -237,7 +244,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -287,7 +294,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-adsense1d4" as adsense1d4; -/// use adsense1d4::Result; +/// use adsense1d4::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -321,15 +328,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -350,7 +359,7 @@ impl<'a, C, NC, A> AdSense AdSense { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -387,7 +396,7 @@ impl<'a, C, NC, A> AdSense } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -413,14 +422,14 @@ impl<'a, C, NC, A> AdSense /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UrlChannels { - /// Continuation token used to page through URL channels. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through URL channels. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The URL channels returned in this list response. + /// The URL channels returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adsense#urlChannels. + /// Kind of list this is, in this case adsense#urlChannels. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -456,17 +465,17 @@ impl ResponseResult for UrlChannels {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Account { - /// Kind of resource this is, in this case adsense#account. + /// Kind of resource this is, in this case adsense#account. pub kind: String, - /// Whether this account is premium. + /// Whether this account is premium. pub premium: bool, - /// Name of this account. + /// Name of this account. pub name: String, - /// AdSense timezone of this account. + /// AdSense timezone of this account. pub timezone: String, - /// Unique identifier of this account. + /// Unique identifier of this account. pub id: String, - /// Sub accounts of the this account. + /// Sub accounts of the this account. #[serde(alias="subAccounts")] pub sub_accounts: Vec, } @@ -489,14 +498,14 @@ impl ResponseResult for Account {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdUnits { - /// Continuation token used to page through ad units. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through ad units. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The ad units returned in this list response. + /// The ad units returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adsense#adUnits. + /// Kind of list this is, in this case adsense#adUnits. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -509,9 +518,9 @@ impl ResponseResult for AdUnits {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdStyleFont { - /// The family of the font. + /// The family of the font. pub family: String, - /// The size of the font. + /// The size of the font. pub size: String, } @@ -533,26 +542,26 @@ impl Part for AdStyleFont {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdsenseReportsGenerateResponse { - /// The requested start date in yyyy-mm-dd format. + /// The requested start date in yyyy-mm-dd format. #[serde(alias="startDate")] pub start_date: String, - /// Kind this is, in this case adsense#report. + /// Kind this is, in this case adsense#report. pub kind: String, - /// The output rows of the report. Each row is a list of cells; one for each dimension in the request, followed by one for each metric in the request. The dimension cells contain strings, and the metric cells contain numbers. + /// The output rows of the report. Each row is a list of cells; one for each dimension in the request, followed by one for each metric in the request. The dimension cells contain strings, and the metric cells contain numbers. pub rows: Vec>, - /// The requested end date in yyyy-mm-dd format. + /// The requested end date in yyyy-mm-dd format. #[serde(alias="endDate")] pub end_date: String, - /// Any warnings associated with generation of the report. + /// Any warnings associated with generation of the report. pub warnings: Vec, - /// The totals of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. + /// The totals of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. pub totals: Vec, - /// The header information of the columns requested in the report. This is a list of headers; one for each dimension in the request, followed by one for each metric in the request. + /// The header information of the columns requested in the report. This is a list of headers; one for each dimension in the request, followed by one for each metric in the request. pub headers: Vec, - /// The total number of rows matched by the report request. Fewer rows may be returned in the response due to being limited by the row count requested or the report row limit. + /// The total number of rows matched by the report request. Fewer rows may be returned in the response due to being limited by the row count requested or the report row limit. #[serde(alias="totalMatchedRows")] pub total_matched_rows: String, - /// The averages of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. + /// The averages of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. pub averages: Vec, } @@ -565,12 +574,12 @@ impl ResponseResult for AdsenseReportsGenerateResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdsenseReportsGenerateResponseHeaders { - /// The currency of this column. Only present if the header type is METRIC_CURRENCY. + /// The currency of this column. Only present if the header type is METRIC_CURRENCY. pub currency: String, - /// The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or METRIC_CURRENCY. + /// The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or METRIC_CURRENCY. #[serde(alias="type")] pub type_: String, - /// The name of the header. + /// The name of the header. pub name: String, } @@ -584,16 +593,16 @@ impl Part for AdsenseReportsGenerateResponseHeaders {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdUnitMobileContentAdsSettings { - /// The scripting language to use for this ad unit. + /// The scripting language to use for this ad unit. #[serde(alias="scriptingLanguage")] pub scripting_language: String, - /// The markup language to use for this ad unit. + /// The markup language to use for this ad unit. #[serde(alias="markupLanguage")] pub markup_language: String, - /// Type of this ad unit. + /// Type of this ad unit. #[serde(alias="type")] pub type_: String, - /// Size of this ad unit. + /// Size of this ad unit. pub size: String, } @@ -613,9 +622,9 @@ impl Part for AdUnitMobileContentAdsSettings {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Alerts { - /// The alerts returned in this list response. + /// The alerts returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adsense#alerts. + /// Kind of list this is, in this case adsense#alerts. pub kind: String, } @@ -628,11 +637,11 @@ impl ResponseResult for Alerts {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SavedReport { - /// Kind of resource this is, in this case adsense#savedReport. + /// Kind of resource this is, in this case adsense#savedReport. pub kind: String, - /// Unique identifier of this saved report. + /// Unique identifier of this saved report. pub id: String, - /// This saved report's name. + /// This saved report's name. pub name: String, } @@ -645,21 +654,21 @@ impl Part for SavedReport {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdClient { - /// ARC review mode this ad client is in. Empty if the client is not opted in to ARC. Possible values: POST_REVIEW, AUTOMATIC_PRE_REVIEW. + /// ARC review mode this ad client is in. Empty if the client is not opted in to ARC. Possible values: POST_REVIEW, AUTOMATIC_PRE_REVIEW. #[serde(alias="arcReviewMode")] pub arc_review_mode: String, - /// This ad client's product code, which corresponds to the PRODUCT_CODE report dimension. + /// This ad client's product code, which corresponds to the PRODUCT_CODE report dimension. #[serde(alias="productCode")] pub product_code: String, - /// Kind of resource this is, in this case adsense#adClient. + /// Kind of resource this is, in this case adsense#adClient. pub kind: String, - /// Whether this ad client is opted in to ARC. + /// Whether this ad client is opted in to ARC. #[serde(alias="arcOptIn")] pub arc_opt_in: bool, - /// Whether this ad client supports being reported on. + /// Whether this ad client supports being reported on. #[serde(alias="supportsReporting")] pub supports_reporting: bool, - /// Unique identifier of this ad client. + /// Unique identifier of this ad client. pub id: String, } @@ -672,11 +681,11 @@ impl Part for AdClient {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdUnitContentAdsSettingsBackupOption { - /// Color to use when type is set to COLOR. + /// Color to use when type is set to COLOR. pub color: String, - /// URL to use when type is set to URL. + /// URL to use when type is set to URL. pub url: String, - /// Type of the backup option. Possible values are BLANK, COLOR and URL. + /// Type of the backup option. Possible values are BLANK, COLOR and URL. #[serde(alias="type")] pub type_: String, } @@ -691,15 +700,15 @@ impl Part for AdUnitContentAdsSettingsBackupOption {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdUnitFeedAdsSettings { - /// The minimum length an entry should be in order to have attached ads. + /// The minimum length an entry should be in order to have attached ads. #[serde(alias="minimumWordCount")] pub minimum_word_count: i32, - /// The frequency at which ads should appear in the feed (i.e. every N entries). + /// The frequency at which ads should appear in the feed (i.e. every N entries). pub frequency: i32, - /// The position of the ads relative to the feed entries. + /// The position of the ads relative to the feed entries. #[serde(alias="adPosition")] pub ad_position: String, - /// The type of ads which should appear. + /// The type of ads which should appear. #[serde(alias="type")] pub type_: String, } @@ -720,9 +729,9 @@ impl Part for AdUnitFeedAdsSettings {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Payments { - /// The list of Payments for the account. One or both of a) the account's most recent payment; and b) the account's upcoming payment. + /// The list of Payments for the account. One or both of a) the account's most recent payment; and b) the account's upcoming payment. pub items: Vec, - /// Kind of list this is, in this case adsense#payments. + /// Kind of list this is, in this case adsense#payments. pub kind: String, } @@ -735,23 +744,23 @@ impl ResponseResult for Payments {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReportingMetadataEntry { - /// The names of the metrics which the dimension or metric this reporting metadata entry describes requires to also be present in order for the report to be valid. Omitting these will not cause an error or warning, but may result in data which cannot be correctly interpreted. + /// The names of the metrics which the dimension or metric this reporting metadata entry describes requires to also be present in order for the report to be valid. Omitting these will not cause an error or warning, but may result in data which cannot be correctly interpreted. #[serde(alias="requiredMetrics")] pub required_metrics: Vec, - /// Kind of resource this is, in this case adsense#reportingMetadataEntry. + /// Kind of resource this is, in this case adsense#reportingMetadataEntry. pub kind: String, - /// The names of the metrics the dimension or metric this reporting metadata entry describes is compatible with. + /// The names of the metrics the dimension or metric this reporting metadata entry describes is compatible with. #[serde(alias="compatibleMetrics")] pub compatible_metrics: Vec, - /// For metrics this is a list of dimension IDs which the metric is compatible with, for dimensions it is a list of compatibility groups the dimension belongs to. + /// For metrics this is a list of dimension IDs which the metric is compatible with, for dimensions it is a list of compatibility groups the dimension belongs to. #[serde(alias="compatibleDimensions")] pub compatible_dimensions: Vec, - /// Unique identifier of this reporting metadata entry, corresponding to the name of the appropriate dimension or metric. + /// Unique identifier of this reporting metadata entry, corresponding to the name of the appropriate dimension or metric. pub id: String, - /// The names of the dimensions which the dimension or metric this reporting metadata entry describes requires to also be present in order for the report to be valid. Omitting these will not cause an error or warning, but may result in data which cannot be correctly interpreted. + /// The names of the dimensions which the dimension or metric this reporting metadata entry describes requires to also be present in order for the report to be valid. Omitting these will not cause an error or warning, but may result in data which cannot be correctly interpreted. #[serde(alias="requiredDimensions")] pub required_dimensions: Vec, - /// The codes of the projects supported by the dimension or metric this reporting metadata entry describes. + /// The codes of the projects supported by the dimension or metric this reporting metadata entry describes. #[serde(alias="supportedProducts")] pub supported_products: Vec, } @@ -765,14 +774,14 @@ impl Part for ReportingMetadataEntry {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomChannelTargetingInfo { - /// The external description of the channel. + /// The external description of the channel. pub description: String, - /// The language of the sites ads will be displayed on. + /// The language of the sites ads will be displayed on. #[serde(alias="siteLanguage")] pub site_language: String, - /// The locations in which ads appear. (Only valid for content and mobile content ads). Acceptable values for content ads are: TOP_LEFT, TOP_CENTER, TOP_RIGHT, MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, MULTIPLE_LOCATIONS. Acceptable values for mobile content ads are: TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS. + /// The locations in which ads appear. (Only valid for content and mobile content ads). Acceptable values for content ads are: TOP_LEFT, TOP_CENTER, TOP_RIGHT, MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, MULTIPLE_LOCATIONS. Acceptable values for mobile content ads are: TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS. pub location: String, - /// The name used to describe this channel externally. + /// The name used to describe this channel externally. #[serde(alias="adsAppearOn")] pub ads_appear_on: String, } @@ -795,14 +804,14 @@ impl Part for CustomChannelTargetingInfo {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomChannels { - /// Continuation token used to page through custom channels. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through custom channels. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The custom channels returned in this list response. + /// The custom channels returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adsense#customChannels. + /// Kind of list this is, in this case adsense#customChannels. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -815,11 +824,11 @@ impl ResponseResult for CustomChannels {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UrlChannel { - /// Kind of resource this is, in this case adsense#urlChannel. + /// Kind of resource this is, in this case adsense#urlChannel. pub kind: String, - /// Unique identifier of this URL channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. + /// Unique identifier of this URL channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. pub id: String, - /// URL Pattern of this URL channel. Does not include "http://" or "https://". Example: www.example.com/home + /// URL Pattern of this URL channel. Does not include "http://" or "https://". Example: www.example.com/home #[serde(alias="urlPattern")] pub url_pattern: String, } @@ -846,27 +855,27 @@ pub struct AdUnit { /// /// INACTIVE: Indicates that there has been no activity on this ad unit in the last seven days. pub status: String, - /// Kind of resource this is, in this case adsense#adUnit. + /// Kind of resource this is, in this case adsense#adUnit. pub kind: String, - /// Identity code of this ad unit, not necessarily unique across ad clients. + /// Identity code of this ad unit, not necessarily unique across ad clients. pub code: String, - /// Name of this ad unit. + /// Name of this ad unit. pub name: String, - /// Settings specific to feed ads (AFF). + /// Settings specific to feed ads (AFF). #[serde(alias="feedAdsSettings")] pub feed_ads_settings: AdUnitFeedAdsSettings, - /// ID of the saved ad style which holds this ad unit's style information. + /// ID of the saved ad style which holds this ad unit's style information. #[serde(alias="savedStyleId")] pub saved_style_id: String, - /// Settings specific to content ads (AFC) and highend mobile content ads (AFMC). + /// Settings specific to content ads (AFC) and highend mobile content ads (AFMC). #[serde(alias="contentAdsSettings")] pub content_ads_settings: AdUnitContentAdsSettings, - /// Unique identifier of this ad unit. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. + /// Unique identifier of this ad unit. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. pub id: String, - /// Settings specific to WAP mobile content ads (AFMC). + /// Settings specific to WAP mobile content ads (AFMC). #[serde(alias="mobileContentAdsSettings")] pub mobile_content_ads_settings: AdUnitMobileContentAdsSettings, - /// Custom style information specific to this ad unit. + /// Custom style information specific to this ad unit. #[serde(alias="customStyle")] pub custom_style: AdStyle, } @@ -887,14 +896,14 @@ impl ResponseResult for AdUnit {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdClients { - /// Continuation token used to page through ad clients. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through ad clients. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The ad clients returned in this list response. + /// The ad clients returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adsense#adClients. + /// Kind of list this is, in this case adsense#adClients. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -907,13 +916,13 @@ impl ResponseResult for AdClients {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdStyle { - /// The style of the corners in the ad. + /// The style of the corners in the ad. pub corners: String, - /// The colors which are included in the style. These are represented as six hexadecimal characters, similar to HTML color codes, but without the leading hash. + /// The colors which are included in the style. These are represented as six hexadecimal characters, similar to HTML color codes, but without the leading hash. pub colors: AdStyleColors, - /// The font which is included in the style. + /// The font which is included in the style. pub font: AdStyleFont, - /// Kind this is, in this case adsense#adStyle. + /// Kind this is, in this case adsense#adStyle. pub kind: String, } @@ -926,15 +935,15 @@ impl Part for AdStyle {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdStyleColors { - /// The color of the ad url. + /// The color of the ad url. pub url: String, - /// The color of the ad text. + /// The color of the ad text. pub text: String, - /// The color of the ad border. + /// The color of the ad border. pub border: String, - /// The color of the ad background. + /// The color of the ad background. pub background: String, - /// The color of the ad title. + /// The color of the ad title. pub title: String, } @@ -954,14 +963,14 @@ impl Part for AdStyleColors {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SavedReports { - /// Continuation token used to page through saved reports. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through saved reports. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The saved reports returned in this list response. + /// The saved reports returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adsense#savedReports. + /// Kind of list this is, in this case adsense#savedReports. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -980,14 +989,14 @@ impl ResponseResult for SavedReports {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SavedAdStyles { - /// Continuation token used to page through ad units. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through ad units. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The saved ad styles returned in this list response. + /// The saved ad styles returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adsense#savedAdStyles. + /// Kind of list this is, in this case adsense#savedAdStyles. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -1006,19 +1015,19 @@ impl ResponseResult for SavedAdStyles {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Alert { - /// Kind of resource this is, in this case adsense#alert. + /// Kind of resource this is, in this case adsense#alert. pub kind: Option, - /// Severity of this alert. Possible values: INFO, WARNING, SEVERE. + /// Severity of this alert. Possible values: INFO, WARNING, SEVERE. pub severity: Option, - /// Whether this alert can be dismissed. + /// Whether this alert can be dismissed. #[serde(alias="isDismissible")] pub is_dismissible: Option, - /// The localized alert message. + /// The localized alert message. pub message: Option, - /// Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3, ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY, GRAYLISTED_PUBLISHER, API_HOLD. + /// Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3, ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY, GRAYLISTED_PUBLISHER, API_HOLD. #[serde(alias="type")] pub type_: Option, - /// Unique identifier of this alert. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. + /// Unique identifier of this alert. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. pub id: Option, } @@ -1037,16 +1046,16 @@ impl Resource for Alert {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomChannel { - /// Kind of resource this is, in this case adsense#customChannel. + /// Kind of resource this is, in this case adsense#customChannel. pub kind: String, - /// Code of this custom channel, not necessarily unique across ad clients. + /// Code of this custom channel, not necessarily unique across ad clients. pub code: String, - /// The targeting information of this custom channel, if activated. + /// The targeting information of this custom channel, if activated. #[serde(alias="targetingInfo")] pub targeting_info: CustomChannelTargetingInfo, - /// Unique identifier of this custom channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. + /// Unique identifier of this custom channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. pub id: String, - /// Name of this custom channel. + /// Name of this custom channel. pub name: String, } @@ -1065,14 +1074,14 @@ impl ResponseResult for CustomChannel {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Accounts { - /// Continuation token used to page through accounts. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through accounts. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The accounts returned in this list response. + /// The accounts returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adsense#accounts. + /// Kind of list this is, in this case adsense#accounts. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -1085,13 +1094,13 @@ impl ResponseResult for Accounts {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdUnitContentAdsSettings { - /// Type of this ad unit. + /// Type of this ad unit. #[serde(alias="type")] pub type_: String, - /// The backup option to be used in instances where no ad is available. + /// The backup option to be used in instances where no ad is available. #[serde(alias="backupOption")] pub backup_option: AdUnitContentAdsSettingsBackupOption, - /// Size of this ad unit. + /// Size of this ad unit. pub size: String, } @@ -1111,14 +1120,14 @@ impl Part for AdUnitContentAdsSettings {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SavedAdStyle { - /// Kind of resource this is, in this case adsense#savedAdStyle. + /// Kind of resource this is, in this case adsense#savedAdStyle. pub kind: String, - /// Unique identifier of this saved ad style. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. + /// Unique identifier of this saved ad style. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. pub id: String, - /// The AdStyle itself. + /// The AdStyle itself. #[serde(alias="adStyle")] pub ad_style: AdStyle, - /// The user selected name of this SavedAdStyle. + /// The user selected name of this SavedAdStyle. pub name: String, } @@ -1138,10 +1147,10 @@ impl ResponseResult for SavedAdStyle {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdCode { - /// The ad code snippet. + /// The ad code snippet. #[serde(alias="adCode")] pub ad_code: String, - /// Kind this is, in this case adsense#adCode. + /// Kind this is, in this case adsense#adCode. pub kind: String, } @@ -1160,9 +1169,9 @@ impl ResponseResult for AdCode {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Metadata { - /// no description provided + /// no description provided pub items: Vec, - /// Kind of list this is, in this case adsense#metadata. + /// Kind of list this is, in this case adsense#metadata. pub kind: String, } @@ -1180,17 +1189,17 @@ impl ResponseResult for Metadata {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Payment { - /// The currency code for the amount to be paid. + /// The currency code for the amount to be paid. #[serde(alias="paymentAmountCurrencyCode")] pub payment_amount_currency_code: Option, - /// Kind of resource this is, in this case adsense#payment. + /// Kind of resource this is, in this case adsense#payment. pub kind: Option, - /// The amount to be paid. + /// The amount to be paid. #[serde(alias="paymentAmount")] pub payment_amount: Option, - /// Unique identifier of this Payment. + /// Unique identifier of this Payment. pub id: Option, - /// The date this payment was/will be credited to the user, or none if the payment threshold has not been met. + /// The date this payment was/will be credited to the user, or none if the payment threshold has not been met. #[serde(alias="paymentDate")] pub payment_date: Option, } @@ -1237,13 +1246,17 @@ pub struct UrlchannelMethods<'a, C, NC, A> hub: &'a AdSense, } -impl<'a, C, NC, A> ResourceMethodsBuilder for UrlchannelMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for UrlchannelMethods<'a, C, NC, A> {} impl<'a, C, NC, A> UrlchannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all URL channels in the specified ad client for this AdSense account. + /// List all URL channels in the specified ad client for this AdSense account. + /// + /// # Arguments + /// + /// * `adClientId` - Ad client for which to list URL channels. pub fn list(&self, ad_client_id: &str) -> UrlchannelListCall<'a, C, NC, A> { UrlchannelListCall { hub: self.hub, @@ -1293,13 +1306,18 @@ pub struct AdunitMethods<'a, C, NC, A> hub: &'a AdSense, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AdunitMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AdunitMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AdunitMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all custom channels which the specified ad unit belongs to. + /// List all custom channels which the specified ad unit belongs to. + /// + /// # Arguments + /// + /// * `adClientId` - Ad client which contains the ad unit. + /// * `adUnitId` - Ad unit for which to list custom channels. pub fn customchannels_list(&self, ad_client_id: &str, ad_unit_id: &str) -> AdunitCustomchannelListCall<'a, C, NC, A> { AdunitCustomchannelListCall { hub: self.hub, @@ -1315,7 +1333,12 @@ impl<'a, C, NC, A> AdunitMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the specified ad unit in the specified ad client. + /// Gets the specified ad unit in the specified ad client. + /// + /// # Arguments + /// + /// * `adClientId` - Ad client for which to get the ad unit. + /// * `adUnitId` - Ad unit to retrieve. pub fn get(&self, ad_client_id: &str, ad_unit_id: &str) -> AdunitGetCall<'a, C, NC, A> { AdunitGetCall { hub: self.hub, @@ -1329,7 +1352,11 @@ impl<'a, C, NC, A> AdunitMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all ad units in the specified ad client for this AdSense account. + /// List all ad units in the specified ad client for this AdSense account. + /// + /// # Arguments + /// + /// * `adClientId` - Ad client for which to list ad units. pub fn list(&self, ad_client_id: &str) -> AdunitListCall<'a, C, NC, A> { AdunitListCall { hub: self.hub, @@ -1345,7 +1372,12 @@ impl<'a, C, NC, A> AdunitMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get ad code for the specified ad unit. + /// Get ad code for the specified ad unit. + /// + /// # Arguments + /// + /// * `adClientId` - Ad client with contains the ad unit. + /// * `adUnitId` - Ad unit to get the code for. pub fn get_ad_code(&self, ad_client_id: &str, ad_unit_id: &str) -> AdunitGetAdCodeCall<'a, C, NC, A> { AdunitGetAdCodeCall { hub: self.hub, @@ -1394,13 +1426,13 @@ pub struct AdclientMethods<'a, C, NC, A> hub: &'a AdSense, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AdclientMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AdclientMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AdclientMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all ad clients in this AdSense account. + /// List all ad clients in this AdSense account. pub fn list(&self) -> AdclientListCall<'a, C, NC, A> { AdclientListCall { hub: self.hub, @@ -1449,13 +1481,17 @@ pub struct AlertMethods<'a, C, NC, A> hub: &'a AdSense, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AlertMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AlertMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AlertMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Dismiss (delete) the specified alert from the publisher's AdSense account. + /// Dismiss (delete) the specified alert from the publisher's AdSense account. + /// + /// # Arguments + /// + /// * `alertId` - Alert to delete. pub fn delete(&self, alert_id: &str) -> AlertDeleteCall<'a, C, NC, A> { AlertDeleteCall { hub: self.hub, @@ -1468,7 +1504,7 @@ impl<'a, C, NC, A> AlertMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List the alerts for this AdSense account. + /// List the alerts for this AdSense account. pub fn list(&self) -> AlertListCall<'a, C, NC, A> { AlertListCall { hub: self.hub, @@ -1516,13 +1552,13 @@ pub struct SavedadstyleMethods<'a, C, NC, A> hub: &'a AdSense, } -impl<'a, C, NC, A> ResourceMethodsBuilder for SavedadstyleMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for SavedadstyleMethods<'a, C, NC, A> {} impl<'a, C, NC, A> SavedadstyleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all saved ad styles in the user's account. + /// List all saved ad styles in the user's account. pub fn list(&self) -> SavedadstyleListCall<'a, C, NC, A> { SavedadstyleListCall { hub: self.hub, @@ -1536,7 +1572,11 @@ impl<'a, C, NC, A> SavedadstyleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get a specific saved ad style from the user's account. + /// Get a specific saved ad style from the user's account. + /// + /// # Arguments + /// + /// * `savedAdStyleId` - Saved ad style to retrieve. pub fn get(&self, saved_ad_style_id: &str) -> SavedadstyleGetCall<'a, C, NC, A> { SavedadstyleGetCall { hub: self.hub, @@ -1584,13 +1624,13 @@ pub struct ReportMethods<'a, C, NC, A> hub: &'a AdSense, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ReportMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ReportMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all saved reports in this AdSense account. + /// List all saved reports in this AdSense account. pub fn saved_list(&self) -> ReportSavedListCall<'a, C, NC, A> { ReportSavedListCall { hub: self.hub, @@ -1604,7 +1644,12 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. + /// Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. + /// + /// # Arguments + /// + /// * `startDate` - Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// * `endDate` - End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn generate(&self, start_date: &str, end_date: &str) -> ReportGenerateCall<'a, C, NC, A> { ReportGenerateCall { hub: self.hub, @@ -1628,7 +1673,11 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Generate an AdSense report based on the saved report ID sent in the query parameters. + /// Generate an AdSense report based on the saved report ID sent in the query parameters. + /// + /// # Arguments + /// + /// * `savedReportId` - The saved report to retrieve. pub fn saved_generate(&self, saved_report_id: &str) -> ReportSavedGenerateCall<'a, C, NC, A> { ReportSavedGenerateCall { hub: self.hub, @@ -1679,13 +1728,18 @@ pub struct AccountMethods<'a, C, NC, A> hub: &'a AdSense, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AccountMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AccountMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Dismiss (delete) the specified alert from the specified publisher AdSense account. + /// Dismiss (delete) the specified alert from the specified publisher AdSense account. + /// + /// # Arguments + /// + /// * `accountId` - Account which contains the ad unit. + /// * `alertId` - Alert to delete. pub fn alerts_delete(&self, account_id: &str, alert_id: &str) -> AccountAlertDeleteCall<'a, C, NC, A> { AccountAlertDeleteCall { hub: self.hub, @@ -1699,7 +1753,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List the alerts for the specified AdSense account. + /// List the alerts for the specified AdSense account. + /// + /// # Arguments + /// + /// * `accountId` - Account for which to retrieve the alerts. pub fn alerts_list(&self, account_id: &str) -> AccountAlertListCall<'a, C, NC, A> { AccountAlertListCall { hub: self.hub, @@ -1713,7 +1771,12 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Generate an AdSense report based on the saved report ID sent in the query parameters. + /// Generate an AdSense report based on the saved report ID sent in the query parameters. + /// + /// # Arguments + /// + /// * `accountId` - Account to which the saved reports belong. + /// * `savedReportId` - The saved report to retrieve. pub fn reports_saved_generate(&self, account_id: &str, saved_report_id: &str) -> AccountReportSavedGenerateCall<'a, C, NC, A> { AccountReportSavedGenerateCall { hub: self.hub, @@ -1730,7 +1793,7 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all accounts available to this AdSense account. + /// List all accounts available to this AdSense account. pub fn list(&self) -> AccountListCall<'a, C, NC, A> { AccountListCall { hub: self.hub, @@ -1744,7 +1807,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List the payments for the specified AdSense account. + /// List the payments for the specified AdSense account. + /// + /// # Arguments + /// + /// * `accountId` - Account for which to retrieve the payments. pub fn payments_list(&self, account_id: &str) -> AccountPaymentListCall<'a, C, NC, A> { AccountPaymentListCall { hub: self.hub, @@ -1757,7 +1824,12 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List a specific saved ad style for the specified account. + /// List a specific saved ad style for the specified account. + /// + /// # Arguments + /// + /// * `accountId` - Account for which to get the saved ad style. + /// * `savedAdStyleId` - Saved ad style to retrieve. pub fn savedadstyles_get(&self, account_id: &str, saved_ad_style_id: &str) -> AccountSavedadstyleGetCall<'a, C, NC, A> { AccountSavedadstyleGetCall { hub: self.hub, @@ -1771,7 +1843,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the specified ad unit in the specified ad client for the specified account. + /// Gets the specified ad unit in the specified ad client for the specified account. + /// + /// # Arguments + /// + /// * `accountId` - Account to which the ad client belongs. + /// * `adClientId` - Ad client for which to get the ad unit. + /// * `adUnitId` - Ad unit to retrieve. pub fn adunits_get(&self, account_id: &str, ad_client_id: &str, ad_unit_id: &str) -> AccountAdunitGetCall<'a, C, NC, A> { AccountAdunitGetCall { hub: self.hub, @@ -1786,7 +1864,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get the specified custom channel from the specified ad client for the specified account. + /// Get the specified custom channel from the specified ad client for the specified account. + /// + /// # Arguments + /// + /// * `accountId` - Account to which the ad client belongs. + /// * `adClientId` - Ad client which contains the custom channel. + /// * `customChannelId` - Custom channel to retrieve. pub fn customchannels_get(&self, account_id: &str, ad_client_id: &str, custom_channel_id: &str) -> AccountCustomchannelGetCall<'a, C, NC, A> { AccountCustomchannelGetCall { hub: self.hub, @@ -1801,7 +1885,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all ad units in the specified custom channel. + /// List all ad units in the specified custom channel. + /// + /// # Arguments + /// + /// * `accountId` - Account to which the ad client belongs. + /// * `adClientId` - Ad client which contains the custom channel. + /// * `customChannelId` - Custom channel for which to list ad units. pub fn customchannels_adunits_list(&self, account_id: &str, ad_client_id: &str, custom_channel_id: &str) -> AccountCustomchannelAdunitListCall<'a, C, NC, A> { AccountCustomchannelAdunitListCall { hub: self.hub, @@ -1819,7 +1909,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all saved reports in the specified AdSense account. + /// List all saved reports in the specified AdSense account. + /// + /// # Arguments + /// + /// * `accountId` - Account to which the saved reports belong. pub fn reports_saved_list(&self, account_id: &str) -> AccountReportSavedListCall<'a, C, NC, A> { AccountReportSavedListCall { hub: self.hub, @@ -1834,7 +1928,12 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all URL channels in the specified ad client for the specified account. + /// List all URL channels in the specified ad client for the specified account. + /// + /// # Arguments + /// + /// * `accountId` - Account to which the ad client belongs. + /// * `adClientId` - Ad client for which to list URL channels. pub fn urlchannels_list(&self, account_id: &str, ad_client_id: &str) -> AccountUrlchannelListCall<'a, C, NC, A> { AccountUrlchannelListCall { hub: self.hub, @@ -1850,7 +1949,12 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all ad units in the specified ad client for the specified account. + /// List all ad units in the specified ad client for the specified account. + /// + /// # Arguments + /// + /// * `accountId` - Account to which the ad client belongs. + /// * `adClientId` - Ad client for which to list ad units. pub fn adunits_list(&self, account_id: &str, ad_client_id: &str) -> AccountAdunitListCall<'a, C, NC, A> { AccountAdunitListCall { hub: self.hub, @@ -1867,7 +1971,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. + /// Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. + /// + /// # Arguments + /// + /// * `accountId` - Account upon which to report. + /// * `startDate` - Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// * `endDate` - End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn reports_generate(&self, account_id: &str, start_date: &str, end_date: &str) -> AccountReportGenerateCall<'a, C, NC, A> { AccountReportGenerateCall { hub: self.hub, @@ -1891,7 +2001,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all ad clients in the specified account. + /// List all ad clients in the specified account. + /// + /// # Arguments + /// + /// * `accountId` - Account for which to list ad clients. pub fn adclients_list(&self, account_id: &str) -> AccountAdclientListCall<'a, C, NC, A> { AccountAdclientListCall { hub: self.hub, @@ -1906,7 +2020,12 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all custom channels in the specified ad client for the specified account. + /// List all custom channels in the specified ad client for the specified account. + /// + /// # Arguments + /// + /// * `accountId` - Account to which the ad client belongs. + /// * `adClientId` - Ad client for which to list custom channels. pub fn customchannels_list(&self, account_id: &str, ad_client_id: &str) -> AccountCustomchannelListCall<'a, C, NC, A> { AccountCustomchannelListCall { hub: self.hub, @@ -1922,7 +2041,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all saved ad styles in the specified account. + /// List all saved ad styles in the specified account. + /// + /// # Arguments + /// + /// * `accountId` - Account for which to list saved ad styles. pub fn savedadstyles_list(&self, account_id: &str) -> AccountSavedadstyleListCall<'a, C, NC, A> { AccountSavedadstyleListCall { hub: self.hub, @@ -1937,7 +2060,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get ad code for the specified ad unit. + /// Get ad code for the specified ad unit. + /// + /// # Arguments + /// + /// * `accountId` - Account which contains the ad client. + /// * `adClientId` - Ad client with contains the ad unit. + /// * `adUnitId` - Ad unit to get the code for. pub fn adunits_get_ad_code(&self, account_id: &str, ad_client_id: &str, ad_unit_id: &str) -> AccountAdunitGetAdCodeCall<'a, C, NC, A> { AccountAdunitGetAdCodeCall { hub: self.hub, @@ -1952,7 +2081,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all custom channels which the specified ad unit belongs to. + /// List all custom channels which the specified ad unit belongs to. + /// + /// # Arguments + /// + /// * `accountId` - Account to which the ad client belongs. + /// * `adClientId` - Ad client which contains the ad unit. + /// * `adUnitId` - Ad unit for which to list custom channels. pub fn adunits_customchannels_list(&self, account_id: &str, ad_client_id: &str, ad_unit_id: &str) -> AccountAdunitCustomchannelListCall<'a, C, NC, A> { AccountAdunitCustomchannelListCall { hub: self.hub, @@ -1969,7 +2104,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get information about the selected AdSense account. + /// Get information about the selected AdSense account. + /// + /// # Arguments + /// + /// * `accountId` - Account to get information about. pub fn get(&self, account_id: &str) -> AccountGetCall<'a, C, NC, A> { AccountGetCall { hub: self.hub, @@ -2018,13 +2157,13 @@ pub struct PaymentMethods<'a, C, NC, A> hub: &'a AdSense, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PaymentMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PaymentMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PaymentMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List the payments for this AdSense account. + /// List the payments for this AdSense account. pub fn list(&self) -> PaymentListCall<'a, C, NC, A> { PaymentListCall { hub: self.hub, @@ -2071,13 +2210,13 @@ pub struct MetadataMethods<'a, C, NC, A> hub: &'a AdSense, } -impl<'a, C, NC, A> ResourceMethodsBuilder for MetadataMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for MetadataMethods<'a, C, NC, A> {} impl<'a, C, NC, A> MetadataMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List the metadata for the dimensions available to this AdSense account. + /// List the metadata for the dimensions available to this AdSense account. pub fn dimensions_list(&self) -> MetadataDimensionListCall<'a, C, NC, A> { MetadataDimensionListCall { hub: self.hub, @@ -2089,7 +2228,7 @@ impl<'a, C, NC, A> MetadataMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List the metadata for the metrics available to this AdSense account. + /// List the metadata for the metrics available to this AdSense account. pub fn metrics_list(&self) -> MetadataMetricListCall<'a, C, NC, A> { MetadataMetricListCall { hub: self.hub, @@ -2136,13 +2275,18 @@ pub struct CustomchannelMethods<'a, C, NC, A> hub: &'a AdSense, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CustomchannelMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CustomchannelMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CustomchannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get the specified custom channel from the specified ad client. + /// Get the specified custom channel from the specified ad client. + /// + /// # Arguments + /// + /// * `adClientId` - Ad client which contains the custom channel. + /// * `customChannelId` - Custom channel to retrieve. pub fn get(&self, ad_client_id: &str, custom_channel_id: &str) -> CustomchannelGetCall<'a, C, NC, A> { CustomchannelGetCall { hub: self.hub, @@ -2156,7 +2300,11 @@ impl<'a, C, NC, A> CustomchannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all custom channels in the specified ad client for this AdSense account. + /// List all custom channels in the specified ad client for this AdSense account. + /// + /// # Arguments + /// + /// * `adClientId` - Ad client for which to list custom channels. pub fn list(&self, ad_client_id: &str) -> CustomchannelListCall<'a, C, NC, A> { CustomchannelListCall { hub: self.hub, @@ -2171,7 +2319,12 @@ impl<'a, C, NC, A> CustomchannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all ad units in the specified custom channel. + /// List all ad units in the specified custom channel. + /// + /// # Arguments + /// + /// * `adClientId` - Ad client which contains the custom channel. + /// * `customChannelId` - Custom channel for which to list ad units. pub fn adunits_list(&self, ad_client_id: &str, custom_channel_id: &str) -> CustomchannelAdunitListCall<'a, C, NC, A> { CustomchannelAdunitListCall { hub: self.hub, @@ -2198,7 +2351,7 @@ impl<'a, C, NC, A> CustomchannelMethods<'a, C, NC, A> { /// List all URL channels in the specified ad client for this AdSense account. /// /// A builder for the *list* method supported by a *urlchannel* resource. -/// It is not used directly, but through a `UrlchannelMethods`. +/// It is not used directly, but through a `UrlchannelMethods` instance. /// /// # Example /// @@ -2266,7 +2419,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "adClientId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2319,7 +2472,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2331,7 +2484,6 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -2341,7 +2493,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2352,7 +2504,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2361,13 +2513,13 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2379,7 +2531,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to list URL channels. + /// Ad client for which to list URL channels. pub fn ad_client_id(mut self, new_value: &str) -> UrlchannelListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -2387,7 +2539,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> UrlchannelListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2395,7 +2547,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of URL channels to include in the response, used for paging. + /// The maximum number of URL channels to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> UrlchannelListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2456,7 +2608,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ /// List all custom channels which the specified ad unit belongs to. /// /// A builder for the *customchannels.list* method supported by a *adunit* resource. -/// It is not used directly, but through a `AdunitMethods`. +/// It is not used directly, but through a `AdunitMethods` instance. /// /// # Example /// @@ -2526,7 +2678,7 @@ impl<'a, C, NC, A> AdunitCustomchannelListCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "adClientId", "adUnitId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2579,7 +2731,7 @@ impl<'a, C, NC, A> AdunitCustomchannelListCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2591,7 +2743,6 @@ impl<'a, C, NC, A> AdunitCustomchannelListCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -2601,7 +2752,7 @@ impl<'a, C, NC, A> AdunitCustomchannelListCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2612,7 +2763,7 @@ impl<'a, C, NC, A> AdunitCustomchannelListCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2621,13 +2772,13 @@ impl<'a, C, NC, A> AdunitCustomchannelListCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2639,7 +2790,7 @@ impl<'a, C, NC, A> AdunitCustomchannelListCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client which contains the ad unit. + /// Ad client which contains the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AdunitCustomchannelListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -2649,7 +2800,7 @@ impl<'a, C, NC, A> AdunitCustomchannelListCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad unit for which to list custom channels. + /// Ad unit for which to list custom channels. pub fn ad_unit_id(mut self, new_value: &str) -> AdunitCustomchannelListCall<'a, C, NC, A> { self._ad_unit_id = new_value.to_string(); self @@ -2657,7 +2808,7 @@ impl<'a, C, NC, A> AdunitCustomchannelListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AdunitCustomchannelListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2665,7 +2816,7 @@ impl<'a, C, NC, A> AdunitCustomchannelListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of custom channels to include in the response, used for paging. + /// The maximum number of custom channels to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> AdunitCustomchannelListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2726,7 +2877,7 @@ impl<'a, C, NC, A> AdunitCustomchannelListCall<'a, C, NC, A> where NC: hyper::ne /// Gets the specified ad unit in the specified ad client. /// /// A builder for the *get* method supported by a *adunit* resource. -/// It is not used directly, but through a `AdunitMethods`. +/// It is not used directly, but through a `AdunitMethods` instance. /// /// # Example /// @@ -2786,7 +2937,7 @@ impl<'a, C, NC, A> AdunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "adClientId", "adUnitId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2839,7 +2990,7 @@ impl<'a, C, NC, A> AdunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2851,7 +3002,6 @@ impl<'a, C, NC, A> AdunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -2861,7 +3011,7 @@ impl<'a, C, NC, A> AdunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2872,7 +3022,7 @@ impl<'a, C, NC, A> AdunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2881,13 +3031,13 @@ impl<'a, C, NC, A> AdunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2899,7 +3049,7 @@ impl<'a, C, NC, A> AdunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to get the ad unit. + /// Ad client for which to get the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AdunitGetCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -2909,7 +3059,7 @@ impl<'a, C, NC, A> AdunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad unit to retrieve. + /// Ad unit to retrieve. pub fn ad_unit_id(mut self, new_value: &str) -> AdunitGetCall<'a, C, NC, A> { self._ad_unit_id = new_value.to_string(); self @@ -2970,7 +3120,7 @@ impl<'a, C, NC, A> AdunitGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// List all ad units in the specified ad client for this AdSense account. /// /// A builder for the *list* method supported by a *adunit* resource. -/// It is not used directly, but through a `AdunitMethods`. +/// It is not used directly, but through a `AdunitMethods` instance. /// /// # Example /// @@ -3043,7 +3193,7 @@ impl<'a, C, NC, A> AdunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "adClientId", "pageToken", "maxResults", "includeInactive"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3096,7 +3246,7 @@ impl<'a, C, NC, A> AdunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3108,7 +3258,6 @@ impl<'a, C, NC, A> AdunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -3118,7 +3267,7 @@ impl<'a, C, NC, A> AdunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3129,7 +3278,7 @@ impl<'a, C, NC, A> AdunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3138,13 +3287,13 @@ impl<'a, C, NC, A> AdunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3156,7 +3305,7 @@ impl<'a, C, NC, A> AdunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to list ad units. + /// Ad client for which to list ad units. pub fn ad_client_id(mut self, new_value: &str) -> AdunitListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -3164,7 +3313,7 @@ impl<'a, C, NC, A> AdunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AdunitListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -3172,7 +3321,7 @@ impl<'a, C, NC, A> AdunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of ad units to include in the response, used for paging. + /// The maximum number of ad units to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> AdunitListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -3180,7 +3329,7 @@ impl<'a, C, NC, A> AdunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *include inactive* query property to the given value. /// /// - /// Whether to include inactive ad units. Default: true. + /// Whether to include inactive ad units. Default: true. pub fn include_inactive(mut self, new_value: bool) -> AdunitListCall<'a, C, NC, A> { self._include_inactive = Some(new_value); self @@ -3241,7 +3390,7 @@ impl<'a, C, NC, A> AdunitListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Get ad code for the specified ad unit. /// /// A builder for the *getAdCode* method supported by a *adunit* resource. -/// It is not used directly, but through a `AdunitMethods`. +/// It is not used directly, but through a `AdunitMethods` instance. /// /// # Example /// @@ -3301,7 +3450,7 @@ impl<'a, C, NC, A> AdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "adClientId", "adUnitId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3354,7 +3503,7 @@ impl<'a, C, NC, A> AdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3366,7 +3515,6 @@ impl<'a, C, NC, A> AdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -3376,7 +3524,7 @@ impl<'a, C, NC, A> AdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3387,7 +3535,7 @@ impl<'a, C, NC, A> AdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3396,13 +3544,13 @@ impl<'a, C, NC, A> AdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3414,7 +3562,7 @@ impl<'a, C, NC, A> AdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client with contains the ad unit. + /// Ad client with contains the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AdunitGetAdCodeCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -3424,7 +3572,7 @@ impl<'a, C, NC, A> AdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad unit to get the code for. + /// Ad unit to get the code for. pub fn ad_unit_id(mut self, new_value: &str) -> AdunitGetAdCodeCall<'a, C, NC, A> { self._ad_unit_id = new_value.to_string(); self @@ -3485,7 +3633,7 @@ impl<'a, C, NC, A> AdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net::Netwo /// List all ad clients in this AdSense account. /// /// A builder for the *list* method supported by a *adclient* resource. -/// It is not used directly, but through a `AdclientMethods`. +/// It is not used directly, but through a `AdclientMethods` instance. /// /// # Example /// @@ -3551,7 +3699,7 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3580,7 +3728,7 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3592,7 +3740,6 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -3602,7 +3749,7 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3613,7 +3760,7 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3622,13 +3769,13 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3638,7 +3785,7 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AdclientListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -3646,7 +3793,7 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of ad clients to include in the response, used for paging. + /// The maximum number of ad clients to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> AdclientListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -3707,7 +3854,7 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Dismiss (delete) the specified alert from the publisher's AdSense account. /// /// A builder for the *delete* method supported by a *alert* resource. -/// It is not used directly, but through a `AlertMethods`. +/// It is not used directly, but through a `AlertMethods` instance. /// /// # Example /// @@ -3765,7 +3912,7 @@ impl<'a, C, NC, A> AlertDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alertId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3817,7 +3964,7 @@ impl<'a, C, NC, A> AlertDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3829,7 +3976,6 @@ impl<'a, C, NC, A> AlertDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -3839,7 +3985,7 @@ impl<'a, C, NC, A> AlertDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3850,12 +3996,12 @@ impl<'a, C, NC, A> AlertDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3867,7 +4013,7 @@ impl<'a, C, NC, A> AlertDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Alert to delete. + /// Alert to delete. pub fn alert_id(mut self, new_value: &str) -> AlertDeleteCall<'a, C, NC, A> { self._alert_id = new_value.to_string(); self @@ -3928,7 +4074,7 @@ impl<'a, C, NC, A> AlertDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// List the alerts for this AdSense account. /// /// A builder for the *list* method supported by a *alert* resource. -/// It is not used directly, but through a `AlertMethods`. +/// It is not used directly, but through a `AlertMethods` instance. /// /// # Example /// @@ -3989,7 +4135,7 @@ impl<'a, C, NC, A> AlertListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "locale"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4018,7 +4164,7 @@ impl<'a, C, NC, A> AlertListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4030,7 +4176,6 @@ impl<'a, C, NC, A> AlertListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -4040,7 +4185,7 @@ impl<'a, C, NC, A> AlertListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4051,7 +4196,7 @@ impl<'a, C, NC, A> AlertListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4060,13 +4205,13 @@ impl<'a, C, NC, A> AlertListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4076,7 +4221,7 @@ impl<'a, C, NC, A> AlertListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *locale* query property to the given value. /// /// - /// The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported. + /// The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported. pub fn locale(mut self, new_value: &str) -> AlertListCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -4137,7 +4282,7 @@ impl<'a, C, NC, A> AlertListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// List all saved ad styles in the user's account. /// /// A builder for the *list* method supported by a *savedadstyle* resource. -/// It is not used directly, but through a `SavedadstyleMethods`. +/// It is not used directly, but through a `SavedadstyleMethods` instance. /// /// # Example /// @@ -4203,7 +4348,7 @@ impl<'a, C, NC, A> SavedadstyleListCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4232,7 +4377,7 @@ impl<'a, C, NC, A> SavedadstyleListCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4244,7 +4389,6 @@ impl<'a, C, NC, A> SavedadstyleListCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -4254,7 +4398,7 @@ impl<'a, C, NC, A> SavedadstyleListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4265,7 +4409,7 @@ impl<'a, C, NC, A> SavedadstyleListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4274,13 +4418,13 @@ impl<'a, C, NC, A> SavedadstyleListCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4290,7 +4434,7 @@ impl<'a, C, NC, A> SavedadstyleListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through saved ad styles. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through saved ad styles. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> SavedadstyleListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -4298,7 +4442,7 @@ impl<'a, C, NC, A> SavedadstyleListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of saved ad styles to include in the response, used for paging. + /// The maximum number of saved ad styles to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> SavedadstyleListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -4359,7 +4503,7 @@ impl<'a, C, NC, A> SavedadstyleListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Get a specific saved ad style from the user's account. /// /// A builder for the *get* method supported by a *savedadstyle* resource. -/// It is not used directly, but through a `SavedadstyleMethods`. +/// It is not used directly, but through a `SavedadstyleMethods` instance. /// /// # Example /// @@ -4417,7 +4561,7 @@ impl<'a, C, NC, A> SavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "savedAdStyleId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4470,7 +4614,7 @@ impl<'a, C, NC, A> SavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4482,7 +4626,6 @@ impl<'a, C, NC, A> SavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -4492,7 +4635,7 @@ impl<'a, C, NC, A> SavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4503,7 +4646,7 @@ impl<'a, C, NC, A> SavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4512,13 +4655,13 @@ impl<'a, C, NC, A> SavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4530,7 +4673,7 @@ impl<'a, C, NC, A> SavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Saved ad style to retrieve. + /// Saved ad style to retrieve. pub fn saved_ad_style_id(mut self, new_value: &str) -> SavedadstyleGetCall<'a, C, NC, A> { self._saved_ad_style_id = new_value.to_string(); self @@ -4591,7 +4734,7 @@ impl<'a, C, NC, A> SavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// List all saved reports in this AdSense account. /// /// A builder for the *saved.list* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -4657,7 +4800,7 @@ impl<'a, C, NC, A> ReportSavedListCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4686,7 +4829,7 @@ impl<'a, C, NC, A> ReportSavedListCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4698,7 +4841,6 @@ impl<'a, C, NC, A> ReportSavedListCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -4708,7 +4850,7 @@ impl<'a, C, NC, A> ReportSavedListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4719,7 +4861,7 @@ impl<'a, C, NC, A> ReportSavedListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4728,13 +4870,13 @@ impl<'a, C, NC, A> ReportSavedListCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4744,7 +4886,7 @@ impl<'a, C, NC, A> ReportSavedListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> ReportSavedListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -4752,7 +4894,7 @@ impl<'a, C, NC, A> ReportSavedListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of saved reports to include in the response, used for paging. + /// The maximum number of saved reports to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> ReportSavedListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -4818,7 +4960,7 @@ impl<'a, C, NC, A> ReportSavedListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// but not the `AdsenseReportsGenerateResponse` structure that you would usually get. The latter will be a default value. /// /// A builder for the *generate* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -4948,7 +5090,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["startDate", "endDate", "useTimezoneReporting", "startIndex", "sort", "metric", "maxResults", "locale", "filter", "dimension", "currency", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4993,7 +5135,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5005,7 +5147,6 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -5015,7 +5156,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5026,7 +5167,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = if enable_resource_parsing { let mut json_response = String::new(); @@ -5035,13 +5176,13 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } } else { (res, Default::default()) }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5053,7 +5194,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn start_date(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._start_date = new_value.to_string(); self @@ -5063,7 +5204,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn end_date(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._end_date = new_value.to_string(); self @@ -5071,7 +5212,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *use timezone reporting* query property to the given value. /// /// - /// Whether the report should be generated in the AdSense account's local timezone. If false default PST/PDT timezone will be used. + /// Whether the report should be generated in the AdSense account's local timezone. If false default PST/PDT timezone will be used. pub fn use_timezone_reporting(mut self, new_value: bool) -> ReportGenerateCall<'a, C, NC, A> { self._use_timezone_reporting = Some(new_value); self @@ -5079,7 +5220,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *start index* query property to the given value. /// /// - /// Index of the first row of report data to return. + /// Index of the first row of report data to return. pub fn start_index(mut self, new_value: i32) -> ReportGenerateCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -5088,7 +5229,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. + /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. pub fn add_sort(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._sort.push(new_value.to_string()); self @@ -5097,7 +5238,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Numeric columns to include in the report. + /// Numeric columns to include in the report. pub fn add_metric(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._metric.push(new_value.to_string()); self @@ -5105,7 +5246,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of rows of report data to return. + /// The maximum number of rows of report data to return. pub fn max_results(mut self, new_value: i32) -> ReportGenerateCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -5113,7 +5254,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *locale* query property to the given value. /// /// - /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. pub fn locale(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -5122,7 +5263,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Filters to be run on the report. + /// Filters to be run on the report. pub fn add_filter(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._filter.push(new_value.to_string()); self @@ -5131,7 +5272,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Dimensions to base the report on. + /// Dimensions to base the report on. pub fn add_dimension(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._dimension.push(new_value.to_string()); self @@ -5139,7 +5280,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *currency* query property to the given value. /// /// - /// Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set. + /// Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set. pub fn currency(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._currency = Some(new_value.to_string()); self @@ -5148,7 +5289,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Accounts upon which to report. + /// Accounts upon which to report. pub fn add_account_id(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._account_id.push(new_value.to_string()); self @@ -5209,7 +5350,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Generate an AdSense report based on the saved report ID sent in the query parameters. /// /// A builder for the *saved.generate* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -5282,7 +5423,7 @@ impl<'a, C, NC, A> ReportSavedGenerateCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "savedReportId", "startIndex", "maxResults", "locale"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5335,7 +5476,7 @@ impl<'a, C, NC, A> ReportSavedGenerateCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5347,7 +5488,6 @@ impl<'a, C, NC, A> ReportSavedGenerateCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -5357,7 +5497,7 @@ impl<'a, C, NC, A> ReportSavedGenerateCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5368,7 +5508,7 @@ impl<'a, C, NC, A> ReportSavedGenerateCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5377,13 +5517,13 @@ impl<'a, C, NC, A> ReportSavedGenerateCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5395,7 +5535,7 @@ impl<'a, C, NC, A> ReportSavedGenerateCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The saved report to retrieve. + /// The saved report to retrieve. pub fn saved_report_id(mut self, new_value: &str) -> ReportSavedGenerateCall<'a, C, NC, A> { self._saved_report_id = new_value.to_string(); self @@ -5403,7 +5543,7 @@ impl<'a, C, NC, A> ReportSavedGenerateCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *start index* query property to the given value. /// /// - /// Index of the first row of report data to return. + /// Index of the first row of report data to return. pub fn start_index(mut self, new_value: i32) -> ReportSavedGenerateCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -5411,7 +5551,7 @@ impl<'a, C, NC, A> ReportSavedGenerateCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of rows of report data to return. + /// The maximum number of rows of report data to return. pub fn max_results(mut self, new_value: i32) -> ReportSavedGenerateCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -5419,7 +5559,7 @@ impl<'a, C, NC, A> ReportSavedGenerateCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *locale* query property to the given value. /// /// - /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. pub fn locale(mut self, new_value: &str) -> ReportSavedGenerateCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -5480,7 +5620,7 @@ impl<'a, C, NC, A> ReportSavedGenerateCall<'a, C, NC, A> where NC: hyper::net::N /// Dismiss (delete) the specified alert from the specified publisher AdSense account. /// /// A builder for the *alerts.delete* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -5540,7 +5680,7 @@ impl<'a, C, NC, A> AccountAlertDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["accountId", "alertId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5592,7 +5732,7 @@ impl<'a, C, NC, A> AccountAlertDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5604,7 +5744,6 @@ impl<'a, C, NC, A> AccountAlertDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -5614,7 +5753,7 @@ impl<'a, C, NC, A> AccountAlertDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5625,12 +5764,12 @@ impl<'a, C, NC, A> AccountAlertDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5642,7 +5781,7 @@ impl<'a, C, NC, A> AccountAlertDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account which contains the ad unit. + /// Account which contains the ad unit. pub fn account_id(mut self, new_value: &str) -> AccountAlertDeleteCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -5652,7 +5791,7 @@ impl<'a, C, NC, A> AccountAlertDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Alert to delete. + /// Alert to delete. pub fn alert_id(mut self, new_value: &str) -> AccountAlertDeleteCall<'a, C, NC, A> { self._alert_id = new_value.to_string(); self @@ -5713,7 +5852,7 @@ impl<'a, C, NC, A> AccountAlertDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne /// List the alerts for the specified AdSense account. /// /// A builder for the *alerts.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -5776,7 +5915,7 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "accountId", "locale"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5829,7 +5968,7 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5841,7 +5980,6 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -5851,7 +5989,7 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5862,7 +6000,7 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5871,13 +6009,13 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5889,7 +6027,7 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account for which to retrieve the alerts. + /// Account for which to retrieve the alerts. pub fn account_id(mut self, new_value: &str) -> AccountAlertListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -5897,7 +6035,7 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *locale* query property to the given value. /// /// - /// The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported. + /// The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported. pub fn locale(mut self, new_value: &str) -> AccountAlertListCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -5958,7 +6096,7 @@ impl<'a, C, NC, A> AccountAlertListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Generate an AdSense report based on the saved report ID sent in the query parameters. /// /// A builder for the *reports.saved.generate* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -6033,7 +6171,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "accountId", "savedReportId", "startIndex", "maxResults", "locale"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6086,7 +6224,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6098,7 +6236,6 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -6108,7 +6245,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6119,7 +6256,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6128,13 +6265,13 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6146,7 +6283,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to which the saved reports belong. + /// Account to which the saved reports belong. pub fn account_id(mut self, new_value: &str) -> AccountReportSavedGenerateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -6156,7 +6293,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The saved report to retrieve. + /// The saved report to retrieve. pub fn saved_report_id(mut self, new_value: &str) -> AccountReportSavedGenerateCall<'a, C, NC, A> { self._saved_report_id = new_value.to_string(); self @@ -6164,7 +6301,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: /// Sets the *start index* query property to the given value. /// /// - /// Index of the first row of report data to return. + /// Index of the first row of report data to return. pub fn start_index(mut self, new_value: i32) -> AccountReportSavedGenerateCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -6172,7 +6309,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of rows of report data to return. + /// The maximum number of rows of report data to return. pub fn max_results(mut self, new_value: i32) -> AccountReportSavedGenerateCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -6180,7 +6317,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: /// Sets the *locale* query property to the given value. /// /// - /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. pub fn locale(mut self, new_value: &str) -> AccountReportSavedGenerateCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -6241,7 +6378,7 @@ impl<'a, C, NC, A> AccountReportSavedGenerateCall<'a, C, NC, A> where NC: hyper: /// List all accounts available to this AdSense account. /// /// A builder for the *list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -6307,7 +6444,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6336,7 +6473,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6348,7 +6485,6 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -6358,7 +6494,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6369,7 +6505,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6378,13 +6514,13 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6394,7 +6530,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through accounts. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through accounts. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -6402,7 +6538,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of accounts to include in the response, used for paging. + /// The maximum number of accounts to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> AccountListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -6463,7 +6599,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// List the payments for the specified AdSense account. /// /// A builder for the *payments.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -6521,7 +6657,7 @@ impl<'a, C, NC, A> AccountPaymentListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6574,7 +6710,7 @@ impl<'a, C, NC, A> AccountPaymentListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6586,7 +6722,6 @@ impl<'a, C, NC, A> AccountPaymentListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -6596,7 +6731,7 @@ impl<'a, C, NC, A> AccountPaymentListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6607,7 +6742,7 @@ impl<'a, C, NC, A> AccountPaymentListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6616,13 +6751,13 @@ impl<'a, C, NC, A> AccountPaymentListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6634,7 +6769,7 @@ impl<'a, C, NC, A> AccountPaymentListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account for which to retrieve the payments. + /// Account for which to retrieve the payments. pub fn account_id(mut self, new_value: &str) -> AccountPaymentListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -6695,7 +6830,7 @@ impl<'a, C, NC, A> AccountPaymentListCall<'a, C, NC, A> where NC: hyper::net::Ne /// List a specific saved ad style for the specified account. /// /// A builder for the *savedadstyles.get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -6755,7 +6890,7 @@ impl<'a, C, NC, A> AccountSavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "accountId", "savedAdStyleId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6808,7 +6943,7 @@ impl<'a, C, NC, A> AccountSavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6820,7 +6955,6 @@ impl<'a, C, NC, A> AccountSavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -6830,7 +6964,7 @@ impl<'a, C, NC, A> AccountSavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6841,7 +6975,7 @@ impl<'a, C, NC, A> AccountSavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6850,13 +6984,13 @@ impl<'a, C, NC, A> AccountSavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6868,7 +7002,7 @@ impl<'a, C, NC, A> AccountSavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account for which to get the saved ad style. + /// Account for which to get the saved ad style. pub fn account_id(mut self, new_value: &str) -> AccountSavedadstyleGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -6878,7 +7012,7 @@ impl<'a, C, NC, A> AccountSavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Saved ad style to retrieve. + /// Saved ad style to retrieve. pub fn saved_ad_style_id(mut self, new_value: &str) -> AccountSavedadstyleGetCall<'a, C, NC, A> { self._saved_ad_style_id = new_value.to_string(); self @@ -6939,7 +7073,7 @@ impl<'a, C, NC, A> AccountSavedadstyleGetCall<'a, C, NC, A> where NC: hyper::net /// Gets the specified ad unit in the specified ad client for the specified account. /// /// A builder for the *adunits.get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -7001,7 +7135,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "accountId", "adClientId", "adUnitId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7054,7 +7188,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7066,7 +7200,6 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -7076,7 +7209,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7087,7 +7220,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7096,13 +7229,13 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7114,7 +7247,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to which the ad client belongs. + /// Account to which the ad client belongs. pub fn account_id(mut self, new_value: &str) -> AccountAdunitGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -7124,7 +7257,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to get the ad unit. + /// Ad client for which to get the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitGetCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -7134,7 +7267,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad unit to retrieve. + /// Ad unit to retrieve. pub fn ad_unit_id(mut self, new_value: &str) -> AccountAdunitGetCall<'a, C, NC, A> { self._ad_unit_id = new_value.to_string(); self @@ -7195,7 +7328,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Get the specified custom channel from the specified ad client for the specified account. /// /// A builder for the *customchannels.get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -7257,7 +7390,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "accountId", "adClientId", "customChannelId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7310,7 +7443,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7322,7 +7455,6 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -7332,7 +7464,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7343,7 +7475,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7352,13 +7484,13 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7370,7 +7502,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to which the ad client belongs. + /// Account to which the ad client belongs. pub fn account_id(mut self, new_value: &str) -> AccountCustomchannelGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -7380,7 +7512,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client which contains the custom channel. + /// Ad client which contains the custom channel. pub fn ad_client_id(mut self, new_value: &str) -> AccountCustomchannelGetCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -7390,7 +7522,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom channel to retrieve. + /// Custom channel to retrieve. pub fn custom_channel_id(mut self, new_value: &str) -> AccountCustomchannelGetCall<'a, C, NC, A> { self._custom_channel_id = new_value.to_string(); self @@ -7451,7 +7583,7 @@ impl<'a, C, NC, A> AccountCustomchannelGetCall<'a, C, NC, A> where NC: hyper::ne /// List all ad units in the specified custom channel. /// /// A builder for the *customchannels.adunits.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -7528,7 +7660,7 @@ impl<'a, C, NC, A> AccountCustomchannelAdunitListCall<'a, C, NC, A> where NC: hy for &field in ["alt", "accountId", "adClientId", "customChannelId", "pageToken", "maxResults", "includeInactive"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7581,7 +7713,7 @@ impl<'a, C, NC, A> AccountCustomchannelAdunitListCall<'a, C, NC, A> where NC: hy } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7593,7 +7725,6 @@ impl<'a, C, NC, A> AccountCustomchannelAdunitListCall<'a, C, NC, A> where NC: hy dlg.pre_request(); req.send() - }; match req_result { @@ -7603,7 +7734,7 @@ impl<'a, C, NC, A> AccountCustomchannelAdunitListCall<'a, C, NC, A> where NC: hy continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7614,7 +7745,7 @@ impl<'a, C, NC, A> AccountCustomchannelAdunitListCall<'a, C, NC, A> where NC: hy continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7623,13 +7754,13 @@ impl<'a, C, NC, A> AccountCustomchannelAdunitListCall<'a, C, NC, A> where NC: hy Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7641,7 +7772,7 @@ impl<'a, C, NC, A> AccountCustomchannelAdunitListCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to which the ad client belongs. + /// Account to which the ad client belongs. pub fn account_id(mut self, new_value: &str) -> AccountCustomchannelAdunitListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -7651,7 +7782,7 @@ impl<'a, C, NC, A> AccountCustomchannelAdunitListCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client which contains the custom channel. + /// Ad client which contains the custom channel. pub fn ad_client_id(mut self, new_value: &str) -> AccountCustomchannelAdunitListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -7661,7 +7792,7 @@ impl<'a, C, NC, A> AccountCustomchannelAdunitListCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom channel for which to list ad units. + /// Custom channel for which to list ad units. pub fn custom_channel_id(mut self, new_value: &str) -> AccountCustomchannelAdunitListCall<'a, C, NC, A> { self._custom_channel_id = new_value.to_string(); self @@ -7669,7 +7800,7 @@ impl<'a, C, NC, A> AccountCustomchannelAdunitListCall<'a, C, NC, A> where NC: hy /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountCustomchannelAdunitListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -7677,7 +7808,7 @@ impl<'a, C, NC, A> AccountCustomchannelAdunitListCall<'a, C, NC, A> where NC: hy /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of ad units to include in the response, used for paging. + /// The maximum number of ad units to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> AccountCustomchannelAdunitListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -7685,7 +7816,7 @@ impl<'a, C, NC, A> AccountCustomchannelAdunitListCall<'a, C, NC, A> where NC: hy /// Sets the *include inactive* query property to the given value. /// /// - /// Whether to include inactive ad units. Default: true. + /// Whether to include inactive ad units. Default: true. pub fn include_inactive(mut self, new_value: bool) -> AccountCustomchannelAdunitListCall<'a, C, NC, A> { self._include_inactive = Some(new_value); self @@ -7746,7 +7877,7 @@ impl<'a, C, NC, A> AccountCustomchannelAdunitListCall<'a, C, NC, A> where NC: hy /// List all saved reports in the specified AdSense account. /// /// A builder for the *reports.saved.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -7814,7 +7945,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "accountId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7867,7 +7998,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7879,7 +8010,6 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -7889,7 +8019,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7900,7 +8030,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7909,13 +8039,13 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7927,7 +8057,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to which the saved reports belong. + /// Account to which the saved reports belong. pub fn account_id(mut self, new_value: &str) -> AccountReportSavedListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -7935,7 +8065,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountReportSavedListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -7943,7 +8073,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of saved reports to include in the response, used for paging. + /// The maximum number of saved reports to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> AccountReportSavedListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -8004,7 +8134,7 @@ impl<'a, C, NC, A> AccountReportSavedListCall<'a, C, NC, A> where NC: hyper::net /// List all URL channels in the specified ad client for the specified account. /// /// A builder for the *urlchannels.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -8074,7 +8204,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "accountId", "adClientId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8127,7 +8257,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8139,7 +8269,6 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -8149,7 +8278,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8160,7 +8289,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8169,13 +8298,13 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8187,7 +8316,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to which the ad client belongs. + /// Account to which the ad client belongs. pub fn account_id(mut self, new_value: &str) -> AccountUrlchannelListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -8197,7 +8326,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to list URL channels. + /// Ad client for which to list URL channels. pub fn ad_client_id(mut self, new_value: &str) -> AccountUrlchannelListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -8205,7 +8334,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountUrlchannelListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -8213,7 +8342,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of URL channels to include in the response, used for paging. + /// The maximum number of URL channels to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> AccountUrlchannelListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -8274,7 +8403,7 @@ impl<'a, C, NC, A> AccountUrlchannelListCall<'a, C, NC, A> where NC: hyper::net: /// List all ad units in the specified ad client for the specified account. /// /// A builder for the *adunits.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -8349,7 +8478,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "accountId", "adClientId", "pageToken", "maxResults", "includeInactive"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8402,7 +8531,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8414,7 +8543,6 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -8424,7 +8552,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8435,7 +8563,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8444,13 +8572,13 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8462,7 +8590,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to which the ad client belongs. + /// Account to which the ad client belongs. pub fn account_id(mut self, new_value: &str) -> AccountAdunitListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -8472,7 +8600,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to list ad units. + /// Ad client for which to list ad units. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -8480,7 +8608,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountAdunitListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -8488,7 +8616,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of ad units to include in the response, used for paging. + /// The maximum number of ad units to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> AccountAdunitListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -8496,7 +8624,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *include inactive* query property to the given value. /// /// - /// Whether to include inactive ad units. Default: true. + /// Whether to include inactive ad units. Default: true. pub fn include_inactive(mut self, new_value: bool) -> AccountAdunitListCall<'a, C, NC, A> { self._include_inactive = Some(new_value); self @@ -8562,7 +8690,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net /// but not the `AdsenseReportsGenerateResponse` structure that you would usually get. The latter will be a default value. /// /// A builder for the *reports.generate* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -8685,7 +8813,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: for &field in ["accountId", "startDate", "endDate", "useTimezoneReporting", "startIndex", "sort", "metric", "maxResults", "locale", "filter", "dimension", "currency"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8754,7 +8882,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8766,7 +8894,6 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -8776,7 +8903,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8787,7 +8914,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = if enable_resource_parsing { let mut json_response = String::new(); @@ -8796,13 +8923,13 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } } else { (res, Default::default()) }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8814,7 +8941,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account upon which to report. + /// Account upon which to report. pub fn account_id(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -8824,7 +8951,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn start_date(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._start_date = new_value.to_string(); self @@ -8834,7 +8961,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn end_date(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._end_date = new_value.to_string(); self @@ -8842,7 +8969,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *use timezone reporting* query property to the given value. /// /// - /// Whether the report should be generated in the AdSense account's local timezone. If false default PST/PDT timezone will be used. + /// Whether the report should be generated in the AdSense account's local timezone. If false default PST/PDT timezone will be used. pub fn use_timezone_reporting(mut self, new_value: bool) -> AccountReportGenerateCall<'a, C, NC, A> { self._use_timezone_reporting = Some(new_value); self @@ -8850,7 +8977,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *start index* query property to the given value. /// /// - /// Index of the first row of report data to return. + /// Index of the first row of report data to return. pub fn start_index(mut self, new_value: i32) -> AccountReportGenerateCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -8859,7 +8986,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. + /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. pub fn add_sort(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._sort.push(new_value.to_string()); self @@ -8868,7 +8995,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Numeric columns to include in the report. + /// Numeric columns to include in the report. pub fn add_metric(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._metric.push(new_value.to_string()); self @@ -8876,7 +9003,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of rows of report data to return. + /// The maximum number of rows of report data to return. pub fn max_results(mut self, new_value: i32) -> AccountReportGenerateCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -8884,7 +9011,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *locale* query property to the given value. /// /// - /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. pub fn locale(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -8893,7 +9020,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Filters to be run on the report. + /// Filters to be run on the report. pub fn add_filter(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._filter.push(new_value.to_string()); self @@ -8902,7 +9029,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Dimensions to base the report on. + /// Dimensions to base the report on. pub fn add_dimension(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._dimension.push(new_value.to_string()); self @@ -8910,7 +9037,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *currency* query property to the given value. /// /// - /// Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set. + /// Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set. pub fn currency(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._currency = Some(new_value.to_string()); self @@ -8971,7 +9098,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// List all ad clients in the specified account. /// /// A builder for the *adclients.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -9039,7 +9166,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "accountId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9092,7 +9219,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9104,7 +9231,6 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -9114,7 +9240,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9125,7 +9251,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9134,13 +9260,13 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9152,7 +9278,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account for which to list ad clients. + /// Account for which to list ad clients. pub fn account_id(mut self, new_value: &str) -> AccountAdclientListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -9160,7 +9286,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountAdclientListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -9168,7 +9294,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of ad clients to include in the response, used for paging. + /// The maximum number of ad clients to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> AccountAdclientListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -9229,7 +9355,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N /// List all custom channels in the specified ad client for the specified account. /// /// A builder for the *customchannels.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -9299,7 +9425,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "accountId", "adClientId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9352,7 +9478,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9364,7 +9490,6 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -9374,7 +9499,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9385,7 +9510,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9394,13 +9519,13 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9412,7 +9537,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to which the ad client belongs. + /// Account to which the ad client belongs. pub fn account_id(mut self, new_value: &str) -> AccountCustomchannelListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -9422,7 +9547,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to list custom channels. + /// Ad client for which to list custom channels. pub fn ad_client_id(mut self, new_value: &str) -> AccountCustomchannelListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -9430,7 +9555,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountCustomchannelListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -9438,7 +9563,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of custom channels to include in the response, used for paging. + /// The maximum number of custom channels to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> AccountCustomchannelListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -9499,7 +9624,7 @@ impl<'a, C, NC, A> AccountCustomchannelListCall<'a, C, NC, A> where NC: hyper::n /// List all saved ad styles in the specified account. /// /// A builder for the *savedadstyles.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -9567,7 +9692,7 @@ impl<'a, C, NC, A> AccountSavedadstyleListCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "accountId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9620,7 +9745,7 @@ impl<'a, C, NC, A> AccountSavedadstyleListCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9632,7 +9757,6 @@ impl<'a, C, NC, A> AccountSavedadstyleListCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -9642,7 +9766,7 @@ impl<'a, C, NC, A> AccountSavedadstyleListCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9653,7 +9777,7 @@ impl<'a, C, NC, A> AccountSavedadstyleListCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9662,13 +9786,13 @@ impl<'a, C, NC, A> AccountSavedadstyleListCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9680,7 +9804,7 @@ impl<'a, C, NC, A> AccountSavedadstyleListCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account for which to list saved ad styles. + /// Account for which to list saved ad styles. pub fn account_id(mut self, new_value: &str) -> AccountSavedadstyleListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -9688,7 +9812,7 @@ impl<'a, C, NC, A> AccountSavedadstyleListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through saved ad styles. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through saved ad styles. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountSavedadstyleListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -9696,7 +9820,7 @@ impl<'a, C, NC, A> AccountSavedadstyleListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of saved ad styles to include in the response, used for paging. + /// The maximum number of saved ad styles to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> AccountSavedadstyleListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -9757,7 +9881,7 @@ impl<'a, C, NC, A> AccountSavedadstyleListCall<'a, C, NC, A> where NC: hyper::ne /// Get ad code for the specified ad unit. /// /// A builder for the *adunits.getAdCode* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -9819,7 +9943,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "accountId", "adClientId", "adUnitId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9872,7 +9996,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9884,7 +10008,6 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -9894,7 +10017,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9905,7 +10028,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9914,13 +10037,13 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9932,7 +10055,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account which contains the ad client. + /// Account which contains the ad client. pub fn account_id(mut self, new_value: &str) -> AccountAdunitGetAdCodeCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -9942,7 +10065,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client with contains the ad unit. + /// Ad client with contains the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitGetAdCodeCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -9952,7 +10075,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad unit to get the code for. + /// Ad unit to get the code for. pub fn ad_unit_id(mut self, new_value: &str) -> AccountAdunitGetAdCodeCall<'a, C, NC, A> { self._ad_unit_id = new_value.to_string(); self @@ -10013,7 +10136,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net /// List all custom channels which the specified ad unit belongs to. /// /// A builder for the *adunits.customchannels.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -10085,7 +10208,7 @@ impl<'a, C, NC, A> AccountAdunitCustomchannelListCall<'a, C, NC, A> where NC: hy for &field in ["alt", "accountId", "adClientId", "adUnitId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10138,7 +10261,7 @@ impl<'a, C, NC, A> AccountAdunitCustomchannelListCall<'a, C, NC, A> where NC: hy } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10150,7 +10273,6 @@ impl<'a, C, NC, A> AccountAdunitCustomchannelListCall<'a, C, NC, A> where NC: hy dlg.pre_request(); req.send() - }; match req_result { @@ -10160,7 +10282,7 @@ impl<'a, C, NC, A> AccountAdunitCustomchannelListCall<'a, C, NC, A> where NC: hy continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10171,7 +10293,7 @@ impl<'a, C, NC, A> AccountAdunitCustomchannelListCall<'a, C, NC, A> where NC: hy continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10180,13 +10302,13 @@ impl<'a, C, NC, A> AccountAdunitCustomchannelListCall<'a, C, NC, A> where NC: hy Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10198,7 +10320,7 @@ impl<'a, C, NC, A> AccountAdunitCustomchannelListCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to which the ad client belongs. + /// Account to which the ad client belongs. pub fn account_id(mut self, new_value: &str) -> AccountAdunitCustomchannelListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -10208,7 +10330,7 @@ impl<'a, C, NC, A> AccountAdunitCustomchannelListCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client which contains the ad unit. + /// Ad client which contains the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitCustomchannelListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -10218,7 +10340,7 @@ impl<'a, C, NC, A> AccountAdunitCustomchannelListCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad unit for which to list custom channels. + /// Ad unit for which to list custom channels. pub fn ad_unit_id(mut self, new_value: &str) -> AccountAdunitCustomchannelListCall<'a, C, NC, A> { self._ad_unit_id = new_value.to_string(); self @@ -10226,7 +10348,7 @@ impl<'a, C, NC, A> AccountAdunitCustomchannelListCall<'a, C, NC, A> where NC: hy /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountAdunitCustomchannelListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -10234,7 +10356,7 @@ impl<'a, C, NC, A> AccountAdunitCustomchannelListCall<'a, C, NC, A> where NC: hy /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of custom channels to include in the response, used for paging. + /// The maximum number of custom channels to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> AccountAdunitCustomchannelListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -10295,7 +10417,7 @@ impl<'a, C, NC, A> AccountAdunitCustomchannelListCall<'a, C, NC, A> where NC: hy /// Get information about the selected AdSense account. /// /// A builder for the *get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -10358,7 +10480,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "accountId", "tree"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10411,7 +10533,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10423,7 +10545,6 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -10433,7 +10554,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10444,7 +10565,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10453,13 +10574,13 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10471,7 +10592,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to get information about. + /// Account to get information about. pub fn account_id(mut self, new_value: &str) -> AccountGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -10479,7 +10600,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *tree* query property to the given value. /// /// - /// Whether the tree of sub accounts should be returned. + /// Whether the tree of sub accounts should be returned. pub fn tree(mut self, new_value: bool) -> AccountGetCall<'a, C, NC, A> { self._tree = Some(new_value); self @@ -10540,7 +10661,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// List the payments for this AdSense account. /// /// A builder for the *list* method supported by a *payment* resource. -/// It is not used directly, but through a `PaymentMethods`. +/// It is not used directly, but through a `PaymentMethods` instance. /// /// # Example /// @@ -10596,7 +10717,7 @@ impl<'a, C, NC, A> PaymentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10625,7 +10746,7 @@ impl<'a, C, NC, A> PaymentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10637,7 +10758,6 @@ impl<'a, C, NC, A> PaymentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -10647,7 +10767,7 @@ impl<'a, C, NC, A> PaymentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10658,7 +10778,7 @@ impl<'a, C, NC, A> PaymentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10667,13 +10787,13 @@ impl<'a, C, NC, A> PaymentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10736,7 +10856,7 @@ impl<'a, C, NC, A> PaymentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// List the metadata for the dimensions available to this AdSense account. /// /// A builder for the *dimensions.list* method supported by a *metadata* resource. -/// It is not used directly, but through a `MetadataMethods`. +/// It is not used directly, but through a `MetadataMethods` instance. /// /// # Example /// @@ -10792,7 +10912,7 @@ impl<'a, C, NC, A> MetadataDimensionListCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10821,7 +10941,7 @@ impl<'a, C, NC, A> MetadataDimensionListCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10833,7 +10953,6 @@ impl<'a, C, NC, A> MetadataDimensionListCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -10843,7 +10962,7 @@ impl<'a, C, NC, A> MetadataDimensionListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10854,7 +10973,7 @@ impl<'a, C, NC, A> MetadataDimensionListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10863,13 +10982,13 @@ impl<'a, C, NC, A> MetadataDimensionListCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10932,7 +11051,7 @@ impl<'a, C, NC, A> MetadataDimensionListCall<'a, C, NC, A> where NC: hyper::net: /// List the metadata for the metrics available to this AdSense account. /// /// A builder for the *metrics.list* method supported by a *metadata* resource. -/// It is not used directly, but through a `MetadataMethods`. +/// It is not used directly, but through a `MetadataMethods` instance. /// /// # Example /// @@ -10988,7 +11107,7 @@ impl<'a, C, NC, A> MetadataMetricListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11017,7 +11136,7 @@ impl<'a, C, NC, A> MetadataMetricListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11029,7 +11148,6 @@ impl<'a, C, NC, A> MetadataMetricListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -11039,7 +11157,7 @@ impl<'a, C, NC, A> MetadataMetricListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11050,7 +11168,7 @@ impl<'a, C, NC, A> MetadataMetricListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11059,13 +11177,13 @@ impl<'a, C, NC, A> MetadataMetricListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11128,7 +11246,7 @@ impl<'a, C, NC, A> MetadataMetricListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Get the specified custom channel from the specified ad client. /// /// A builder for the *get* method supported by a *customchannel* resource. -/// It is not used directly, but through a `CustomchannelMethods`. +/// It is not used directly, but through a `CustomchannelMethods` instance. /// /// # Example /// @@ -11188,7 +11306,7 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "adClientId", "customChannelId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11241,7 +11359,7 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11253,7 +11371,6 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -11263,7 +11380,7 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11274,7 +11391,7 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11283,13 +11400,13 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11301,7 +11418,7 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client which contains the custom channel. + /// Ad client which contains the custom channel. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelGetCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -11311,7 +11428,7 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom channel to retrieve. + /// Custom channel to retrieve. pub fn custom_channel_id(mut self, new_value: &str) -> CustomchannelGetCall<'a, C, NC, A> { self._custom_channel_id = new_value.to_string(); self @@ -11372,7 +11489,7 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// List all custom channels in the specified ad client for this AdSense account. /// /// A builder for the *list* method supported by a *customchannel* resource. -/// It is not used directly, but through a `CustomchannelMethods`. +/// It is not used directly, but through a `CustomchannelMethods` instance. /// /// # Example /// @@ -11440,7 +11557,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "adClientId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11493,7 +11610,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11505,7 +11622,6 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -11515,7 +11631,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11526,7 +11642,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11535,13 +11651,13 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11553,7 +11669,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to list custom channels. + /// Ad client for which to list custom channels. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -11561,7 +11677,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> CustomchannelListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -11569,7 +11685,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of custom channels to include in the response, used for paging. + /// The maximum number of custom channels to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> CustomchannelListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -11630,7 +11746,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net /// List all ad units in the specified custom channel. /// /// A builder for the *adunits.list* method supported by a *customchannel* resource. -/// It is not used directly, but through a `CustomchannelMethods`. +/// It is not used directly, but through a `CustomchannelMethods` instance. /// /// # Example /// @@ -11705,7 +11821,7 @@ impl<'a, C, NC, A> CustomchannelAdunitListCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "adClientId", "customChannelId", "pageToken", "maxResults", "includeInactive"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11758,7 +11874,7 @@ impl<'a, C, NC, A> CustomchannelAdunitListCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11770,7 +11886,6 @@ impl<'a, C, NC, A> CustomchannelAdunitListCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -11780,7 +11895,7 @@ impl<'a, C, NC, A> CustomchannelAdunitListCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11791,7 +11906,7 @@ impl<'a, C, NC, A> CustomchannelAdunitListCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11800,13 +11915,13 @@ impl<'a, C, NC, A> CustomchannelAdunitListCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11818,7 +11933,7 @@ impl<'a, C, NC, A> CustomchannelAdunitListCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client which contains the custom channel. + /// Ad client which contains the custom channel. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelAdunitListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -11828,7 +11943,7 @@ impl<'a, C, NC, A> CustomchannelAdunitListCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom channel for which to list ad units. + /// Custom channel for which to list ad units. pub fn custom_channel_id(mut self, new_value: &str) -> CustomchannelAdunitListCall<'a, C, NC, A> { self._custom_channel_id = new_value.to_string(); self @@ -11836,7 +11951,7 @@ impl<'a, C, NC, A> CustomchannelAdunitListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> CustomchannelAdunitListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -11844,7 +11959,7 @@ impl<'a, C, NC, A> CustomchannelAdunitListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of ad units to include in the response, used for paging. + /// The maximum number of ad units to include in the response, used for paging. pub fn max_results(mut self, new_value: i32) -> CustomchannelAdunitListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -11852,7 +11967,7 @@ impl<'a, C, NC, A> CustomchannelAdunitListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *include inactive* query property to the given value. /// /// - /// Whether to include inactive ad units. Default: true. + /// Whether to include inactive ad units. Default: true. pub fn include_inactive(mut self, new_value: bool) -> CustomchannelAdunitListCall<'a, C, NC, A> { self._include_inactive = Some(new_value); self diff --git a/gen/adsensehost4d1/Cargo.toml b/gen/adsensehost4d1/Cargo.toml index eaaf2c421f..e98098b653 100644 --- a/gen/adsensehost4d1/Cargo.toml +++ b/gen/adsensehost4d1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-adsensehost4d1" -version = "0.1.1+20150302" +version = "0.1.2+20150309" authors = ["Sebastian Thiel "] description = "A complete library to interact with AdSense Host (protocol v4.1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/adsensehost4d1" @@ -16,7 +16,7 @@ keywords = ["adsensehost", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/adsensehost4d1/README.md b/gen/adsensehost4d1/README.md index 37eb31af52..194db12c77 100644 --- a/gen/adsensehost4d1/README.md +++ b/gen/adsensehost4d1/README.md @@ -1,11 +1,11 @@ The `google-adsensehost4d1` library allows access to all features of the *Google AdSense Host* service. -This documentation was generated from *AdSense Host* crate version *0.1.1+20150302*, where *20150302* is the exact revision of the *adsensehost:v4.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *AdSense Host* crate version *0.1.2+20150309*, where *20150309* is the exact revision of the *adsensehost:v4.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *AdSense Host* *v4d1* API can be found at the [official documentation site](https://developers.google.com/adsense/host/). @@ -35,6 +35,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-adsensehost4d1/struct.AdSenseHost.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-adsensehost4d1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-adsensehost4d1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-adsensehost4d1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -44,6 +46,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-adsensehost4d1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -89,7 +93,7 @@ google-adsensehost4d1 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-adsensehost4d1" as adsensehost4d1; -use adsensehost4d1::Result; +use adsensehost4d1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use adsensehost4d1::AdSenseHost; @@ -120,15 +124,17 @@ let result = hub.accounts().reports_generate("accountId", "startDate", "endDate" .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -141,7 +147,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-adsensehost4d1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-adsensehost4d1/trait.ResponseResult.html), it will return that by default. @@ -164,8 +170,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-adsensehost4d1 ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-adsensehost4d1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-adsensehost4d1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-adsensehost4d1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-adsensehost4d1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-adsensehost4d1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/adsensehost4d1/src/cmn.rs b/gen/adsensehost4d1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/adsensehost4d1/src/cmn.rs +++ b/gen/adsensehost4d1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/adsensehost4d1/src/lib.rs b/gen/adsensehost4d1/src/lib.rs index ae558f487c..48ee1cd231 100644 --- a/gen/adsensehost4d1/src/lib.rs +++ b/gen/adsensehost4d1/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *AdSense Host* crate version *0.1.1+20150302*, where *20150302* is the exact revision of the *adsensehost:v4.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *AdSense Host* crate version *0.1.2+20150309*, where *20150309* is the exact revision of the *adsensehost:v4.1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *AdSense Host* *v4d1* API can be found at the //! [official documentation site](https://developers.google.com/adsense/host/). @@ -35,6 +35,8 @@ //! //! * **[Hub](struct.AdSenseHost.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -44,6 +46,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -89,7 +93,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-adsensehost4d1" as adsensehost4d1; -//! use adsensehost4d1::Result; +//! use adsensehost4d1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -121,15 +125,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -142,7 +148,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -165,8 +171,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -215,7 +222,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -261,7 +268,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-adsensehost4d1" as adsensehost4d1; -/// use adsensehost4d1::Result; +/// use adsensehost4d1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -293,15 +300,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -322,7 +331,7 @@ impl<'a, C, NC, A> AdSenseHost AdSenseHost { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -347,7 +356,7 @@ impl<'a, C, NC, A> AdSenseHost } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -372,14 +381,14 @@ impl<'a, C, NC, A> AdSenseHost /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UrlChannels { - /// Continuation token used to page through URL channels. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through URL channels. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The URL channels returned in this list response. + /// The URL channels returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adsensehost#urlChannels. + /// Kind of list this is, in this case adsensehost#urlChannels. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -392,12 +401,12 @@ impl ResponseResult for UrlChannels {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReportHeaders { - /// The currency of this column. Only present if the header type is METRIC_CURRENCY. + /// The currency of this column. Only present if the header type is METRIC_CURRENCY. pub currency: String, - /// The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or METRIC_CURRENCY. + /// The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or METRIC_CURRENCY. #[serde(alias="type")] pub type_: String, - /// The name of the header. + /// The name of the header. pub name: String, } @@ -427,13 +436,13 @@ impl Part for ReportHeaders {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Account { - /// Approval status of this account. One of: PENDING, APPROVED, DISABLED. + /// Approval status of this account. One of: PENDING, APPROVED, DISABLED. pub status: String, - /// Kind of resource this is, in this case adsensehost#account. + /// Kind of resource this is, in this case adsensehost#account. pub kind: String, - /// Unique identifier of this account. + /// Unique identifier of this account. pub id: String, - /// Name of this account. + /// Name of this account. pub name: String, } @@ -452,14 +461,14 @@ impl ResponseResult for Account {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdUnits { - /// Continuation token used to page through ad units. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through ad units. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The ad units returned in this list response. + /// The ad units returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adsensehost#adUnits. + /// Kind of list this is, in this case adsensehost#adUnits. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -478,14 +487,14 @@ impl ResponseResult for AdUnits {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdClients { - /// Continuation token used to page through ad clients. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through ad clients. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The ad clients returned in this list response. + /// The ad clients returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adsensehost#adClients. + /// Kind of list this is, in this case adsensehost#adClients. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -498,13 +507,13 @@ impl ResponseResult for AdClients {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdStyle { - /// The style of the corners in the ad. Possible values are SQUARE, SLIGHTLY_ROUNDED and VERY_ROUNDED. + /// The style of the corners in the ad. Possible values are SQUARE, SLIGHTLY_ROUNDED and VERY_ROUNDED. pub corners: String, - /// The colors included in the style. These are represented as six hexadecimal characters, similar to HTML color codes, but without the leading hash. + /// The colors included in the style. These are represented as six hexadecimal characters, similar to HTML color codes, but without the leading hash. pub colors: AdStyleColors, - /// The font which is included in the style. + /// The font which is included in the style. pub font: AdStyleFont, - /// Kind this is, in this case adsensehost#adStyle. + /// Kind this is, in this case adsensehost#adStyle. pub kind: String, } @@ -517,15 +526,15 @@ impl Part for AdStyle {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdStyleColors { - /// The color of the ad url. + /// The color of the ad url. pub url: String, - /// The color of the ad text. + /// The color of the ad text. pub text: String, - /// The color of the ad border. + /// The color of the ad border. pub border: String, - /// The color of the ad background. + /// The color of the ad background. pub background: String, - /// The color of the ad title. + /// The color of the ad title. pub title: String, } @@ -539,16 +548,16 @@ impl Part for AdStyleColors {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdUnitMobileContentAdsSettings { - /// The scripting language to use for this ad unit. + /// The scripting language to use for this ad unit. #[serde(alias="scriptingLanguage")] pub scripting_language: String, - /// The markup language to use for this ad unit. + /// The markup language to use for this ad unit. #[serde(alias="markupLanguage")] pub markup_language: String, - /// Type of this ad unit. + /// Type of this ad unit. #[serde(alias="type")] pub type_: String, - /// Size of this ad unit. + /// Size of this ad unit. pub size: String, } @@ -567,10 +576,10 @@ impl Part for AdUnitMobileContentAdsSettings {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdCode { - /// The ad code snippet. + /// The ad code snippet. #[serde(alias="adCode")] pub ad_code: String, - /// Kind this is, in this case adsensehost#adCode. + /// Kind this is, in this case adsensehost#adCode. pub kind: String, } @@ -599,21 +608,21 @@ pub struct AdUnit { /// /// INACTIVE: Indicates that there has been no activity on this ad unit in the last seven days. pub status: Option, - /// Kind of resource this is, in this case adsensehost#adUnit. + /// Kind of resource this is, in this case adsensehost#adUnit. pub kind: Option, - /// Identity code of this ad unit, not necessarily unique across ad clients. + /// Identity code of this ad unit, not necessarily unique across ad clients. pub code: Option, - /// Name of this ad unit. + /// Name of this ad unit. pub name: Option, - /// Settings specific to content ads (AFC) and highend mobile content ads (AFMC). + /// Settings specific to content ads (AFC) and highend mobile content ads (AFMC). #[serde(alias="contentAdsSettings")] pub content_ads_settings: Option, - /// Unique identifier of this ad unit. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. + /// Unique identifier of this ad unit. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. pub id: Option, - /// Settings specific to WAP mobile content ads (AFMC). + /// Settings specific to WAP mobile content ads (AFMC). #[serde(alias="mobileContentAdsSettings")] pub mobile_content_ads_settings: Option, - /// Custom style information specific to this ad unit. + /// Custom style information specific to this ad unit. #[serde(alias="customStyle")] pub custom_style: Option, } @@ -634,11 +643,11 @@ impl ResponseResult for AdUnit {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UrlChannel { - /// Kind of resource this is, in this case adsensehost#urlChannel. + /// Kind of resource this is, in this case adsensehost#urlChannel. pub kind: Option, - /// Unique identifier of this URL channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. + /// Unique identifier of this URL channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. pub id: Option, - /// URL Pattern of this URL channel. Does not include "http://" or "https://". Example: www.example.com/home + /// URL Pattern of this URL channel. Does not include "http://" or "https://". Example: www.example.com/home #[serde(alias="urlPattern")] pub url_pattern: Option, } @@ -660,17 +669,17 @@ impl ResponseResult for UrlChannel {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdClient { - /// This ad client's product code, which corresponds to the PRODUCT_CODE report dimension. + /// This ad client's product code, which corresponds to the PRODUCT_CODE report dimension. #[serde(alias="productCode")] pub product_code: String, - /// Kind of resource this is, in this case adsensehost#adClient. + /// Kind of resource this is, in this case adsensehost#adClient. pub kind: String, - /// Unique identifier of this ad client. + /// Unique identifier of this ad client. pub id: String, - /// Whether this ad client is opted in to ARC. + /// Whether this ad client is opted in to ARC. #[serde(alias="arcOptIn")] pub arc_opt_in: bool, - /// Whether this ad client supports being reported on. + /// Whether this ad client supports being reported on. #[serde(alias="supportsReporting")] pub supports_reporting: bool, } @@ -685,11 +694,11 @@ impl ResponseResult for AdClient {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdUnitContentAdsSettingsBackupOption { - /// Color to use when type is set to COLOR. These are represented as six hexadecimal characters, similar to HTML color codes, but without the leading hash. + /// Color to use when type is set to COLOR. These are represented as six hexadecimal characters, similar to HTML color codes, but without the leading hash. pub color: String, - /// URL to use when type is set to URL. + /// URL to use when type is set to URL. pub url: String, - /// Type of the backup option. Possible values are BLANK, COLOR and URL. + /// Type of the backup option. Possible values are BLANK, COLOR and URL. #[serde(alias="type")] pub type_: String, } @@ -710,28 +719,28 @@ impl Part for AdUnitContentAdsSettingsBackupOption {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AssociationSession { - /// Status of the completed association, available once the association callback token has been verified. One of ACCEPTED, REJECTED, or ERROR. + /// Status of the completed association, available once the association callback token has been verified. One of ACCEPTED, REJECTED, or ERROR. pub status: String, - /// The products to associate with the user. Options: AFC, AFF, AFS, AFMC + /// The products to associate with the user. Options: AFC, AFF, AFS, AFMC #[serde(alias="productCodes")] pub product_codes: Vec, - /// Kind of resource this is, in this case adsensehost#associationSession. + /// Kind of resource this is, in this case adsensehost#associationSession. pub kind: String, - /// The preferred locale of the user themselves when going through the AdSense association flow. + /// The preferred locale of the user themselves when going through the AdSense association flow. #[serde(alias="userLocale")] pub user_locale: String, - /// The locale of the user's hosted website. + /// The locale of the user's hosted website. #[serde(alias="websiteLocale")] pub website_locale: String, - /// Redirect URL of this association session. Used to redirect users into the AdSense association flow. + /// Redirect URL of this association session. Used to redirect users into the AdSense association flow. #[serde(alias="redirectUrl")] pub redirect_url: String, - /// The URL of the user's hosted website. + /// The URL of the user's hosted website. #[serde(alias="websiteUrl")] pub website_url: String, - /// Unique identifier of this association session. + /// Unique identifier of this association session. pub id: String, - /// Hosted account id of the associated publisher after association. Present if status is ACCEPTED. + /// Hosted account id of the associated publisher after association. Present if status is ACCEPTED. #[serde(alias="accountId")] pub account_id: String, } @@ -751,11 +760,11 @@ impl ResponseResult for AssociationSession {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Accounts { - /// The accounts returned in this list response. + /// The accounts returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adsensehost#accounts. + /// Kind of list this is, in this case adsensehost#accounts. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -768,13 +777,13 @@ impl ResponseResult for Accounts {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdUnitContentAdsSettings { - /// Type of this ad unit. Possible values are TEXT, TEXT_IMAGE, IMAGE and LINK. + /// Type of this ad unit. Possible values are TEXT, TEXT_IMAGE, IMAGE and LINK. #[serde(alias="type")] pub type_: String, - /// The backup option to be used in instances where no ad is available. + /// The backup option to be used in instances where no ad is available. #[serde(alias="backupOption")] pub backup_option: AdUnitContentAdsSettingsBackupOption, - /// Size of this ad unit. Size values are in the form SIZE_{width}_{height}. + /// Size of this ad unit. Size values are in the form SIZE_{width}_{height}. pub size: String, } @@ -788,9 +797,9 @@ impl Part for AdUnitContentAdsSettings {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdStyleFont { - /// The family of the font. Possible values are: ACCOUNT_DEFAULT_FAMILY, ADSENSE_DEFAULT_FAMILY, ARIAL, TIMES and VERDANA. + /// The family of the font. Possible values are: ACCOUNT_DEFAULT_FAMILY, ADSENSE_DEFAULT_FAMILY, ARIAL, TIMES and VERDANA. pub family: String, - /// The size of the font. Possible values are: ACCOUNT_DEFAULT_SIZE, ADSENSE_DEFAULT_SIZE, SMALL, MEDIUM and LARGE. + /// The size of the font. Possible values are: ACCOUNT_DEFAULT_SIZE, ADSENSE_DEFAULT_SIZE, SMALL, MEDIUM and LARGE. pub size: String, } @@ -810,20 +819,20 @@ impl Part for AdStyleFont {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Report { - /// The header information of the columns requested in the report. This is a list of headers; one for each dimension in the request, followed by one for each metric in the request. + /// The header information of the columns requested in the report. This is a list of headers; one for each dimension in the request, followed by one for each metric in the request. pub headers: Vec, - /// Kind this is, in this case adsensehost#report. + /// Kind this is, in this case adsensehost#report. pub kind: String, - /// The output rows of the report. Each row is a list of cells; one for each dimension in the request, followed by one for each metric in the request. The dimension cells contain strings, and the metric cells contain numbers. + /// The output rows of the report. Each row is a list of cells; one for each dimension in the request, followed by one for each metric in the request. The dimension cells contain strings, and the metric cells contain numbers. pub rows: Vec>, - /// The total number of rows matched by the report request. Fewer rows may be returned in the response due to being limited by the row count requested or the report row limit. + /// The total number of rows matched by the report request. Fewer rows may be returned in the response due to being limited by the row count requested or the report row limit. #[serde(alias="totalMatchedRows")] pub total_matched_rows: String, - /// Any warnings associated with generation of the report. + /// Any warnings associated with generation of the report. pub warnings: Vec, - /// The averages of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. + /// The averages of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. pub averages: Vec, - /// The totals of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. + /// The totals of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. pub totals: Vec, } @@ -846,13 +855,13 @@ impl ResponseResult for Report {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomChannel { - /// Kind of resource this is, in this case adsensehost#customChannel. + /// Kind of resource this is, in this case adsensehost#customChannel. pub kind: Option, - /// Code of this custom channel, not necessarily unique across ad clients. + /// Code of this custom channel, not necessarily unique across ad clients. pub code: Option, - /// Unique identifier of this custom channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. + /// Unique identifier of this custom channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. pub id: Option, - /// Name of this custom channel. + /// Name of this custom channel. pub name: Option, } @@ -872,14 +881,14 @@ impl ResponseResult for CustomChannel {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomChannels { - /// Continuation token used to page through custom channels. To retrieve the next page of results, set the next request's "pageToken" value to this. + /// Continuation token used to page through custom channels. To retrieve the next page of results, set the next request's "pageToken" value to this. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The custom channels returned in this list response. + /// The custom channels returned in this list response. pub items: Vec, - /// Kind of list this is, in this case adsensehost#customChannels. + /// Kind of list this is, in this case adsensehost#customChannels. pub kind: String, - /// ETag of this response for caching purposes. + /// ETag of this response for caching purposes. pub etag: String, } @@ -925,13 +934,18 @@ pub struct UrlchannelMethods<'a, C, NC, A> hub: &'a AdSenseHost, } -impl<'a, C, NC, A> ResourceMethodsBuilder for UrlchannelMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for UrlchannelMethods<'a, C, NC, A> {} impl<'a, C, NC, A> UrlchannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Add a new URL channel to the host AdSense account. + /// Add a new URL channel to the host AdSense account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `adClientId` - Ad client to which the new URL channel will be added. pub fn insert(&self, request: &UrlChannel, ad_client_id: &str) -> UrlchannelInsertCall<'a, C, NC, A> { UrlchannelInsertCall { hub: self.hub, @@ -945,7 +959,12 @@ impl<'a, C, NC, A> UrlchannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete a URL channel from the host AdSense account. + /// Delete a URL channel from the host AdSense account. + /// + /// # Arguments + /// + /// * `adClientId` - Ad client from which to delete the URL channel. + /// * `urlChannelId` - URL channel to delete. pub fn delete(&self, ad_client_id: &str, url_channel_id: &str) -> UrlchannelDeleteCall<'a, C, NC, A> { UrlchannelDeleteCall { hub: self.hub, @@ -959,7 +978,11 @@ impl<'a, C, NC, A> UrlchannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all host URL channels in the host AdSense account. + /// List all host URL channels in the host AdSense account. + /// + /// # Arguments + /// + /// * `adClientId` - Ad client for which to list URL channels. pub fn list(&self, ad_client_id: &str) -> UrlchannelListCall<'a, C, NC, A> { UrlchannelListCall { hub: self.hub, @@ -1009,13 +1032,13 @@ pub struct AdclientMethods<'a, C, NC, A> hub: &'a AdSenseHost, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AdclientMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AdclientMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AdclientMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all host ad clients in this AdSense account. + /// List all host ad clients in this AdSense account. pub fn list(&self) -> AdclientListCall<'a, C, NC, A> { AdclientListCall { hub: self.hub, @@ -1029,7 +1052,11 @@ impl<'a, C, NC, A> AdclientMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get information about one of the ad clients in the Host AdSense account. + /// Get information about one of the ad clients in the Host AdSense account. + /// + /// # Arguments + /// + /// * `adClientId` - Ad client to get. pub fn get(&self, ad_client_id: &str) -> AdclientGetCall<'a, C, NC, A> { AdclientGetCall { hub: self.hub, @@ -1077,13 +1104,18 @@ pub struct AssociationsessionMethods<'a, C, NC, A> hub: &'a AdSenseHost, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AssociationsessionMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AssociationsessionMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AssociationsessionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Create an association session for initiating an association with an AdSense user. + /// Create an association session for initiating an association with an AdSense user. + /// + /// # Arguments + /// + /// * `productCode` - Products to associate with the user. + /// * `websiteUrl` - The URL of the user's hosted website. pub fn start(&self, product_code: &Vec, website_url: &str) -> AssociationsessionStartCall<'a, C, NC, A> { AssociationsessionStartCall { hub: self.hub, @@ -1099,7 +1131,11 @@ impl<'a, C, NC, A> AssociationsessionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Verify an association session after the association callback returns from AdSense signup. + /// Verify an association session after the association callback returns from AdSense signup. + /// + /// # Arguments + /// + /// * `token` - The token returned to the association callback URL. pub fn verify(&self, token: &str) -> AssociationsessionVerifyCall<'a, C, NC, A> { AssociationsessionVerifyCall { hub: self.hub, @@ -1147,13 +1183,18 @@ pub struct ReportMethods<'a, C, NC, A> hub: &'a AdSenseHost, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ReportMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ReportMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. + /// Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. + /// + /// # Arguments + /// + /// * `startDate` - Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// * `endDate` - End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn generate(&self, start_date: &str, end_date: &str) -> ReportGenerateCall<'a, C, NC, A> { ReportGenerateCall { hub: self.hub, @@ -1209,13 +1250,18 @@ pub struct AccountMethods<'a, C, NC, A> hub: &'a AdSenseHost, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AccountMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AccountMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all ad units in the specified publisher's AdSense account. + /// List all ad units in the specified publisher's AdSense account. + /// + /// # Arguments + /// + /// * `accountId` - Account which contains the ad client. + /// * `adClientId` - Ad client for which to list ad units. pub fn adunits_list(&self, account_id: &str, ad_client_id: &str) -> AccountAdunitListCall<'a, C, NC, A> { AccountAdunitListCall { hub: self.hub, @@ -1232,7 +1278,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List hosted accounts associated with this AdSense account by ad client id. + /// List hosted accounts associated with this AdSense account by ad client id. + /// + /// # Arguments + /// + /// * `filterAdClientId` - Ad clients to list accounts for. pub fn list(&self, filter_ad_client_id: &Vec) -> AccountListCall<'a, C, NC, A> { AccountListCall { hub: self.hub, @@ -1245,7 +1295,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get ad code for the specified ad unit, attaching the specified host custom channels. + /// Get ad code for the specified ad unit, attaching the specified host custom channels. + /// + /// # Arguments + /// + /// * `accountId` - Account which contains the ad client. + /// * `adClientId` - Ad client with contains the ad unit. + /// * `adUnitId` - Ad unit to get the code for. pub fn adunits_get_ad_code(&self, account_id: &str, ad_client_id: &str, ad_unit_id: &str) -> AccountAdunitGetAdCodeCall<'a, C, NC, A> { AccountAdunitGetAdCodeCall { hub: self.hub, @@ -1261,7 +1317,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. + /// Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. + /// + /// # Arguments + /// + /// * `accountId` - Hosted account upon which to report. + /// * `startDate` - Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// * `endDate` - End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn reports_generate(&self, account_id: &str, start_date: &str, end_date: &str) -> AccountReportGenerateCall<'a, C, NC, A> { AccountReportGenerateCall { hub: self.hub, @@ -1283,7 +1345,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete the specified ad unit from the specified publisher AdSense account. + /// Delete the specified ad unit from the specified publisher AdSense account. + /// + /// # Arguments + /// + /// * `accountId` - Account which contains the ad unit. + /// * `adClientId` - Ad client for which to get ad unit. + /// * `adUnitId` - Ad unit to delete. pub fn adunits_delete(&self, account_id: &str, ad_client_id: &str, ad_unit_id: &str) -> AccountAdunitDeleteCall<'a, C, NC, A> { AccountAdunitDeleteCall { hub: self.hub, @@ -1298,7 +1366,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all hosted ad clients in the specified hosted account. + /// List all hosted ad clients in the specified hosted account. + /// + /// # Arguments + /// + /// * `accountId` - Account for which to list ad clients. pub fn adclients_list(&self, account_id: &str) -> AccountAdclientListCall<'a, C, NC, A> { AccountAdclientListCall { hub: self.hub, @@ -1313,7 +1385,14 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update the supplied ad unit in the specified publisher AdSense account. This method supports patch semantics. + /// Update the supplied ad unit in the specified publisher AdSense account. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account which contains the ad client. + /// * `adClientId` - Ad client which contains the ad unit. + /// * `adUnitId` - Ad unit to get. pub fn adunits_patch(&self, request: &AdUnit, account_id: &str, ad_client_id: &str, ad_unit_id: &str) -> AccountAdunitPatchCall<'a, C, NC, A> { AccountAdunitPatchCall { hub: self.hub, @@ -1329,7 +1408,12 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get information about one of the ad clients in the specified publisher's AdSense account. + /// Get information about one of the ad clients in the specified publisher's AdSense account. + /// + /// # Arguments + /// + /// * `accountId` - Account which contains the ad client. + /// * `adClientId` - Ad client to get. pub fn adclients_get(&self, account_id: &str, ad_client_id: &str) -> AccountAdclientGetCall<'a, C, NC, A> { AccountAdclientGetCall { hub: self.hub, @@ -1343,7 +1427,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get information about the selected associated AdSense account. + /// Get information about the selected associated AdSense account. + /// + /// # Arguments + /// + /// * `accountId` - Account to get information about. pub fn get(&self, account_id: &str) -> AccountGetCall<'a, C, NC, A> { AccountGetCall { hub: self.hub, @@ -1356,7 +1444,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Insert the supplied ad unit into the specified publisher AdSense account. + /// Insert the supplied ad unit into the specified publisher AdSense account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account which will contain the ad unit. + /// * `adClientId` - Ad client into which to insert the ad unit. pub fn adunits_insert(&self, request: &AdUnit, account_id: &str, ad_client_id: &str) -> AccountAdunitInsertCall<'a, C, NC, A> { AccountAdunitInsertCall { hub: self.hub, @@ -1371,7 +1465,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get the specified host ad unit in this AdSense account. + /// Get the specified host ad unit in this AdSense account. + /// + /// # Arguments + /// + /// * `accountId` - Account which contains the ad unit. + /// * `adClientId` - Ad client for which to get ad unit. + /// * `adUnitId` - Ad unit to get. pub fn adunits_get(&self, account_id: &str, ad_client_id: &str, ad_unit_id: &str) -> AccountAdunitGetCall<'a, C, NC, A> { AccountAdunitGetCall { hub: self.hub, @@ -1386,7 +1486,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update the supplied ad unit in the specified publisher AdSense account. + /// Update the supplied ad unit in the specified publisher AdSense account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account which contains the ad client. + /// * `adClientId` - Ad client which contains the ad unit. pub fn adunits_update(&self, request: &AdUnit, account_id: &str, ad_client_id: &str) -> AccountAdunitUpdateCall<'a, C, NC, A> { AccountAdunitUpdateCall { hub: self.hub, @@ -1436,13 +1542,18 @@ pub struct CustomchannelMethods<'a, C, NC, A> hub: &'a AdSenseHost, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CustomchannelMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CustomchannelMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CustomchannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get a specific custom channel from the host AdSense account. + /// Get a specific custom channel from the host AdSense account. + /// + /// # Arguments + /// + /// * `adClientId` - Ad client from which to get the custom channel. + /// * `customChannelId` - Custom channel to get. pub fn get(&self, ad_client_id: &str, custom_channel_id: &str) -> CustomchannelGetCall<'a, C, NC, A> { CustomchannelGetCall { hub: self.hub, @@ -1456,7 +1567,12 @@ impl<'a, C, NC, A> CustomchannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete a specific custom channel from the host AdSense account. + /// Delete a specific custom channel from the host AdSense account. + /// + /// # Arguments + /// + /// * `adClientId` - Ad client from which to delete the custom channel. + /// * `customChannelId` - Custom channel to delete. pub fn delete(&self, ad_client_id: &str, custom_channel_id: &str) -> CustomchannelDeleteCall<'a, C, NC, A> { CustomchannelDeleteCall { hub: self.hub, @@ -1470,7 +1586,12 @@ impl<'a, C, NC, A> CustomchannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update a custom channel in the host AdSense account. + /// Update a custom channel in the host AdSense account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `adClientId` - Ad client in which the custom channel will be updated. pub fn update(&self, request: &CustomChannel, ad_client_id: &str) -> CustomchannelUpdateCall<'a, C, NC, A> { CustomchannelUpdateCall { hub: self.hub, @@ -1484,7 +1605,11 @@ impl<'a, C, NC, A> CustomchannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all host custom channels in this AdSense account. + /// List all host custom channels in this AdSense account. + /// + /// # Arguments + /// + /// * `adClientId` - Ad client for which to list custom channels. pub fn list(&self, ad_client_id: &str) -> CustomchannelListCall<'a, C, NC, A> { CustomchannelListCall { hub: self.hub, @@ -1499,7 +1624,13 @@ impl<'a, C, NC, A> CustomchannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update a custom channel in the host AdSense account. This method supports patch semantics. + /// Update a custom channel in the host AdSense account. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `adClientId` - Ad client in which the custom channel will be updated. + /// * `customChannelId` - Custom channel to get. pub fn patch(&self, request: &CustomChannel, ad_client_id: &str, custom_channel_id: &str) -> CustomchannelPatchCall<'a, C, NC, A> { CustomchannelPatchCall { hub: self.hub, @@ -1514,7 +1645,12 @@ impl<'a, C, NC, A> CustomchannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Add a new custom channel to the host AdSense account. + /// Add a new custom channel to the host AdSense account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `adClientId` - Ad client to which the new custom channel will be added. pub fn insert(&self, request: &CustomChannel, ad_client_id: &str) -> CustomchannelInsertCall<'a, C, NC, A> { CustomchannelInsertCall { hub: self.hub, @@ -1538,7 +1674,7 @@ impl<'a, C, NC, A> CustomchannelMethods<'a, C, NC, A> { /// Add a new URL channel to the host AdSense account. /// /// A builder for the *insert* method supported by a *urlchannel* resource. -/// It is not used directly, but through a `UrlchannelMethods`. +/// It is not used directly, but through a `UrlchannelMethods` instance. /// /// # Example /// @@ -1603,7 +1739,7 @@ impl<'a, C, NC, A> UrlchannelInsertCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "adClientId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1660,7 +1796,7 @@ impl<'a, C, NC, A> UrlchannelInsertCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1676,7 +1812,6 @@ impl<'a, C, NC, A> UrlchannelInsertCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -1686,7 +1821,7 @@ impl<'a, C, NC, A> UrlchannelInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1697,7 +1832,7 @@ impl<'a, C, NC, A> UrlchannelInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1706,13 +1841,13 @@ impl<'a, C, NC, A> UrlchannelInsertCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1733,7 +1868,7 @@ impl<'a, C, NC, A> UrlchannelInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client to which the new URL channel will be added. + /// Ad client to which the new URL channel will be added. pub fn ad_client_id(mut self, new_value: &str) -> UrlchannelInsertCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -1794,7 +1929,7 @@ impl<'a, C, NC, A> UrlchannelInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Delete a URL channel from the host AdSense account. /// /// A builder for the *delete* method supported by a *urlchannel* resource. -/// It is not used directly, but through a `UrlchannelMethods`. +/// It is not used directly, but through a `UrlchannelMethods` instance. /// /// # Example /// @@ -1854,7 +1989,7 @@ impl<'a, C, NC, A> UrlchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "adClientId", "urlChannelId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1907,7 +2042,7 @@ impl<'a, C, NC, A> UrlchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1919,7 +2054,6 @@ impl<'a, C, NC, A> UrlchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -1929,7 +2063,7 @@ impl<'a, C, NC, A> UrlchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1940,7 +2074,7 @@ impl<'a, C, NC, A> UrlchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1949,13 +2083,13 @@ impl<'a, C, NC, A> UrlchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1967,7 +2101,7 @@ impl<'a, C, NC, A> UrlchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client from which to delete the URL channel. + /// Ad client from which to delete the URL channel. pub fn ad_client_id(mut self, new_value: &str) -> UrlchannelDeleteCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -1977,7 +2111,7 @@ impl<'a, C, NC, A> UrlchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// URL channel to delete. + /// URL channel to delete. pub fn url_channel_id(mut self, new_value: &str) -> UrlchannelDeleteCall<'a, C, NC, A> { self._url_channel_id = new_value.to_string(); self @@ -2038,7 +2172,7 @@ impl<'a, C, NC, A> UrlchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// List all host URL channels in the host AdSense account. /// /// A builder for the *list* method supported by a *urlchannel* resource. -/// It is not used directly, but through a `UrlchannelMethods`. +/// It is not used directly, but through a `UrlchannelMethods` instance. /// /// # Example /// @@ -2106,7 +2240,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "adClientId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2159,7 +2293,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2171,7 +2305,6 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -2181,7 +2314,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2192,7 +2325,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2201,13 +2334,13 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2219,7 +2352,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to list URL channels. + /// Ad client for which to list URL channels. pub fn ad_client_id(mut self, new_value: &str) -> UrlchannelListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -2227,7 +2360,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> UrlchannelListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2235,7 +2368,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of URL channels to include in the response, used for paging. + /// The maximum number of URL channels to include in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> UrlchannelListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2296,7 +2429,7 @@ impl<'a, C, NC, A> UrlchannelListCall<'a, C, NC, A> where NC: hyper::net::Networ /// List all host ad clients in this AdSense account. /// /// A builder for the *list* method supported by a *adclient* resource. -/// It is not used directly, but through a `AdclientMethods`. +/// It is not used directly, but through a `AdclientMethods` instance. /// /// # Example /// @@ -2362,7 +2495,7 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2391,7 +2524,7 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2403,7 +2536,6 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -2413,7 +2545,7 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2424,7 +2556,7 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2433,13 +2565,13 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2449,7 +2581,7 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AdclientListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2457,7 +2589,7 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of ad clients to include in the response, used for paging. + /// The maximum number of ad clients to include in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> AdclientListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2518,7 +2650,7 @@ impl<'a, C, NC, A> AdclientListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Get information about one of the ad clients in the Host AdSense account. /// /// A builder for the *get* method supported by a *adclient* resource. -/// It is not used directly, but through a `AdclientMethods`. +/// It is not used directly, but through a `AdclientMethods` instance. /// /// # Example /// @@ -2576,7 +2708,7 @@ impl<'a, C, NC, A> AdclientGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "adClientId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2629,7 +2761,7 @@ impl<'a, C, NC, A> AdclientGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2641,7 +2773,6 @@ impl<'a, C, NC, A> AdclientGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -2651,7 +2782,7 @@ impl<'a, C, NC, A> AdclientGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2662,7 +2793,7 @@ impl<'a, C, NC, A> AdclientGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2671,13 +2802,13 @@ impl<'a, C, NC, A> AdclientGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2689,7 +2820,7 @@ impl<'a, C, NC, A> AdclientGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client to get. + /// Ad client to get. pub fn ad_client_id(mut self, new_value: &str) -> AdclientGetCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -2750,7 +2881,7 @@ impl<'a, C, NC, A> AdclientGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Create an association session for initiating an association with an AdSense user. /// /// A builder for the *start* method supported by a *associationsession* resource. -/// It is not used directly, but through a `AssociationsessionMethods`. +/// It is not used directly, but through a `AssociationsessionMethods` instance. /// /// # Example /// @@ -2826,7 +2957,7 @@ impl<'a, C, NC, A> AssociationsessionStartCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "productCode", "websiteUrl", "websiteLocale", "userLocale"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2855,7 +2986,7 @@ impl<'a, C, NC, A> AssociationsessionStartCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2867,7 +2998,6 @@ impl<'a, C, NC, A> AssociationsessionStartCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -2877,7 +3007,7 @@ impl<'a, C, NC, A> AssociationsessionStartCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2888,7 +3018,7 @@ impl<'a, C, NC, A> AssociationsessionStartCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2897,13 +3027,13 @@ impl<'a, C, NC, A> AssociationsessionStartCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2916,7 +3046,7 @@ impl<'a, C, NC, A> AssociationsessionStartCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Products to associate with the user. + /// Products to associate with the user. pub fn add_product_code(mut self, new_value: &str) -> AssociationsessionStartCall<'a, C, NC, A> { self._product_code.push(new_value.to_string()); self @@ -2926,7 +3056,7 @@ impl<'a, C, NC, A> AssociationsessionStartCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The URL of the user's hosted website. + /// The URL of the user's hosted website. pub fn website_url(mut self, new_value: &str) -> AssociationsessionStartCall<'a, C, NC, A> { self._website_url = new_value.to_string(); self @@ -2934,7 +3064,7 @@ impl<'a, C, NC, A> AssociationsessionStartCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *website locale* query property to the given value. /// /// - /// The locale of the user's hosted website. + /// The locale of the user's hosted website. pub fn website_locale(mut self, new_value: &str) -> AssociationsessionStartCall<'a, C, NC, A> { self._website_locale = Some(new_value.to_string()); self @@ -2942,7 +3072,7 @@ impl<'a, C, NC, A> AssociationsessionStartCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *user locale* query property to the given value. /// /// - /// The preferred locale of the user. + /// The preferred locale of the user. pub fn user_locale(mut self, new_value: &str) -> AssociationsessionStartCall<'a, C, NC, A> { self._user_locale = Some(new_value.to_string()); self @@ -3003,7 +3133,7 @@ impl<'a, C, NC, A> AssociationsessionStartCall<'a, C, NC, A> where NC: hyper::ne /// Verify an association session after the association callback returns from AdSense signup. /// /// A builder for the *verify* method supported by a *associationsession* resource. -/// It is not used directly, but through a `AssociationsessionMethods`. +/// It is not used directly, but through a `AssociationsessionMethods` instance. /// /// # Example /// @@ -3061,7 +3191,7 @@ impl<'a, C, NC, A> AssociationsessionVerifyCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "token"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3090,7 +3220,7 @@ impl<'a, C, NC, A> AssociationsessionVerifyCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3102,7 +3232,6 @@ impl<'a, C, NC, A> AssociationsessionVerifyCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -3112,7 +3241,7 @@ impl<'a, C, NC, A> AssociationsessionVerifyCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3123,7 +3252,7 @@ impl<'a, C, NC, A> AssociationsessionVerifyCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3132,13 +3261,13 @@ impl<'a, C, NC, A> AssociationsessionVerifyCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3150,7 +3279,7 @@ impl<'a, C, NC, A> AssociationsessionVerifyCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The token returned to the association callback URL. + /// The token returned to the association callback URL. pub fn token(mut self, new_value: &str) -> AssociationsessionVerifyCall<'a, C, NC, A> { self._token = new_value.to_string(); self @@ -3211,7 +3340,7 @@ impl<'a, C, NC, A> AssociationsessionVerifyCall<'a, C, NC, A> where NC: hyper::n /// Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. /// /// A builder for the *generate* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -3322,7 +3451,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "startDate", "endDate", "startIndex", "sort", "metric", "maxResults", "locale", "filter", "dimension"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3351,7 +3480,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3363,7 +3492,6 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -3373,7 +3501,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3384,7 +3512,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3393,13 +3521,13 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3411,7 +3539,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn start_date(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._start_date = new_value.to_string(); self @@ -3421,7 +3549,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn end_date(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._end_date = new_value.to_string(); self @@ -3429,7 +3557,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *start index* query property to the given value. /// /// - /// Index of the first row of report data to return. + /// Index of the first row of report data to return. pub fn start_index(mut self, new_value: u32) -> ReportGenerateCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -3438,7 +3566,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. + /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. pub fn add_sort(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._sort.push(new_value.to_string()); self @@ -3447,7 +3575,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Numeric columns to include in the report. + /// Numeric columns to include in the report. pub fn add_metric(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._metric.push(new_value.to_string()); self @@ -3455,7 +3583,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of rows of report data to return. + /// The maximum number of rows of report data to return. pub fn max_results(mut self, new_value: u32) -> ReportGenerateCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -3463,7 +3591,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *locale* query property to the given value. /// /// - /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. pub fn locale(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -3472,7 +3600,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Filters to be run on the report. + /// Filters to be run on the report. pub fn add_filter(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._filter.push(new_value.to_string()); self @@ -3481,7 +3609,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Dimensions to base the report on. + /// Dimensions to base the report on. pub fn add_dimension(mut self, new_value: &str) -> ReportGenerateCall<'a, C, NC, A> { self._dimension.push(new_value.to_string()); self @@ -3542,7 +3670,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// List all ad units in the specified publisher's AdSense account. /// /// A builder for the *adunits.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -3617,7 +3745,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "accountId", "adClientId", "pageToken", "maxResults", "includeInactive"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3670,7 +3798,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3682,7 +3810,6 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -3692,7 +3819,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3703,7 +3830,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3712,13 +3839,13 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3730,7 +3857,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account which contains the ad client. + /// Account which contains the ad client. pub fn account_id(mut self, new_value: &str) -> AccountAdunitListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -3740,7 +3867,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to list ad units. + /// Ad client for which to list ad units. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -3748,7 +3875,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountAdunitListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -3756,7 +3883,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of ad units to include in the response, used for paging. + /// The maximum number of ad units to include in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> AccountAdunitListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -3764,7 +3891,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *include inactive* query property to the given value. /// /// - /// Whether to include inactive ad units. Default: true. + /// Whether to include inactive ad units. Default: true. pub fn include_inactive(mut self, new_value: bool) -> AccountAdunitListCall<'a, C, NC, A> { self._include_inactive = Some(new_value); self @@ -3825,7 +3952,7 @@ impl<'a, C, NC, A> AccountAdunitListCall<'a, C, NC, A> where NC: hyper::net::Net /// List hosted accounts associated with this AdSense account by ad client id. /// /// A builder for the *list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -3889,7 +4016,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "filterAdClientId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3918,7 +4045,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3930,7 +4057,6 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -3940,7 +4066,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3951,7 +4077,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3960,13 +4086,13 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3979,7 +4105,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad clients to list accounts for. + /// Ad clients to list accounts for. pub fn add_filter_ad_client_id(mut self, new_value: &str) -> AccountListCall<'a, C, NC, A> { self._filter_ad_client_id.push(new_value.to_string()); self @@ -4040,7 +4166,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Get ad code for the specified ad unit, attaching the specified host custom channels. /// /// A builder for the *adunits.getAdCode* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -4111,7 +4237,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "accountId", "adClientId", "adUnitId", "hostCustomChannelId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4164,7 +4290,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4176,7 +4302,6 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -4186,7 +4311,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4197,7 +4322,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4206,13 +4331,13 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4224,7 +4349,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account which contains the ad client. + /// Account which contains the ad client. pub fn account_id(mut self, new_value: &str) -> AccountAdunitGetAdCodeCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -4234,7 +4359,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client with contains the ad unit. + /// Ad client with contains the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitGetAdCodeCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -4244,7 +4369,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad unit to get the code for. + /// Ad unit to get the code for. pub fn ad_unit_id(mut self, new_value: &str) -> AccountAdunitGetAdCodeCall<'a, C, NC, A> { self._ad_unit_id = new_value.to_string(); self @@ -4253,7 +4378,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Host custom channel to attach to the ad code. + /// Host custom channel to attach to the ad code. pub fn add_host_custom_channel_id(mut self, new_value: &str) -> AccountAdunitGetAdCodeCall<'a, C, NC, A> { self._host_custom_channel_id.push(new_value.to_string()); self @@ -4314,7 +4439,7 @@ impl<'a, C, NC, A> AccountAdunitGetAdCodeCall<'a, C, NC, A> where NC: hyper::net /// Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. /// /// A builder for the *reports.generate* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -4427,7 +4552,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "accountId", "startDate", "endDate", "startIndex", "sort", "metric", "maxResults", "locale", "filter", "dimension"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4480,7 +4605,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4492,7 +4617,6 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -4502,7 +4626,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4513,7 +4637,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4522,13 +4646,13 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4540,7 +4664,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Hosted account upon which to report. + /// Hosted account upon which to report. pub fn account_id(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -4550,7 +4674,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// Start of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn start_date(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._start_date = new_value.to_string(); self @@ -4560,7 +4684,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. + /// End of the date range to report on in "YYYY-MM-DD" format, inclusive. pub fn end_date(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._end_date = new_value.to_string(); self @@ -4568,7 +4692,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *start index* query property to the given value. /// /// - /// Index of the first row of report data to return. + /// Index of the first row of report data to return. pub fn start_index(mut self, new_value: u32) -> AccountReportGenerateCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -4577,7 +4701,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. + /// The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. pub fn add_sort(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._sort.push(new_value.to_string()); self @@ -4586,7 +4710,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Numeric columns to include in the report. + /// Numeric columns to include in the report. pub fn add_metric(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._metric.push(new_value.to_string()); self @@ -4594,7 +4718,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of rows of report data to return. + /// The maximum number of rows of report data to return. pub fn max_results(mut self, new_value: u32) -> AccountReportGenerateCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -4602,7 +4726,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *locale* query property to the given value. /// /// - /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. + /// Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. pub fn locale(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -4611,7 +4735,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Filters to be run on the report. + /// Filters to be run on the report. pub fn add_filter(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._filter.push(new_value.to_string()); self @@ -4620,7 +4744,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Dimensions to base the report on. + /// Dimensions to base the report on. pub fn add_dimension(mut self, new_value: &str) -> AccountReportGenerateCall<'a, C, NC, A> { self._dimension.push(new_value.to_string()); self @@ -4681,7 +4805,7 @@ impl<'a, C, NC, A> AccountReportGenerateCall<'a, C, NC, A> where NC: hyper::net: /// Delete the specified ad unit from the specified publisher AdSense account. /// /// A builder for the *adunits.delete* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -4743,7 +4867,7 @@ impl<'a, C, NC, A> AccountAdunitDeleteCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "accountId", "adClientId", "adUnitId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4796,7 +4920,7 @@ impl<'a, C, NC, A> AccountAdunitDeleteCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4808,7 +4932,6 @@ impl<'a, C, NC, A> AccountAdunitDeleteCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -4818,7 +4941,7 @@ impl<'a, C, NC, A> AccountAdunitDeleteCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4829,7 +4952,7 @@ impl<'a, C, NC, A> AccountAdunitDeleteCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4838,13 +4961,13 @@ impl<'a, C, NC, A> AccountAdunitDeleteCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4856,7 +4979,7 @@ impl<'a, C, NC, A> AccountAdunitDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account which contains the ad unit. + /// Account which contains the ad unit. pub fn account_id(mut self, new_value: &str) -> AccountAdunitDeleteCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -4866,7 +4989,7 @@ impl<'a, C, NC, A> AccountAdunitDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to get ad unit. + /// Ad client for which to get ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitDeleteCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -4876,7 +4999,7 @@ impl<'a, C, NC, A> AccountAdunitDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad unit to delete. + /// Ad unit to delete. pub fn ad_unit_id(mut self, new_value: &str) -> AccountAdunitDeleteCall<'a, C, NC, A> { self._ad_unit_id = new_value.to_string(); self @@ -4937,7 +5060,7 @@ impl<'a, C, NC, A> AccountAdunitDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// List all hosted ad clients in the specified hosted account. /// /// A builder for the *adclients.list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -5005,7 +5128,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "accountId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5058,7 +5181,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5070,7 +5193,6 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -5080,7 +5202,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5091,7 +5213,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5100,13 +5222,13 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5118,7 +5240,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account for which to list ad clients. + /// Account for which to list ad clients. pub fn account_id(mut self, new_value: &str) -> AccountAdclientListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -5126,7 +5248,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> AccountAdclientListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -5134,7 +5256,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of ad clients to include in the response, used for paging. + /// The maximum number of ad clients to include in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> AccountAdclientListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -5195,7 +5317,7 @@ impl<'a, C, NC, A> AccountAdclientListCall<'a, C, NC, A> where NC: hyper::net::N /// Update the supplied ad unit in the specified publisher AdSense account. This method supports patch semantics. /// /// A builder for the *adunits.patch* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -5264,7 +5386,7 @@ impl<'a, C, NC, A> AccountAdunitPatchCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "accountId", "adClientId", "adUnitId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5321,7 +5443,7 @@ impl<'a, C, NC, A> AccountAdunitPatchCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5337,7 +5459,6 @@ impl<'a, C, NC, A> AccountAdunitPatchCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -5347,7 +5468,7 @@ impl<'a, C, NC, A> AccountAdunitPatchCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5358,7 +5479,7 @@ impl<'a, C, NC, A> AccountAdunitPatchCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5367,13 +5488,13 @@ impl<'a, C, NC, A> AccountAdunitPatchCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5394,7 +5515,7 @@ impl<'a, C, NC, A> AccountAdunitPatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account which contains the ad client. + /// Account which contains the ad client. pub fn account_id(mut self, new_value: &str) -> AccountAdunitPatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -5404,7 +5525,7 @@ impl<'a, C, NC, A> AccountAdunitPatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client which contains the ad unit. + /// Ad client which contains the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitPatchCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -5414,7 +5535,7 @@ impl<'a, C, NC, A> AccountAdunitPatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad unit to get. + /// Ad unit to get. pub fn ad_unit_id(mut self, new_value: &str) -> AccountAdunitPatchCall<'a, C, NC, A> { self._ad_unit_id = new_value.to_string(); self @@ -5475,7 +5596,7 @@ impl<'a, C, NC, A> AccountAdunitPatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Get information about one of the ad clients in the specified publisher's AdSense account. /// /// A builder for the *adclients.get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -5535,7 +5656,7 @@ impl<'a, C, NC, A> AccountAdclientGetCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "accountId", "adClientId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5588,7 +5709,7 @@ impl<'a, C, NC, A> AccountAdclientGetCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5600,7 +5721,6 @@ impl<'a, C, NC, A> AccountAdclientGetCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -5610,7 +5730,7 @@ impl<'a, C, NC, A> AccountAdclientGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5621,7 +5741,7 @@ impl<'a, C, NC, A> AccountAdclientGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5630,13 +5750,13 @@ impl<'a, C, NC, A> AccountAdclientGetCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5648,7 +5768,7 @@ impl<'a, C, NC, A> AccountAdclientGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account which contains the ad client. + /// Account which contains the ad client. pub fn account_id(mut self, new_value: &str) -> AccountAdclientGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -5658,7 +5778,7 @@ impl<'a, C, NC, A> AccountAdclientGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client to get. + /// Ad client to get. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdclientGetCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -5719,7 +5839,7 @@ impl<'a, C, NC, A> AccountAdclientGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Get information about the selected associated AdSense account. /// /// A builder for the *get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -5777,7 +5897,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5830,7 +5950,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5842,7 +5962,6 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -5852,7 +5971,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5863,7 +5982,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5872,13 +5991,13 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5890,7 +6009,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account to get information about. + /// Account to get information about. pub fn account_id(mut self, new_value: &str) -> AccountGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -5951,7 +6070,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Insert the supplied ad unit into the specified publisher AdSense account. /// /// A builder for the *adunits.insert* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -6018,7 +6137,7 @@ impl<'a, C, NC, A> AccountAdunitInsertCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "accountId", "adClientId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6075,7 +6194,7 @@ impl<'a, C, NC, A> AccountAdunitInsertCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6091,7 +6210,6 @@ impl<'a, C, NC, A> AccountAdunitInsertCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -6101,7 +6219,7 @@ impl<'a, C, NC, A> AccountAdunitInsertCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6112,7 +6230,7 @@ impl<'a, C, NC, A> AccountAdunitInsertCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6121,13 +6239,13 @@ impl<'a, C, NC, A> AccountAdunitInsertCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6148,7 +6266,7 @@ impl<'a, C, NC, A> AccountAdunitInsertCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account which will contain the ad unit. + /// Account which will contain the ad unit. pub fn account_id(mut self, new_value: &str) -> AccountAdunitInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -6158,7 +6276,7 @@ impl<'a, C, NC, A> AccountAdunitInsertCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client into which to insert the ad unit. + /// Ad client into which to insert the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitInsertCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -6219,7 +6337,7 @@ impl<'a, C, NC, A> AccountAdunitInsertCall<'a, C, NC, A> where NC: hyper::net::N /// Get the specified host ad unit in this AdSense account. /// /// A builder for the *adunits.get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -6281,7 +6399,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "accountId", "adClientId", "adUnitId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6334,7 +6452,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6346,7 +6464,6 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -6356,7 +6473,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6367,7 +6484,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6376,13 +6493,13 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6394,7 +6511,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account which contains the ad unit. + /// Account which contains the ad unit. pub fn account_id(mut self, new_value: &str) -> AccountAdunitGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -6404,7 +6521,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to get ad unit. + /// Ad client for which to get ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitGetCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -6414,7 +6531,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad unit to get. + /// Ad unit to get. pub fn ad_unit_id(mut self, new_value: &str) -> AccountAdunitGetCall<'a, C, NC, A> { self._ad_unit_id = new_value.to_string(); self @@ -6475,7 +6592,7 @@ impl<'a, C, NC, A> AccountAdunitGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Update the supplied ad unit in the specified publisher AdSense account. /// /// A builder for the *adunits.update* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -6542,7 +6659,7 @@ impl<'a, C, NC, A> AccountAdunitUpdateCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "accountId", "adClientId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6599,7 +6716,7 @@ impl<'a, C, NC, A> AccountAdunitUpdateCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6615,7 +6732,6 @@ impl<'a, C, NC, A> AccountAdunitUpdateCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -6625,7 +6741,7 @@ impl<'a, C, NC, A> AccountAdunitUpdateCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6636,7 +6752,7 @@ impl<'a, C, NC, A> AccountAdunitUpdateCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6645,13 +6761,13 @@ impl<'a, C, NC, A> AccountAdunitUpdateCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6672,7 +6788,7 @@ impl<'a, C, NC, A> AccountAdunitUpdateCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account which contains the ad client. + /// Account which contains the ad client. pub fn account_id(mut self, new_value: &str) -> AccountAdunitUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -6682,7 +6798,7 @@ impl<'a, C, NC, A> AccountAdunitUpdateCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client which contains the ad unit. + /// Ad client which contains the ad unit. pub fn ad_client_id(mut self, new_value: &str) -> AccountAdunitUpdateCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -6743,7 +6859,7 @@ impl<'a, C, NC, A> AccountAdunitUpdateCall<'a, C, NC, A> where NC: hyper::net::N /// Get a specific custom channel from the host AdSense account. /// /// A builder for the *get* method supported by a *customchannel* resource. -/// It is not used directly, but through a `CustomchannelMethods`. +/// It is not used directly, but through a `CustomchannelMethods` instance. /// /// # Example /// @@ -6803,7 +6919,7 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "adClientId", "customChannelId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6856,7 +6972,7 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6868,7 +6984,6 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -6878,7 +6993,7 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6889,7 +7004,7 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6898,13 +7013,13 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6916,7 +7031,7 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client from which to get the custom channel. + /// Ad client from which to get the custom channel. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelGetCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -6926,7 +7041,7 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom channel to get. + /// Custom channel to get. pub fn custom_channel_id(mut self, new_value: &str) -> CustomchannelGetCall<'a, C, NC, A> { self._custom_channel_id = new_value.to_string(); self @@ -6987,7 +7102,7 @@ impl<'a, C, NC, A> CustomchannelGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Delete a specific custom channel from the host AdSense account. /// /// A builder for the *delete* method supported by a *customchannel* resource. -/// It is not used directly, but through a `CustomchannelMethods`. +/// It is not used directly, but through a `CustomchannelMethods` instance. /// /// # Example /// @@ -7047,7 +7162,7 @@ impl<'a, C, NC, A> CustomchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "adClientId", "customChannelId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7100,7 +7215,7 @@ impl<'a, C, NC, A> CustomchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7112,7 +7227,6 @@ impl<'a, C, NC, A> CustomchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -7122,7 +7236,7 @@ impl<'a, C, NC, A> CustomchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7133,7 +7247,7 @@ impl<'a, C, NC, A> CustomchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7142,13 +7256,13 @@ impl<'a, C, NC, A> CustomchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7160,7 +7274,7 @@ impl<'a, C, NC, A> CustomchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client from which to delete the custom channel. + /// Ad client from which to delete the custom channel. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelDeleteCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -7170,7 +7284,7 @@ impl<'a, C, NC, A> CustomchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom channel to delete. + /// Custom channel to delete. pub fn custom_channel_id(mut self, new_value: &str) -> CustomchannelDeleteCall<'a, C, NC, A> { self._custom_channel_id = new_value.to_string(); self @@ -7231,7 +7345,7 @@ impl<'a, C, NC, A> CustomchannelDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// Update a custom channel in the host AdSense account. /// /// A builder for the *update* method supported by a *customchannel* resource. -/// It is not used directly, but through a `CustomchannelMethods`. +/// It is not used directly, but through a `CustomchannelMethods` instance. /// /// # Example /// @@ -7296,7 +7410,7 @@ impl<'a, C, NC, A> CustomchannelUpdateCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "adClientId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7353,7 +7467,7 @@ impl<'a, C, NC, A> CustomchannelUpdateCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7369,7 +7483,6 @@ impl<'a, C, NC, A> CustomchannelUpdateCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -7379,7 +7492,7 @@ impl<'a, C, NC, A> CustomchannelUpdateCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7390,7 +7503,7 @@ impl<'a, C, NC, A> CustomchannelUpdateCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7399,13 +7512,13 @@ impl<'a, C, NC, A> CustomchannelUpdateCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7426,7 +7539,7 @@ impl<'a, C, NC, A> CustomchannelUpdateCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client in which the custom channel will be updated. + /// Ad client in which the custom channel will be updated. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelUpdateCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -7487,7 +7600,7 @@ impl<'a, C, NC, A> CustomchannelUpdateCall<'a, C, NC, A> where NC: hyper::net::N /// List all host custom channels in this AdSense account. /// /// A builder for the *list* method supported by a *customchannel* resource. -/// It is not used directly, but through a `CustomchannelMethods`. +/// It is not used directly, but through a `CustomchannelMethods` instance. /// /// # Example /// @@ -7555,7 +7668,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "adClientId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7608,7 +7721,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7620,7 +7733,6 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -7630,7 +7742,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7641,7 +7753,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7650,13 +7762,13 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7668,7 +7780,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client for which to list custom channels. + /// Ad client for which to list custom channels. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelListCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -7676,7 +7788,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *page token* query property to the given value. /// /// - /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. + /// A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. pub fn page_token(mut self, new_value: &str) -> CustomchannelListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -7684,7 +7796,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of custom channels to include in the response, used for paging. + /// The maximum number of custom channels to include in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> CustomchannelListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -7745,7 +7857,7 @@ impl<'a, C, NC, A> CustomchannelListCall<'a, C, NC, A> where NC: hyper::net::Net /// Update a custom channel in the host AdSense account. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *customchannel* resource. -/// It is not used directly, but through a `CustomchannelMethods`. +/// It is not used directly, but through a `CustomchannelMethods` instance. /// /// # Example /// @@ -7812,7 +7924,7 @@ impl<'a, C, NC, A> CustomchannelPatchCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "adClientId", "customChannelId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7869,7 +7981,7 @@ impl<'a, C, NC, A> CustomchannelPatchCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7885,7 +7997,6 @@ impl<'a, C, NC, A> CustomchannelPatchCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -7895,7 +8006,7 @@ impl<'a, C, NC, A> CustomchannelPatchCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7906,7 +8017,7 @@ impl<'a, C, NC, A> CustomchannelPatchCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7915,13 +8026,13 @@ impl<'a, C, NC, A> CustomchannelPatchCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7942,7 +8053,7 @@ impl<'a, C, NC, A> CustomchannelPatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client in which the custom channel will be updated. + /// Ad client in which the custom channel will be updated. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelPatchCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self @@ -7952,7 +8063,7 @@ impl<'a, C, NC, A> CustomchannelPatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom channel to get. + /// Custom channel to get. pub fn custom_channel_id(mut self, new_value: &str) -> CustomchannelPatchCall<'a, C, NC, A> { self._custom_channel_id = new_value.to_string(); self @@ -8013,7 +8124,7 @@ impl<'a, C, NC, A> CustomchannelPatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Add a new custom channel to the host AdSense account. /// /// A builder for the *insert* method supported by a *customchannel* resource. -/// It is not used directly, but through a `CustomchannelMethods`. +/// It is not used directly, but through a `CustomchannelMethods` instance. /// /// # Example /// @@ -8078,7 +8189,7 @@ impl<'a, C, NC, A> CustomchannelInsertCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "adClientId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8135,7 +8246,7 @@ impl<'a, C, NC, A> CustomchannelInsertCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8151,7 +8262,6 @@ impl<'a, C, NC, A> CustomchannelInsertCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -8161,7 +8271,7 @@ impl<'a, C, NC, A> CustomchannelInsertCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8172,7 +8282,7 @@ impl<'a, C, NC, A> CustomchannelInsertCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8181,13 +8291,13 @@ impl<'a, C, NC, A> CustomchannelInsertCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8208,7 +8318,7 @@ impl<'a, C, NC, A> CustomchannelInsertCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad client to which the new custom channel will be added. + /// Ad client to which the new custom channel will be added. pub fn ad_client_id(mut self, new_value: &str) -> CustomchannelInsertCall<'a, C, NC, A> { self._ad_client_id = new_value.to_string(); self diff --git a/gen/analytics3/Cargo.toml b/gen/analytics3/Cargo.toml index eaba6b7623..3be3da9285 100644 --- a/gen/analytics3/Cargo.toml +++ b/gen/analytics3/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-analytics3" -version = "0.1.1+20150308" +version = "0.1.2+20150308" authors = ["Sebastian Thiel "] description = "A complete library to interact with analytics (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/analytics3" @@ -16,7 +16,7 @@ keywords = ["analytics", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/analytics3/README.md b/gen/analytics3/README.md index bdd477c91b..dbc8318e53 100644 --- a/gen/analytics3/README.md +++ b/gen/analytics3/README.md @@ -1,11 +1,11 @@ The `google-analytics3` library allows access to all features of the *Google analytics* service. -This documentation was generated from *analytics* crate version *0.1.1+20150308*, where *20150308* is the exact revision of the *analytics:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *analytics* crate version *0.1.2+20150308*, where *20150308* is the exact revision of the *analytics:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *analytics* *v3* API can be found at the [official documentation site](https://developers.google.com/analytics/). @@ -35,6 +35,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-analytics3/struct.Analytics.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-analytics3/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-analytics3/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-analytics3/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -44,6 +46,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-analytics3/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -84,7 +88,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-analytics3" as analytics3; use analytics3::EntityUserLink; -use analytics3::Result; +use analytics3::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use analytics3::Analytics; @@ -113,15 +117,17 @@ let result = hub.management().profile_user_links_update(&req, "accountId", "webP .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -134,7 +140,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-analytics3/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-analytics3/trait.ResponseResult.html), it will return that by default. @@ -157,8 +163,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-analytics3/tra ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-analytics3/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-analytics3/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-analytics3/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-analytics3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-analytics3/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/analytics3/src/cmn.rs b/gen/analytics3/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/analytics3/src/cmn.rs +++ b/gen/analytics3/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/analytics3/src/lib.rs b/gen/analytics3/src/lib.rs index 8a0f56c857..ec56d4b5d7 100644 --- a/gen/analytics3/src/lib.rs +++ b/gen/analytics3/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *analytics* crate version *0.1.1+20150308*, where *20150308* is the exact revision of the *analytics:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *analytics* crate version *0.1.2+20150308*, where *20150308* is the exact revision of the *analytics:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *analytics* *v3* API can be found at the //! [official documentation site](https://developers.google.com/analytics/). @@ -35,6 +35,8 @@ //! //! * **[Hub](struct.Analytics.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -44,6 +46,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -84,7 +88,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-analytics3" as analytics3; //! use analytics3::EntityUserLink; -//! use analytics3::Result; +//! use analytics3::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -114,15 +118,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -135,7 +141,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -158,8 +164,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -208,7 +215,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -275,7 +282,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-analytics3" as analytics3; /// use analytics3::EntityUserLink; -/// use analytics3::Result; +/// use analytics3::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -305,15 +312,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -334,7 +343,7 @@ impl<'a, C, NC, A> Analytics Analytics { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -353,7 +362,7 @@ impl<'a, C, NC, A> Analytics } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -381,39 +390,39 @@ impl<'a, C, NC, A> Analytics /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomMetric { - /// Index of the custom metric. + /// Index of the custom metric. pub index: Option, - /// Kind value for a custom metric. Set to "analytics#customMetric". It is a read-only field. + /// Kind value for a custom metric. Set to "analytics#customMetric". It is a read-only field. pub kind: Option, - /// Name of the custom metric. + /// Name of the custom metric. pub name: Option, - /// Time the custom metric was created. + /// Time the custom metric was created. pub created: Option, - /// Max value of custom metric. + /// Max value of custom metric. pub max_value: Option, - /// Min value of custom metric. + /// Min value of custom metric. pub min_value: Option, - /// Time the custom metric was last modified. + /// Time the custom metric was last modified. pub updated: Option, - /// Property ID. + /// Property ID. #[serde(alias="webPropertyId")] pub web_property_id: Option, - /// Boolean indicating whether the custom metric is active. + /// Boolean indicating whether the custom metric is active. pub active: Option, - /// Scope of the custom metric: HIT or PRODUCT. + /// Scope of the custom metric: HIT or PRODUCT. pub scope: Option, - /// Parent link for the custom metric. Points to the property to which the custom metric belongs. + /// Parent link for the custom metric. Points to the property to which the custom metric belongs. #[serde(alias="parentLink")] pub parent_link: Option, - /// Data type of custom metric. + /// Data type of custom metric. #[serde(alias="type")] pub type_: Option, - /// Custom metric ID. + /// Custom metric ID. pub id: Option, - /// Link for the custom metric + /// Link for the custom metric #[serde(alias="selfLink")] pub self_link: Option, - /// Account ID. + /// Account ID. #[serde(alias="accountId")] pub account_id: Option, } @@ -436,51 +445,51 @@ impl ResponseResult for CustomMetric {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Goal { - /// Time this goal was last modified. + /// Time this goal was last modified. pub updated: Option, - /// Internal ID for the web property to which this goal belongs. + /// Internal ID for the web property to which this goal belongs. #[serde(alias="internalWebPropertyId")] pub internal_web_property_id: Option, - /// Web property ID to which this goal belongs. The web property ID is of the form UA-XXXXX-YY. + /// Web property ID to which this goal belongs. The web property ID is of the form UA-XXXXX-YY. #[serde(alias="webPropertyId")] pub web_property_id: Option, - /// Determines whether this goal is active. + /// Determines whether this goal is active. pub active: Option, - /// Goal ID. + /// Goal ID. pub id: Option, - /// Account ID to which this goal belongs. + /// Account ID to which this goal belongs. #[serde(alias="accountId")] pub account_id: Option, - /// Resource type for an Analytics goal. + /// Resource type for an Analytics goal. pub kind: Option, - /// Details for the goal of the type VISIT_TIME_ON_SITE. + /// Details for the goal of the type VISIT_TIME_ON_SITE. #[serde(alias="visitTimeOnSiteDetails")] pub visit_time_on_site_details: Option, - /// Goal name. + /// Goal name. pub name: Option, - /// Time this goal was created. + /// Time this goal was created. pub created: Option, - /// Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT. + /// Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT. #[serde(alias="type")] pub type_: Option, - /// Details for the goal of the type VISIT_NUM_PAGES. + /// Details for the goal of the type VISIT_NUM_PAGES. #[serde(alias="visitNumPagesDetails")] pub visit_num_pages_details: Option, - /// Goal value. + /// Goal value. pub value: Option, - /// Details for the goal of the type EVENT. + /// Details for the goal of the type EVENT. #[serde(alias="eventDetails")] pub event_details: Option, - /// View (Profile) ID to which this goal belongs. + /// View (Profile) ID to which this goal belongs. #[serde(alias="profileId")] pub profile_id: Option, - /// Parent link for a goal. Points to the view (profile) to which this goal belongs. + /// Parent link for a goal. Points to the view (profile) to which this goal belongs. #[serde(alias="parentLink")] pub parent_link: Option, - /// Details for the goal of the type URL_DESTINATION. + /// Details for the goal of the type URL_DESTINATION. #[serde(alias="urlDestinationDetails")] pub url_destination_details: Option, - /// Link for this goal. + /// Link for this goal. #[serde(alias="selfLink")] pub self_link: Option, } @@ -495,7 +504,7 @@ impl ResponseResult for Goal {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct WebpropertyPermissions { - /// All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. + /// All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. pub effective: Vec, } @@ -509,16 +518,16 @@ impl Part for WebpropertyPermissions {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FilterRef { - /// Kind value for filter reference. + /// Kind value for filter reference. pub kind: String, - /// Link for this filter. + /// Link for this filter. pub href: String, - /// Account ID to which this filter belongs. + /// Account ID to which this filter belongs. #[serde(alias="accountId")] pub account_id: String, - /// Filter ID. + /// Filter ID. pub id: String, - /// Name of this filter. + /// Name of this filter. pub name: String, } @@ -531,10 +540,10 @@ impl Part for FilterRef {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GoalEventDetails { - /// List of event conditions. + /// List of event conditions. #[serde(alias="eventConditions")] pub event_conditions: Vec, - /// Determines if the event value should be used as the value for this goal. + /// Determines if the event value should be used as the value for this goal. #[serde(alias="useEventValue")] pub use_event_value: bool, } @@ -554,7 +563,7 @@ impl Part for GoalEventDetails {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct AnalyticsDataimportDeleteUploadDataRequest { - /// A list of upload UIDs. + /// A list of upload UIDs. #[serde(alias="customDataImportUids")] pub custom_data_import_uids: Option>, } @@ -568,22 +577,22 @@ impl RequestValue for AnalyticsDataimportDeleteUploadDataRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct RealtimeDataProfileInfo { - /// Internal ID for the web property to which this view (profile) belongs. + /// Internal ID for the web property to which this view (profile) belongs. #[serde(alias="internalWebPropertyId")] pub internal_web_property_id: String, - /// Table ID for view (profile). + /// Table ID for view (profile). #[serde(alias="tableId")] pub table_id: String, - /// Web Property ID to which this view (profile) belongs. + /// Web Property ID to which this view (profile) belongs. #[serde(alias="webPropertyId")] pub web_property_id: String, - /// View (Profile) ID. + /// View (Profile) ID. #[serde(alias="profileId")] pub profile_id: String, - /// View (Profile) name. + /// View (Profile) name. #[serde(alias="profileName")] pub profile_name: String, - /// Account ID to which this view (profile) belongs. + /// Account ID to which this view (profile) belongs. #[serde(alias="accountId")] pub account_id: String, } @@ -598,18 +607,18 @@ impl Part for RealtimeDataProfileInfo {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct RealtimeDataQuery { - /// Maximum results per page. + /// Maximum results per page. #[serde(alias="max-results")] pub max_results: i32, - /// List of dimensions or metrics based on which real time data is sorted. + /// List of dimensions or metrics based on which real time data is sorted. pub sort: Vec, - /// List of real time metrics. + /// List of real time metrics. pub metrics: Vec, - /// List of real time dimensions. + /// List of real time dimensions. pub dimensions: String, - /// Comma-separated list of dimension or metric filters. + /// Comma-separated list of dimension or metric filters. pub filters: String, - /// Unique table ID. + /// Unique table ID. pub ids: String, } @@ -623,22 +632,22 @@ impl Part for RealtimeDataQuery {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProfileRef { - /// Analytics view (profile) reference. + /// Analytics view (profile) reference. pub kind: String, - /// Link for this view (profile). + /// Link for this view (profile). pub href: String, - /// Name of this view (profile). + /// Name of this view (profile). pub name: String, - /// Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs. + /// Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs. #[serde(alias="webPropertyId")] pub web_property_id: String, - /// Account ID to which this view (profile) belongs. + /// Account ID to which this view (profile) belongs. #[serde(alias="accountId")] pub account_id: String, - /// Internal ID for the web property to which this view (profile) belongs. + /// Internal ID for the web property to which this view (profile) belongs. #[serde(alias="internalWebPropertyId")] pub internal_web_property_id: String, - /// View (Profile) ID. + /// View (Profile) ID. pub id: String, } @@ -656,45 +665,45 @@ impl Part for ProfileRef {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct McfData { - /// Resource type. + /// Resource type. pub kind: String, - /// Analytics data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request. + /// Analytics data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request. pub rows: Vec>, - /// Determines if the Analytics data contains sampled data. + /// Determines if the Analytics data contains sampled data. #[serde(alias="containsSampledData")] pub contains_sampled_data: bool, - /// Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request. + /// Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request. #[serde(alias="columnHeaders")] pub column_headers: Vec, - /// The total number of rows for the query, regardless of the number of rows in the response. + /// The total number of rows for the query, regardless of the number of rows in the response. #[serde(alias="totalResults")] pub total_results: i32, - /// The maximum number of rows the response can contain, regardless of the actual number of rows returned. Its value ranges from 1 to 10,000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of rows the response can contain, regardless of the actual number of rows returned. Its value ranges from 1 to 10,000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request. + /// Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request. #[serde(alias="totalsForAllResults")] pub totals_for_all_results: HashMap, - /// Link to next page for this Analytics data query. + /// Link to next page for this Analytics data query. #[serde(alias="nextLink")] pub next_link: String, - /// The number of samples used to calculate the result. + /// The number of samples used to calculate the result. #[serde(alias="sampleSize")] pub sample_size: String, - /// Analytics data request query parameters. + /// Analytics data request query parameters. pub query: McfDataQuery, - /// Link to previous page for this Analytics data query. + /// Link to previous page for this Analytics data query. #[serde(alias="previousLink")] pub previous_link: String, - /// Information for the view (profile), for which the Analytics data was requested. + /// Information for the view (profile), for which the Analytics data was requested. #[serde(alias="profileInfo")] pub profile_info: McfDataProfileInfo, - /// Unique ID for this data response. + /// Unique ID for this data response. pub id: String, - /// Link to this page. + /// Link to this page. #[serde(alias="selfLink")] pub self_link: String, - /// Total size of the sample space from which the samples were selected. + /// Total size of the sample space from which the samples were selected. #[serde(alias="sampleSpace")] pub sample_space: String, } @@ -713,25 +722,25 @@ impl ResponseResult for McfData {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomDataSources { - /// Email ID of the authenticated user + /// Email ID of the authenticated user pub username: String, - /// Collection type. + /// Collection type. pub kind: String, - /// Collection of custom data sources. + /// Collection of custom data sources. pub items: Vec, - /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Link to previous page for this custom data source collection. + /// Link to previous page for this custom data source collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Link to next page for this custom data source collection. + /// Link to next page for this custom data source collection. #[serde(alias="nextLink")] pub next_link: String, - /// The total number of results for the query, regardless of the number of results in the response. + /// The total number of results for the query, regardless of the number of results in the response. #[serde(alias="totalResults")] pub total_results: i32, } @@ -750,25 +759,25 @@ impl ResponseResult for CustomDataSources {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Goals { - /// Email ID of the authenticated user + /// Email ID of the authenticated user pub username: String, - /// Collection type. + /// Collection type. pub kind: String, - /// A list of goals. + /// A list of goals. pub items: Vec, - /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Link to previous page for this goal collection. + /// Link to previous page for this goal collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Link to next page for this goal collection. + /// Link to next page for this goal collection. #[serde(alias="nextLink")] pub next_link: String, - /// The total number of results for the query, regardless of the number of resources in the result. + /// The total number of results for the query, regardless of the number of resources in the result. #[serde(alias="totalResults")] pub total_results: i32, } @@ -782,23 +791,23 @@ impl ResponseResult for Goals {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Account { - /// Resource type for Analytics account. + /// Resource type for Analytics account. pub kind: String, - /// Account name. + /// Account name. pub name: String, - /// Time the account was created. + /// Time the account was created. pub created: String, - /// Time the account was last modified. + /// Time the account was last modified. pub updated: String, - /// Child link for an account entry. Points to the list of web properties for this account. + /// Child link for an account entry. Points to the list of web properties for this account. #[serde(alias="childLink")] pub child_link: AccountChildLink, - /// Account ID. + /// Account ID. pub id: String, - /// Link for this account. + /// Link for this account. #[serde(alias="selfLink")] pub self_link: String, - /// Permissions the user has for this account. + /// Permissions the user has for this account. pub permissions: AccountPermissions, } @@ -816,48 +825,48 @@ impl Part for Account {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct GaData { - /// Determines if Analytics data contains samples. + /// Determines if Analytics data contains samples. #[serde(alias="containsSampledData")] pub contains_sampled_data: bool, - /// Link to previous page for this Analytics data query. + /// Link to previous page for this Analytics data query. #[serde(alias="previousLink")] pub previous_link: String, - /// no description provided + /// no description provided #[serde(alias="dataTable")] pub data_table: GaDataDataTable, - /// Analytics data request query parameters. + /// Analytics data request query parameters. pub query: GaDataQuery, - /// Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request. + /// Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request. #[serde(alias="totalsForAllResults")] pub totals_for_all_results: HashMap, - /// Unique ID for this data response. + /// Unique ID for this data response. pub id: String, - /// Resource type. + /// Resource type. pub kind: String, - /// Analytics data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request. + /// Analytics data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request. pub rows: Vec>, - /// The total number of rows for the query, regardless of the number of rows in the response. + /// The total number of rows for the query, regardless of the number of rows in the response. #[serde(alias="totalResults")] pub total_results: i32, - /// The maximum number of rows the response can contain, regardless of the actual number of rows returned. Its value ranges from 1 to 10,000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of rows the response can contain, regardless of the actual number of rows returned. Its value ranges from 1 to 10,000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Link to next page for this Analytics data query. + /// Link to next page for this Analytics data query. #[serde(alias="nextLink")] pub next_link: String, - /// The number of samples used to calculate the result. + /// The number of samples used to calculate the result. #[serde(alias="sampleSize")] pub sample_size: String, - /// Information for the view (profile), for which the Analytics data was requested. + /// Information for the view (profile), for which the Analytics data was requested. #[serde(alias="profileInfo")] pub profile_info: GaDataProfileInfo, - /// Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request. + /// Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request. #[serde(alias="columnHeaders")] pub column_headers: Vec, - /// Link to this page. + /// Link to this page. #[serde(alias="selfLink")] pub self_link: String, - /// Total size of the sample space from which the samples were selected. + /// Total size of the sample space from which the samples were selected. #[serde(alias="sampleSpace")] pub sample_space: String, } @@ -871,9 +880,9 @@ impl ResponseResult for GaData {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ExperimentParentLink { - /// Link to the view (profile) to which this experiment belongs. This field is read-only. + /// Link to the view (profile) to which this experiment belongs. This field is read-only. pub href: String, - /// Value is "analytics#profile". This field is read-only. + /// Value is "analytics#profile". This field is read-only. #[serde(alias="type")] pub type_: String, } @@ -894,51 +903,51 @@ impl Part for ExperimentParentLink {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UnsampledReport { - /// Status of this unsampled report. Possible values are PENDING, COMPLETED, or FAILED. + /// Status of this unsampled report. Possible values are PENDING, COMPLETED, or FAILED. pub status: Option, - /// Time this unsampled report was last modified. + /// Time this unsampled report was last modified. pub updated: Option, - /// The type of download you need to use for the report data file. + /// The type of download you need to use for the report data file. #[serde(alias="downloadType")] pub download_type: Option, - /// The start date for the unsampled report. + /// The start date for the unsampled report. #[serde(alias="start-date")] pub start_date: Option, - /// Download details for a file stored in Google Drive. + /// Download details for a file stored in Google Drive. #[serde(alias="driveDownloadDetails")] pub drive_download_details: Option, - /// The metrics for the unsampled report. + /// The metrics for the unsampled report. pub metrics: Option, - /// The filters for the unsampled report. + /// The filters for the unsampled report. pub filters: Option, - /// Web property ID to which this unsampled report belongs. The web property ID is of the form UA-XXXXX-YY. + /// Web property ID to which this unsampled report belongs. The web property ID is of the form UA-XXXXX-YY. #[serde(alias="webPropertyId")] pub web_property_id: Option, - /// The segment for the unsampled report. + /// The segment for the unsampled report. pub segment: Option, - /// Unsampled report ID. + /// Unsampled report ID. pub id: Option, - /// Account ID to which this unsampled report belongs. + /// Account ID to which this unsampled report belongs. #[serde(alias="accountId")] pub account_id: Option, - /// Resource type for an Analytics unsampled report. + /// Resource type for an Analytics unsampled report. pub kind: Option, - /// Download details for a file stored in Google Cloud Storage. + /// Download details for a file stored in Google Cloud Storage. #[serde(alias="cloudStorageDownloadDetails")] pub cloud_storage_download_details: Option, - /// The dimensions for the unsampled report. + /// The dimensions for the unsampled report. pub dimensions: Option, - /// Time this unsampled report was created. + /// Time this unsampled report was created. pub created: Option, - /// Title of the unsampled report. + /// Title of the unsampled report. pub title: Option, - /// View (Profile) ID to which this unsampled report belongs. + /// View (Profile) ID to which this unsampled report belongs. #[serde(alias="profileId")] pub profile_id: Option, - /// The end date for the unsampled report. + /// The end date for the unsampled report. #[serde(alias="end-date")] pub end_date: Option, - /// Link for this unsampled report. + /// Link for this unsampled report. #[serde(alias="selfLink")] pub self_link: Option, } @@ -953,9 +962,9 @@ impl ResponseResult for UnsampledReport {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct WebpropertyParentLink { - /// Link to the account for this web property. + /// Link to the account for this web property. pub href: String, - /// Type of the parent link. Its value is "analytics#account". + /// Type of the parent link. Its value is "analytics#account". #[serde(alias="type")] pub type_: String, } @@ -970,9 +979,9 @@ impl Part for WebpropertyParentLink {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProfileParentLink { - /// Link to the web property to which this view (profile) belongs. + /// Link to the web property to which this view (profile) belongs. pub href: String, - /// Value is "analytics#webproperty". + /// Value is "analytics#webproperty". #[serde(alias="type")] pub type_: String, } @@ -987,11 +996,11 @@ impl Part for ProfileParentLink {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserRef { - /// no description provided + /// no description provided pub kind: String, - /// Email ID of this user. + /// Email ID of this user. pub email: String, - /// User ID. + /// User ID. pub id: String, } @@ -1009,25 +1018,25 @@ impl Part for UserRef {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Accounts { - /// Email ID of the authenticated user + /// Email ID of the authenticated user pub username: String, - /// Collection type. + /// Collection type. pub kind: String, - /// A list of accounts. + /// A list of accounts. pub items: Vec, - /// The maximum number of entries the response can contain, regardless of the actual number of entries returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of entries the response can contain, regardless of the actual number of entries returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Previous link for this account collection. + /// Previous link for this account collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The starting index of the entries, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the entries, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Next link for this account collection. + /// Next link for this account collection. #[serde(alias="nextLink")] pub next_link: String, - /// The total number of results for the query, regardless of the number of results in the response. + /// The total number of results for the query, regardless of the number of results in the response. #[serde(alias="totalResults")] pub total_results: i32, } @@ -1041,34 +1050,34 @@ impl ResponseResult for Accounts {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FilterAdvancedDetails { - /// Field A. + /// Field A. #[serde(alias="fieldA")] pub field_a: String, - /// Indicates if the existing value of the output field, if any, should be overridden by the output expression. + /// Indicates if the existing value of the output field, if any, should be overridden by the output expression. #[serde(alias="overrideOutputField")] pub override_output_field: bool, - /// Indicates if field A is required to match. + /// Indicates if field A is required to match. #[serde(alias="fieldARequired")] pub field_a_required: bool, - /// Expression used to construct the output value. + /// Expression used to construct the output value. #[serde(alias="outputConstructor")] pub output_constructor: String, - /// Indicates if field B is required to match. + /// Indicates if field B is required to match. #[serde(alias="fieldBRequired")] pub field_b_required: bool, - /// Indicates if the filter expressions are case sensitive. + /// Indicates if the filter expressions are case sensitive. #[serde(alias="caseSensitive")] pub case_sensitive: bool, - /// Field B. + /// Field B. #[serde(alias="fieldB")] pub field_b: String, - /// Expression to extract from field B. + /// Expression to extract from field B. #[serde(alias="extractB")] pub extract_b: String, - /// Expression to extract from field A. + /// Expression to extract from field A. #[serde(alias="extractA")] pub extract_a: String, - /// Output field. + /// Output field. #[serde(alias="outputToField")] pub output_to_field: String, } @@ -1083,21 +1092,21 @@ impl Part for FilterAdvancedDetails {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct WebPropertySummary { - /// Website url for this web property. + /// Website url for this web property. #[serde(alias="websiteUrl")] pub website_url: String, - /// Resource type for Analytics WebPropertySummary. + /// Resource type for Analytics WebPropertySummary. pub kind: String, - /// Web property name. + /// Web property name. pub name: String, - /// Level for this web property. Possible values are STANDARD or PREMIUM. + /// Level for this web property. Possible values are STANDARD or PREMIUM. pub level: String, - /// Internal ID for this web property. + /// Internal ID for this web property. #[serde(alias="internalWebPropertyId")] pub internal_web_property_id: String, - /// List of profiles under this web property. + /// List of profiles under this web property. pub profiles: Vec, - /// Web property ID of the form UA-XXXXX-YY. + /// Web property ID of the form UA-XXXXX-YY. pub id: String, } @@ -1115,17 +1124,17 @@ impl Part for WebPropertySummary {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountTicket { - /// View (Profile) for the account. + /// View (Profile) for the account. pub profile: Option, - /// Account for this ticket. + /// Account for this ticket. pub account: Option, - /// Account ticket ID used to access the account ticket. + /// Account ticket ID used to access the account ticket. pub id: Option, - /// Web property for the account. + /// Web property for the account. pub webproperty: Option, - /// Resource type for account ticket. + /// Resource type for account ticket. pub kind: Option, - /// Redirect URI where the user will be sent after accepting Terms of Service. Must be configured in APIs console as a callback URL. + /// Redirect URI where the user will be sent after accepting Terms of Service. Must be configured in APIs console as a callback URL. #[serde(alias="redirectUri")] pub redirect_uri: Option, } @@ -1140,22 +1149,22 @@ impl ResponseResult for AccountTicket {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct McfDataProfileInfo { - /// Internal ID for the web property to which this view (profile) belongs. + /// Internal ID for the web property to which this view (profile) belongs. #[serde(alias="internalWebPropertyId")] pub internal_web_property_id: String, - /// Table ID for view (profile). + /// Table ID for view (profile). #[serde(alias="tableId")] pub table_id: String, - /// Web Property ID to which this view (profile) belongs. + /// Web Property ID to which this view (profile) belongs. #[serde(alias="webPropertyId")] pub web_property_id: String, - /// View (Profile) ID. + /// View (Profile) ID. #[serde(alias="profileId")] pub profile_id: String, - /// View (Profile) name. + /// View (Profile) name. #[serde(alias="profileName")] pub profile_name: String, - /// Account ID to which this view (profile) belongs. + /// Account ID to which this view (profile) belongs. #[serde(alias="accountId")] pub account_id: String, } @@ -1170,10 +1179,10 @@ impl Part for McfDataProfileInfo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UnsampledReportCloudStorageDownloadDetails { - /// Id of the bucket the file object is stored in. + /// Id of the bucket the file object is stored in. #[serde(alias="bucketId")] pub bucket_id: String, - /// Id of the file object containing the report data. + /// Id of the file object containing the report data. #[serde(alias="objectId")] pub object_id: String, } @@ -1188,10 +1197,10 @@ impl Part for UnsampledReportCloudStorageDownloadDetails {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GoalVisitTimeOnSiteDetails { - /// Type of comparison. Possible values are LESS_THAN or GREATER_THAN. + /// Type of comparison. Possible values are LESS_THAN or GREATER_THAN. #[serde(alias="comparisonType")] pub comparison_type: String, - /// Value used for this comparison. + /// Value used for this comparison. #[serde(alias="comparisonValue")] pub comparison_value: String, } @@ -1206,9 +1215,9 @@ impl Part for GoalVisitTimeOnSiteDetails {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct GaDataDataTable { - /// no description provided + /// no description provided pub rows: Vec, - /// no description provided + /// no description provided pub cols: Vec, } @@ -1232,19 +1241,19 @@ impl Part for GaDataDataTable {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EntityUserLink { - /// Resource type for entity user link. + /// Resource type for entity user link. pub kind: Option, - /// User reference. + /// User reference. #[serde(alias="userRef")] pub user_ref: Option, - /// Permissions the user has for this entity. + /// Permissions the user has for this entity. pub permissions: Option, - /// Entity user link ID + /// Entity user link ID pub id: Option, - /// Self link for this resource. + /// Self link for this resource. #[serde(alias="selfLink")] pub self_link: Option, - /// Entity for this link. It can be an account, a web property, or a view (profile). + /// Entity for this link. It can be an account, a web property, or a view (profile). pub entity: Option, } @@ -1263,25 +1272,25 @@ impl ResponseResult for EntityUserLink {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountSummaries { - /// Email ID of the authenticated user + /// Email ID of the authenticated user pub username: String, - /// Collection type. + /// Collection type. pub kind: String, - /// A list of AccountSummaries. + /// A list of AccountSummaries. pub items: Vec, - /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Link to previous page for this AccountSummary collection. + /// Link to previous page for this AccountSummary collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Link to next page for this AccountSummary collection. + /// Link to next page for this AccountSummary collection. #[serde(alias="nextLink")] pub next_link: String, - /// The total number of results for the query, regardless of the number of results in the response. + /// The total number of results for the query, regardless of the number of results in the response. #[serde(alias="totalResults")] pub total_results: i32, } @@ -1300,25 +1309,25 @@ impl ResponseResult for AccountSummaries {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomDimensions { - /// Email ID of the authenticated user + /// Email ID of the authenticated user pub username: String, - /// Collection type. + /// Collection type. pub kind: String, - /// Collection of custom dimensions. + /// Collection of custom dimensions. pub items: Vec, - /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Link to previous page for this custom dimension collection. + /// Link to previous page for this custom dimension collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Link to next page for this custom dimension collection. + /// Link to next page for this custom dimension collection. #[serde(alias="nextLink")] pub next_link: String, - /// The total number of results for the query, regardless of the number of results in the response. + /// The total number of results for the query, regardless of the number of results in the response. #[serde(alias="totalResults")] pub total_results: i32, } @@ -1332,7 +1341,7 @@ impl ResponseResult for CustomDimensions {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UnsampledReportDriveDownloadDetails { - /// Id of the document/file containing the report data. + /// Id of the document/file containing the report data. #[serde(alias="documentId")] pub document_id: String, } @@ -1347,17 +1356,17 @@ impl Part for UnsampledReportDriveDownloadDetails {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GoalUrlDestinationDetails { - /// URL for this goal. + /// URL for this goal. pub url: String, - /// Determines if the goal URL must exactly match the capitalization of visited URLs. + /// Determines if the goal URL must exactly match the capitalization of visited URLs. #[serde(alias="caseSensitive")] pub case_sensitive: bool, - /// Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX. + /// Match type for the goal URL. Possible values are HEAD, EXACT, or REGEX. #[serde(alias="matchType")] pub match_type: String, - /// List of steps configured for this goal funnel. + /// List of steps configured for this goal funnel. pub steps: Vec, - /// Determines if the first step in this goal is required. + /// Determines if the first step in this goal is required. #[serde(alias="firstStepRequired")] pub first_step_required: bool, } @@ -1378,18 +1387,18 @@ impl Part for GoalUrlDestinationDetails {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Upload { - /// Upload status. Possible values: PENDING, COMPLETED, FAILED, DELETING, DELETED. + /// Upload status. Possible values: PENDING, COMPLETED, FAILED, DELETING, DELETED. pub status: String, - /// Resource type for Analytics upload. + /// Resource type for Analytics upload. pub kind: String, - /// Data import errors collection. + /// Data import errors collection. pub errors: Vec, - /// Custom data source Id to which this data import belongs. + /// Custom data source Id to which this data import belongs. #[serde(alias="customDataSourceId")] pub custom_data_source_id: String, - /// A unique ID for this upload. + /// A unique ID for this upload. pub id: String, - /// Account Id to which this upload belongs. + /// Account Id to which this upload belongs. #[serde(alias="accountId")] pub account_id: String, } @@ -1408,25 +1417,25 @@ impl ResponseResult for Upload {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Profiles { - /// Email ID of the authenticated user + /// Email ID of the authenticated user pub username: String, - /// Collection type. + /// Collection type. pub kind: String, - /// A list of views (profiles). + /// A list of views (profiles). pub items: Vec, - /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Link to previous page for this view (profile) collection. + /// Link to previous page for this view (profile) collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Link to next page for this view (profile) collection. + /// Link to next page for this view (profile) collection. #[serde(alias="nextLink")] pub next_link: String, - /// The total number of results for the query, regardless of the number of results in the response. + /// The total number of results for the query, regardless of the number of results in the response. #[serde(alias="totalResults")] pub total_results: i32, } @@ -1440,7 +1449,7 @@ impl ResponseResult for Profiles {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountPermissions { - /// All the permissions that the user has for this account. These include any implied permissions (e.g., EDIT implies VIEW). + /// All the permissions that the user has for this account. These include any implied permissions (e.g., EDIT implies VIEW). pub effective: Vec, } @@ -1454,22 +1463,22 @@ impl Part for AccountPermissions {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct GaDataProfileInfo { - /// Internal ID for the web property to which this view (profile) belongs. + /// Internal ID for the web property to which this view (profile) belongs. #[serde(alias="internalWebPropertyId")] pub internal_web_property_id: String, - /// Table ID for view (profile). + /// Table ID for view (profile). #[serde(alias="tableId")] pub table_id: String, - /// Web Property ID to which this view (profile) belongs. + /// Web Property ID to which this view (profile) belongs. #[serde(alias="webPropertyId")] pub web_property_id: String, - /// View (Profile) ID. + /// View (Profile) ID. #[serde(alias="profileId")] pub profile_id: String, - /// View (Profile) name. + /// View (Profile) name. #[serde(alias="profileName")] pub profile_name: String, - /// Account ID to which this view (profile) belongs. + /// Account ID to which this view (profile) belongs. #[serde(alias="accountId")] pub account_id: String, } @@ -1484,9 +1493,9 @@ impl Part for GaDataProfileInfo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FilterParentLink { - /// Link to the account to which this filter belongs. + /// Link to the account to which this filter belongs. pub href: String, - /// Value is "analytics#account". + /// Value is "analytics#account". #[serde(alias="type")] pub type_: String, } @@ -1506,25 +1515,25 @@ impl Part for FilterParentLink {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Webproperties { - /// Email ID of the authenticated user + /// Email ID of the authenticated user pub username: String, - /// Collection type. + /// Collection type. pub kind: String, - /// A list of web properties. + /// A list of web properties. pub items: Vec, - /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Link to previous page for this web property collection. + /// Link to previous page for this web property collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Link to next page for this web property collection. + /// Link to next page for this web property collection. #[serde(alias="nextLink")] pub next_link: String, - /// The total number of results for the query, regardless of the number of results in the response. + /// The total number of results for the query, regardless of the number of results in the response. #[serde(alias="totalResults")] pub total_results: i32, } @@ -1538,9 +1547,9 @@ impl ResponseResult for Webproperties {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EntityUserLinkPermissions { - /// Permissions that a user has been assigned at this very level. Does not include any implied or inherited permissions. Local permissions are modifiable. + /// Permissions that a user has been assigned at this very level. Does not include any implied or inherited permissions. Local permissions are modifiable. pub local: Vec, - /// Effective permissions represent all the permissions that a user has for this entity. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent entity. Effective permissions are read-only. + /// Effective permissions represent all the permissions that a user has for this entity. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent entity. Effective permissions are read-only. pub effective: Vec, } @@ -1562,18 +1571,18 @@ impl Part for EntityUserLinkPermissions {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProfileFilterLink { - /// Filter for this link. + /// Filter for this link. #[serde(alias="filterRef")] pub filter_ref: Option, - /// Resource type for Analytics filter. + /// Resource type for Analytics filter. pub kind: Option, - /// Link for this profile filter link. + /// Link for this profile filter link. #[serde(alias="selfLink")] pub self_link: Option, - /// View (Profile) for this link. + /// View (Profile) for this link. #[serde(alias="profileRef")] pub profile_ref: Option, - /// Profile filter link ID. + /// Profile filter link ID. pub id: Option, /// The rank of this profile filter link relative to the other filters linked to the same profile. /// For readonly (i.e., list and get) operations, the rank always starts at 1. @@ -1591,14 +1600,14 @@ impl ResponseResult for ProfileFilterLink {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountSummary { - /// Resource type for Analytics AccountSummary. + /// Resource type for Analytics AccountSummary. pub kind: String, - /// List of web properties under this account. + /// List of web properties under this account. #[serde(alias="webProperties")] pub web_properties: Vec, - /// Account ID. + /// Account ID. pub id: String, - /// Account name. + /// Account name. pub name: String, } @@ -1619,45 +1628,45 @@ impl Part for AccountSummary {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Webproperty { - /// Time this web property was last modified. + /// Time this web property was last modified. pub updated: Option, - /// Default view (profile) ID. + /// Default view (profile) ID. #[serde(alias="defaultProfileId")] pub default_profile_id: Option, - /// View (Profile) count for this web property. + /// View (Profile) count for this web property. #[serde(alias="profileCount")] pub profile_count: Option, - /// Internal ID for this web property. + /// Internal ID for this web property. #[serde(alias="internalWebPropertyId")] pub internal_web_property_id: Option, - /// Child link for this web property. Points to the list of views (profiles) for this web property. + /// Child link for this web property. Points to the list of views (profiles) for this web property. #[serde(alias="childLink")] pub child_link: Option, - /// The industry vertical/category selected for this web property. + /// The industry vertical/category selected for this web property. #[serde(alias="industryVertical")] pub industry_vertical: Option, - /// Web property ID of the form UA-XXXXX-YY. + /// Web property ID of the form UA-XXXXX-YY. pub id: Option, - /// Account ID to which this web property belongs. + /// Account ID to which this web property belongs. #[serde(alias="accountId")] pub account_id: Option, - /// Resource type for Analytics WebProperty. + /// Resource type for Analytics WebProperty. pub kind: Option, - /// Name of this web property. + /// Name of this web property. pub name: Option, - /// Time this web property was created. + /// Time this web property was created. pub created: Option, - /// Level for this web property. Possible values are STANDARD or PREMIUM. + /// Level for this web property. Possible values are STANDARD or PREMIUM. pub level: Option, - /// Website url for this web property. + /// Website url for this web property. #[serde(alias="websiteUrl")] pub website_url: Option, - /// Parent link for this web property. Points to the account to which this web property belongs. + /// Parent link for this web property. Points to the account to which this web property belongs. #[serde(alias="parentLink")] pub parent_link: Option, - /// Permissions the user has for this web property. + /// Permissions the user has for this web property. pub permissions: Option, - /// Link for this web property. + /// Link for this web property. #[serde(alias="selfLink")] pub self_link: Option, } @@ -1677,27 +1686,27 @@ impl ResponseResult for Webproperty {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct RealtimeData { - /// Resource type. + /// Resource type. pub kind: String, - /// Real time data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request. + /// Real time data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request. pub rows: Vec>, - /// The total number of rows for the query, regardless of the number of rows in the response. + /// The total number of rows for the query, regardless of the number of rows in the response. #[serde(alias="totalResults")] pub total_results: i32, - /// Information for the view (profile), for which the real time data was requested. + /// Information for the view (profile), for which the real time data was requested. #[serde(alias="profileInfo")] pub profile_info: RealtimeDataProfileInfo, - /// Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request. + /// Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request. #[serde(alias="columnHeaders")] pub column_headers: Vec, - /// Real time data request query parameters. + /// Real time data request query parameters. pub query: RealtimeDataQuery, - /// Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request. + /// Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request. #[serde(alias="totalsForAllResults")] pub totals_for_all_results: HashMap, - /// Unique ID for this data response. + /// Unique ID for this data response. pub id: String, - /// Link to this page. + /// Link to this page. #[serde(alias="selfLink")] pub self_link: String, } @@ -1711,16 +1720,16 @@ impl ResponseResult for RealtimeData {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FilterSearchAndReplaceDetails { - /// Determines if the filter is case sensitive. + /// Determines if the filter is case sensitive. #[serde(alias="caseSensitive")] pub case_sensitive: bool, - /// Term to search. + /// Term to search. #[serde(alias="searchString")] pub search_string: String, - /// Term to replace the search term with. + /// Term to replace the search term with. #[serde(alias="replaceString")] pub replace_string: String, - /// Field to use in the filter. + /// Field to use in the filter. pub field: String, } @@ -1742,73 +1751,73 @@ impl Part for FilterSearchAndReplaceDetails {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Experiment { - /// Experiment status. Possible values: "DRAFT", "READY_TO_RUN", "RUNNING", "ENDED". Experiments can be created in the "DRAFT", "READY_TO_RUN" or "RUNNING" state. This field is required when creating an experiment. + /// Experiment status. Possible values: "DRAFT", "READY_TO_RUN", "RUNNING", "ENDED". Experiments can be created in the "DRAFT", "READY_TO_RUN" or "RUNNING" state. This field is required when creating an experiment. pub status: Option, - /// A floating-point number between 0 and 1. Specifies the fraction of the traffic that participates in the experiment. Can be changed for a running experiment. This field may not be changed for an experiments whose status is ENDED. + /// A floating-point number between 0 and 1. Specifies the fraction of the traffic that participates in the experiment. Can be changed for a running experiment. This field may not be changed for an experiments whose status is ENDED. #[serde(alias="trafficCoverage")] pub traffic_coverage: Option, - /// Notes about this experiment. + /// Notes about this experiment. pub description: Option, - /// Web property ID to which this experiment belongs. The web property ID is of the form UA-XXXXX-YY. This field is read-only. + /// Web property ID to which this experiment belongs. The web property ID is of the form UA-XXXXX-YY. This field is read-only. #[serde(alias="webPropertyId")] pub web_property_id: Option, - /// Time the experiment was last modified. This field is read-only. + /// Time the experiment was last modified. This field is read-only. pub updated: Option, - /// Internal ID for the web property to which this experiment belongs. This field is read-only. + /// Internal ID for the web property to which this experiment belongs. This field is read-only. #[serde(alias="internalWebPropertyId")] pub internal_web_property_id: Option, - /// A floating-point number between 0 and 1. Specifies the necessary confidence level to choose a winner. This field may not be changed for an experiments whose status is ENDED. + /// A floating-point number between 0 and 1. Specifies the necessary confidence level to choose a winner. This field may not be changed for an experiments whose status is ENDED. #[serde(alias="winnerConfidenceLevel")] pub winner_confidence_level: Option, - /// The starting time of the experiment (the time the status changed from READY_TO_RUN to RUNNING). This field is present only if the experiment has started. This field is read-only. + /// The starting time of the experiment (the time the status changed from READY_TO_RUN to RUNNING). This field is present only if the experiment has started. This field is read-only. #[serde(alias="startTime")] pub start_time: Option, - /// Whether the objectiveMetric should be minimized or maximized. Possible values: "MAXIMUM", "MINIMUM". Optional--defaults to "MAXIMUM". Cannot be specified without objectiveMetric. Cannot be modified when status is "RUNNING" or "ENDED". + /// Whether the objectiveMetric should be minimized or maximized. Possible values: "MAXIMUM", "MINIMUM". Optional--defaults to "MAXIMUM". Cannot be specified without objectiveMetric. Cannot be modified when status is "RUNNING" or "ENDED". #[serde(alias="optimizationType")] pub optimization_type: Option, - /// Boolean specifying whether a winner has been found for this experiment. This field is read-only. + /// Boolean specifying whether a winner has been found for this experiment. This field is read-only. #[serde(alias="winnerFound")] pub winner_found: Option, - /// The metric that the experiment is optimizing. Valid values: "ga:goal(n)Completions", "ga:adsenseAdsClicks", "ga:adsenseAdsViewed", "ga:adsenseRevenue", "ga:bounces", "ga:pageviews", "ga:sessionDuration", "ga:transactions", "ga:transactionRevenue". This field is required if status is "RUNNING" and servingFramework is one of "REDIRECT" or "API". + /// The metric that the experiment is optimizing. Valid values: "ga:goal(n)Completions", "ga:adsenseAdsClicks", "ga:adsenseAdsViewed", "ga:adsenseRevenue", "ga:bounces", "ga:pageviews", "ga:sessionDuration", "ga:transactions", "ga:transactionRevenue". This field is required if status is "RUNNING" and servingFramework is one of "REDIRECT" or "API". #[serde(alias="objectiveMetric")] pub objective_metric: Option, - /// Experiment ID. Required for patch and update. Disallowed for create. + /// Experiment ID. Required for patch and update. Disallowed for create. pub id: Option, - /// Boolean specifying whether to distribute traffic evenly across all variations. If the value is False, content experiments follows the default behavior of adjusting traffic dynamically based on variation performance. Optional -- defaults to False. This field may not be changed for an experiment whose status is ENDED. + /// Boolean specifying whether to distribute traffic evenly across all variations. If the value is False, content experiments follows the default behavior of adjusting traffic dynamically based on variation performance. Optional -- defaults to False. This field may not be changed for an experiment whose status is ENDED. #[serde(alias="equalWeighting")] pub equal_weighting: Option, - /// Account ID to which this experiment belongs. This field is read-only. + /// Account ID to which this experiment belongs. This field is read-only. #[serde(alias="accountId")] pub account_id: Option, - /// Resource type for an Analytics experiment. This field is read-only. + /// Resource type for an Analytics experiment. This field is read-only. pub kind: Option, - /// Experiment name. This field may not be changed for an experiment whose status is ENDED. This field is required when creating an experiment. + /// Experiment name. This field may not be changed for an experiment whose status is ENDED. This field is required when creating an experiment. pub name: Option, - /// Time the experiment was created. This field is read-only. + /// Time the experiment was created. This field is read-only. pub created: Option, - /// Why the experiment ended. Possible values: "STOPPED_BY_USER", "WINNER_FOUND", "EXPERIMENT_EXPIRED", "ENDED_WITH_NO_WINNER", "GOAL_OBJECTIVE_CHANGED". "ENDED_WITH_NO_WINNER" means that the experiment didn't expire but no winner was projected to be found. If the experiment status is changed via the API to ENDED this field is set to STOPPED_BY_USER. This field is read-only. + /// Why the experiment ended. Possible values: "STOPPED_BY_USER", "WINNER_FOUND", "EXPERIMENT_EXPIRED", "ENDED_WITH_NO_WINNER", "GOAL_OBJECTIVE_CHANGED". "ENDED_WITH_NO_WINNER" means that the experiment didn't expire but no winner was projected to be found. If the experiment status is changed via the API to ENDED this field is set to STOPPED_BY_USER. This field is read-only. #[serde(alias="reasonExperimentEnded")] pub reason_experiment_ended: Option, - /// Array of variations. The first variation in the array is the original. The number of variations may not change once an experiment is in the RUNNING state. At least two variations are required before status can be set to RUNNING. + /// Array of variations. The first variation in the array is the original. The number of variations may not change once an experiment is in the RUNNING state. At least two variations are required before status can be set to RUNNING. pub variations: Option>, - /// The snippet of code to include on the control page(s). This field is read-only. + /// The snippet of code to include on the control page(s). This field is read-only. pub snippet: Option, - /// If true, the end user will be able to edit the experiment via the Google Analytics user interface. + /// If true, the end user will be able to edit the experiment via the Google Analytics user interface. #[serde(alias="editableInGaUi")] pub editable_in_ga_ui: Option, - /// Boolean specifying whether variations URLS are rewritten to match those of the original. This field may not be changed for an experiments whose status is ENDED. + /// Boolean specifying whether variations URLS are rewritten to match those of the original. This field may not be changed for an experiments whose status is ENDED. #[serde(alias="rewriteVariationUrlsAsOriginal")] pub rewrite_variation_urls_as_original: Option, - /// An integer number in [3, 90]. Specifies the minimum length of the experiment. Can be changed for a running experiment. This field may not be changed for an experiments whose status is ENDED. + /// An integer number in [3, 90]. Specifies the minimum length of the experiment. Can be changed for a running experiment. This field may not be changed for an experiments whose status is ENDED. #[serde(alias="minimumExperimentLengthInDays")] pub minimum_experiment_length_in_days: Option, - /// View (Profile) ID to which this experiment belongs. This field is read-only. + /// View (Profile) ID to which this experiment belongs. This field is read-only. #[serde(alias="profileId")] pub profile_id: Option, - /// Parent link for an experiment. Points to the view (profile) to which this experiment belongs. + /// Parent link for an experiment. Points to the view (profile) to which this experiment belongs. #[serde(alias="parentLink")] pub parent_link: Option, - /// The ending time of the experiment (the time the status changed from RUNNING to ENDED). This field is present only if the experiment has ended. This field is read-only. + /// The ending time of the experiment (the time the status changed from RUNNING to ENDED). This field is present only if the experiment has ended. This field is read-only. #[serde(alias="endTime")] pub end_time: Option, /// The framework used to serve the experiment variations and evaluate the results. One of: @@ -1817,7 +1826,7 @@ pub struct Experiment { /// - EXTERNAL: The variations will be served externally and the chosen variation reported to Google Analytics. The caller is responsible for serving the selected variation and evaluating the results. #[serde(alias="servingFramework")] pub serving_framework: Option, - /// Link for this experiment. This field is read-only. + /// Link for this experiment. This field is read-only. #[serde(alias="selfLink")] pub self_link: Option, } @@ -1837,25 +1846,25 @@ impl ResponseResult for Experiment {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomMetrics { - /// Email ID of the authenticated user + /// Email ID of the authenticated user pub username: String, - /// Collection type. + /// Collection type. pub kind: String, - /// Collection of custom metrics. + /// Collection of custom metrics. pub items: Vec, - /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Link to previous page for this custom metric collection. + /// Link to previous page for this custom metric collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Link to next page for this custom metric collection. + /// Link to next page for this custom metric collection. #[serde(alias="nextLink")] pub next_link: String, - /// The total number of results for the query, regardless of the number of results in the response. + /// The total number of results for the query, regardless of the number of results in the response. #[serde(alias="totalResults")] pub total_results: i32, } @@ -1869,32 +1878,32 @@ impl ResponseResult for CustomMetrics {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct GaDataQuery { - /// Maximum results per page. + /// Maximum results per page. #[serde(alias="max-results")] pub max_results: i32, - /// List of dimensions or metrics based on which Analytics data is sorted. + /// List of dimensions or metrics based on which Analytics data is sorted. pub sort: Vec, - /// List of analytics dimensions. + /// List of analytics dimensions. pub dimensions: String, - /// Start date. + /// Start date. #[serde(alias="start-date")] pub start_date: String, - /// Start index. + /// Start index. #[serde(alias="start-index")] pub start_index: i32, - /// End date. + /// End date. #[serde(alias="end-date")] pub end_date: String, - /// Unique table ID. + /// Unique table ID. pub ids: String, - /// List of analytics metrics. + /// List of analytics metrics. pub metrics: Vec, - /// Desired sampling level + /// Desired sampling level #[serde(alias="samplingLevel")] pub sampling_level: String, - /// Comma-separated list of dimension or metric filters. + /// Comma-separated list of dimension or metric filters. pub filters: String, - /// Analytics advanced segment. + /// Analytics advanced segment. pub segment: String, } @@ -1913,16 +1922,16 @@ impl Part for GaDataQuery {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Columns { - /// List of columns for a report type. + /// List of columns for a report type. pub items: Vec, - /// Collection type. + /// Collection type. pub kind: String, - /// Etag of collection. This etag can be compared with the last response etag to check if response has changed. + /// Etag of collection. This etag can be compared with the last response etag to check if response has changed. pub etag: String, - /// Total number of columns returned in the response. + /// Total number of columns returned in the response. #[serde(alias="totalResults")] pub total_results: i32, - /// List of attributes names returned by columns. + /// List of attributes names returned by columns. #[serde(alias="attributeNames")] pub attribute_names: Vec, } @@ -1936,15 +1945,15 @@ impl ResponseResult for Columns {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FilterExpression { - /// Determines if the filter is case sensitive. + /// Determines if the filter is case sensitive. #[serde(alias="caseSensitive")] pub case_sensitive: bool, - /// Kind value for filter expression + /// Kind value for filter expression pub kind: String, - /// Match type for this filter. Possible values are BEGINS_WITH, EQUAL, ENDS_WITH, CONTAINS, MATCHES. Include and Exclude filters can use any match type. Match type is not applicable to Upper case and Lower case filters. Search and Replace expressions in the Search and Replace filter and all filter expressions in the Advanced filter default to MATCHES. User should not set match type for those filters. + /// Match type for this filter. Possible values are BEGINS_WITH, EQUAL, ENDS_WITH, CONTAINS, MATCHES. Include and Exclude filters can use any match type. Match type is not applicable to Upper case and Lower case filters. Search and Replace expressions in the Search and Replace filter and all filter expressions in the Advanced filter default to MATCHES. User should not set match type for those filters. #[serde(alias="matchType")] pub match_type: String, - /// Filter expression value + /// Filter expression value #[serde(alias="expressionValue")] pub expression_value: String, /// Field to filter. Possible values: @@ -2044,10 +2053,10 @@ impl Part for FilterExpression {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct McfDataRowsConversionPathValue { - /// Node value of an interaction on conversion path. Such as source, medium etc. + /// Node value of an interaction on conversion path. Such as source, medium etc. #[serde(alias="nodeValue")] pub node_value: String, - /// Type of an interaction on conversion path. Such as CLICK, IMPRESSION etc. + /// Type of an interaction on conversion path. Such as CLICK, IMPRESSION etc. #[serde(alias="interactionType")] pub interaction_type: String, } @@ -2062,7 +2071,7 @@ impl Part for McfDataRowsConversionPathValue {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct GaDataDataTableRows { - /// no description provided + /// no description provided pub c: Vec, } @@ -2076,12 +2085,12 @@ impl Part for GaDataDataTableRows {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdWordsAccount { - /// Resource type for AdWords account. + /// Resource type for AdWords account. pub kind: String, - /// Customer ID. This field is required when creating an AdWords link. + /// Customer ID. This field is required when creating an AdWords link. #[serde(alias="customerId")] pub customer_id: String, - /// True if auto-tagging is enabled on the AdWords account. Read-only after the insert operation. + /// True if auto-tagging is enabled on the AdWords account. Read-only after the insert operation. #[serde(alias="autoTaggingEnabled")] pub auto_tagging_enabled: bool, } @@ -2095,19 +2104,19 @@ impl Part for AdWordsAccount {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct WebPropertyRef { - /// Analytics web property reference. + /// Analytics web property reference. pub kind: String, - /// Link for this web property. + /// Link for this web property. pub href: String, - /// Name of this web property. + /// Name of this web property. pub name: String, - /// Account ID to which this web property belongs. + /// Account ID to which this web property belongs. #[serde(alias="accountId")] pub account_id: String, - /// Internal ID for this web property. + /// Internal ID for this web property. #[serde(alias="internalWebPropertyId")] pub internal_web_property_id: String, - /// Web property ID of the form UA-XXXXX-YY. + /// Web property ID of the form UA-XXXXX-YY. pub id: String, } @@ -2120,9 +2129,9 @@ impl Part for WebPropertyRef {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct WebpropertyChildLink { - /// Link to the list of views (profiles) for this web property. + /// Link to the list of views (profiles) for this web property. pub href: String, - /// Type of the parent link. Its value is "analytics#profiles". + /// Type of the parent link. Its value is "analytics#profiles". #[serde(alias="type")] pub type_: String, } @@ -2137,7 +2146,7 @@ impl Part for WebpropertyChildLink {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct GaDataDataTableRowsC { - /// no description provided + /// no description provided pub v: String, } @@ -2151,11 +2160,11 @@ impl Part for GaDataDataTableRowsC {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Column { - /// Map of attribute name and value for this column. + /// Map of attribute name and value for this column. pub attributes: HashMap, - /// Resource type for Analytics column. + /// Resource type for Analytics column. pub kind: String, - /// Column id. + /// Column id. pub id: String, } @@ -2173,25 +2182,25 @@ impl Part for Column {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ProfileFilterLinks { - /// Email ID of the authenticated user + /// Email ID of the authenticated user pub username: String, - /// Collection type. + /// Collection type. pub kind: String, - /// A list of profile filter links. + /// A list of profile filter links. pub items: Vec, - /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1,000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1,000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Link to previous page for this profile filter link collection. + /// Link to previous page for this profile filter link collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Link to next page for this profile filter link collection. + /// Link to next page for this profile filter link collection. #[serde(alias="nextLink")] pub next_link: String, - /// The total number of results for the query, regardless of the number of results in the response. + /// The total number of results for the query, regardless of the number of results in the response. #[serde(alias="totalResults")] pub total_results: i32, } @@ -2214,44 +2223,44 @@ impl ResponseResult for ProfileFilterLinks {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Filter { - /// Resource type for Analytics filter. + /// Resource type for Analytics filter. pub kind: Option, - /// Name of this filter. + /// Name of this filter. pub name: Option, - /// Time this filter was created. + /// Time this filter was created. pub created: Option, - /// Time this filter was last modified. + /// Time this filter was last modified. pub updated: Option, - /// Details for the filter of the type ADVANCED. + /// Details for the filter of the type ADVANCED. #[serde(alias="advancedDetails")] pub advanced_details: Option, - /// Details for the filter of the type LOWER. + /// Details for the filter of the type LOWER. #[serde(alias="lowercaseDetails")] pub lowercase_details: Option, - /// Parent link for this filter. Points to the account to which this filter belongs. + /// Parent link for this filter. Points to the account to which this filter belongs. #[serde(alias="parentLink")] pub parent_link: Option, - /// Details for the filter of the type EXCLUDE. + /// Details for the filter of the type EXCLUDE. #[serde(alias="excludeDetails")] pub exclude_details: Option, - /// Details for the filter of the type INCLUDE. + /// Details for the filter of the type INCLUDE. #[serde(alias="includeDetails")] pub include_details: Option, - /// Details for the filter of the type UPPER. + /// Details for the filter of the type UPPER. #[serde(alias="uppercaseDetails")] pub uppercase_details: Option, - /// Account ID to which this filter belongs. + /// Account ID to which this filter belongs. #[serde(alias="accountId")] pub account_id: Option, - /// Type of this filter. Possible values are INCLUDE, EXCLUDE, LOWERCASE, UPPERCASE, SEARCH_AND_REPLACE and ADVANCED. + /// Type of this filter. Possible values are INCLUDE, EXCLUDE, LOWERCASE, UPPERCASE, SEARCH_AND_REPLACE and ADVANCED. #[serde(alias="type")] pub type_: Option, - /// Filter ID. + /// Filter ID. pub id: Option, - /// Link for this filter. + /// Link for this filter. #[serde(alias="selfLink")] pub self_link: Option, - /// Details for the filter of the type SEARCH_AND_REPLACE. + /// Details for the filter of the type SEARCH_AND_REPLACE. #[serde(alias="searchAndReplaceDetails")] pub search_and_replace_details: Option, } @@ -2274,22 +2283,22 @@ impl ResponseResult for Filter {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EntityAdWordsLink { - /// Resource type for entity AdWords link. + /// Resource type for entity AdWords link. pub kind: Option, - /// Name of the link. This field is required when creating an AdWords link. + /// Name of the link. This field is required when creating an AdWords link. pub name: Option, - /// A list of AdWords client accounts. These cannot be MCC accounts. This field is required when creating an AdWords link. It cannot be empty. + /// A list of AdWords client accounts. These cannot be MCC accounts. This field is required when creating an AdWords link. It cannot be empty. #[serde(alias="adWordsAccounts")] pub ad_words_accounts: Option>, - /// IDs of linked Views (Profiles) represented as strings. + /// IDs of linked Views (Profiles) represented as strings. #[serde(alias="profileIds")] pub profile_ids: Option>, - /// Entity AdWords link ID + /// Entity AdWords link ID pub id: Option, - /// URL link for this Google Analytics - Google AdWords link. + /// URL link for this Google Analytics - Google AdWords link. #[serde(alias="selfLink")] pub self_link: Option, - /// Web property being linked. + /// Web property being linked. pub entity: Option, } @@ -2308,23 +2317,23 @@ impl ResponseResult for EntityAdWordsLink {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Uploads { - /// Collection type. + /// Collection type. pub kind: String, - /// The total number of results for the query, regardless of the number of resources in the result. + /// The total number of results for the query, regardless of the number of resources in the result. #[serde(alias="totalResults")] pub total_results: i32, - /// A list of uploads. + /// A list of uploads. pub items: Vec, - /// Link to previous page for this upload collection. + /// Link to previous page for this upload collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Link to next page for this upload collection. + /// Link to next page for this upload collection. #[serde(alias="nextLink")] pub next_link: String, } @@ -2338,7 +2347,7 @@ impl ResponseResult for Uploads {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FilterLowercaseDetails { - /// Field to use in the filter. + /// Field to use in the filter. pub field: String, } @@ -2352,18 +2361,18 @@ impl Part for FilterLowercaseDetails {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GoalEventDetailsEventConditions { - /// Expression used for this match. + /// Expression used for this match. pub expression: String, - /// Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT. + /// Type of the match to be performed. Possible values are REGEXP, BEGINS_WITH, or EXACT. #[serde(alias="matchType")] pub match_type: String, - /// Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE. + /// Type of this event condition. Possible values are CATEGORY, ACTION, LABEL, or VALUE. #[serde(alias="type")] pub type_: String, - /// Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL. + /// Type of comparison. Possible values are LESS_THAN, GREATER_THAN or EQUAL. #[serde(alias="comparisonType")] pub comparison_type: String, - /// Value used for this comparison. + /// Value used for this comparison. #[serde(alias="comparisonValue")] pub comparison_value: String, } @@ -2378,11 +2387,11 @@ impl Part for GoalEventDetailsEventConditions {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GoalUrlDestinationDetailsSteps { - /// URL for this step. + /// URL for this step. pub url: String, - /// Step name. + /// Step name. pub name: String, - /// Step number. + /// Step number. pub number: i32, } @@ -2396,9 +2405,9 @@ impl Part for GoalUrlDestinationDetailsSteps {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomMetricParentLink { - /// Link to the property to which the custom metric belongs. + /// Link to the property to which the custom metric belongs. pub href: String, - /// Type of the parent link. Set to "analytics#webproperty". + /// Type of the parent link. Set to "analytics#webproperty". #[serde(alias="type")] pub type_: String, } @@ -2413,13 +2422,13 @@ impl Part for CustomMetricParentLink {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct McfDataColumnHeaders { - /// Data type. Dimension and metric values data types such as INTEGER, DOUBLE, CURRENCY, MCF_SEQUENCE etc. + /// Data type. Dimension and metric values data types such as INTEGER, DOUBLE, CURRENCY, MCF_SEQUENCE etc. #[serde(alias="dataType")] pub data_type: String, - /// Column Type. Either DIMENSION or METRIC. + /// Column Type. Either DIMENSION or METRIC. #[serde(alias="columnType")] pub column_type: String, - /// Column name. + /// Column name. pub name: String, } @@ -2433,9 +2442,9 @@ impl Part for McfDataColumnHeaders {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GoalParentLink { - /// Link to the view (profile) to which this goal belongs. + /// Link to the view (profile) to which this goal belongs. pub href: String, - /// Value is "analytics#profile". + /// Value is "analytics#profile". #[serde(alias="type")] pub type_: String, } @@ -2455,23 +2464,23 @@ impl Part for GoalParentLink {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct EntityAdWordsLinks { - /// Collection type. + /// Collection type. pub kind: String, - /// The total number of results for the query, regardless of the number of results in the response. + /// The total number of results for the query, regardless of the number of results in the response. #[serde(alias="totalResults")] pub total_results: i32, - /// A list of entity AdWords links. + /// A list of entity AdWords links. pub items: Vec, - /// Previous link for this AdWords link collection. + /// Previous link for this AdWords link collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The maximum number of entries the response can contain, regardless of the actual number of entries returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of entries the response can contain, regardless of the actual number of entries returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// The starting index of the entries, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the entries, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Next link for this AdWords link collection. + /// Next link for this AdWords link collection. #[serde(alias="nextLink")] pub next_link: String, } @@ -2485,13 +2494,13 @@ impl ResponseResult for EntityAdWordsLinks {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EntityUserLinkEntity { - /// Account for this link. + /// Account for this link. #[serde(alias="accountRef")] pub account_ref: AccountRef, - /// View (Profile) for this link. + /// View (Profile) for this link. #[serde(alias="profileRef")] pub profile_ref: ProfileRef, - /// Web property for this link. + /// Web property for this link. #[serde(alias="webPropertyRef")] pub web_property_ref: WebPropertyRef, } @@ -2506,13 +2515,13 @@ impl Part for EntityUserLinkEntity {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountRef { - /// Analytics account reference. + /// Analytics account reference. pub kind: String, - /// Link for this account. + /// Link for this account. pub href: String, - /// Account ID. + /// Account ID. pub id: String, - /// Account name. + /// Account name. pub name: String, } @@ -2532,23 +2541,23 @@ impl Part for AccountRef {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct EntityUserLinks { - /// Collection type. + /// Collection type. pub kind: String, - /// The total number of results for the query, regardless of the number of results in the response. + /// The total number of results for the query, regardless of the number of results in the response. #[serde(alias="totalResults")] pub total_results: i32, - /// A list of entity user links. + /// A list of entity user links. pub items: Vec, - /// Previous link for this account collection. + /// Previous link for this account collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The maximum number of entries the response can contain, regardless of the actual number of entries returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of entries the response can contain, regardless of the actual number of entries returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// The starting index of the entries, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the entries, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Next link for this account collection. + /// Next link for this account collection. #[serde(alias="nextLink")] pub next_link: String, } @@ -2567,25 +2576,25 @@ impl ResponseResult for EntityUserLinks {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Segments { - /// Email ID of the authenticated user + /// Email ID of the authenticated user pub username: String, - /// Collection type for segments. + /// Collection type for segments. pub kind: String, - /// A list of segments. + /// A list of segments. pub items: Vec, - /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Link to previous page for this segment collection. + /// Link to previous page for this segment collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Link to next page for this segment collection. + /// Link to next page for this segment collection. #[serde(alias="nextLink")] pub next_link: String, - /// The total number of results for the query, regardless of the number of results in the response. + /// The total number of results for the query, regardless of the number of results in the response. #[serde(alias="totalResults")] pub total_results: i32, } @@ -2599,9 +2608,9 @@ impl ResponseResult for Segments {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountChildLink { - /// Link to the list of web properties for this account. + /// Link to the list of web properties for this account. pub href: String, - /// Type of the child link. Its value is "analytics#webproperties". + /// Type of the child link. Its value is "analytics#webproperties". #[serde(alias="type")] pub type_: String, } @@ -2616,7 +2625,7 @@ impl Part for AccountChildLink {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FilterUppercaseDetails { - /// Field to use in the filter. + /// Field to use in the filter. pub field: String, } @@ -2630,10 +2639,10 @@ impl Part for FilterUppercaseDetails {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct McfDataRows { - /// A primitive dimension value. A primitive metric value. + /// A primitive dimension value. A primitive metric value. #[serde(alias="primitiveValue")] pub primitive_value: String, - /// A conversion path dimension value, containing a list of interactions with their attributes. + /// A conversion path dimension value, containing a list of interactions with their attributes. #[serde(alias="conversionPathValue")] pub conversion_path_value: Vec, } @@ -2648,14 +2657,14 @@ impl Part for McfDataRows {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ProfileSummary { - /// Resource type for Analytics ProfileSummary. + /// Resource type for Analytics ProfileSummary. pub kind: String, - /// View (Profile) type. Supported types: WEB or APP. + /// View (Profile) type. Supported types: WEB or APP. #[serde(alias="type")] pub type_: String, - /// View (profile) ID. + /// View (profile) ID. pub id: String, - /// View (profile) name. + /// View (profile) name. pub name: String, } @@ -2676,32 +2685,32 @@ impl Part for ProfileSummary {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomDimension { - /// Index of the custom dimension. + /// Index of the custom dimension. pub index: Option, - /// Kind value for a custom dimension. Set to "analytics#customDimension". It is a read-only field. + /// Kind value for a custom dimension. Set to "analytics#customDimension". It is a read-only field. pub kind: Option, - /// Name of the custom dimension. + /// Name of the custom dimension. pub name: Option, - /// Time the custom dimension was created. + /// Time the custom dimension was created. pub created: Option, - /// Time the custom dimension was last modified. + /// Time the custom dimension was last modified. pub updated: Option, - /// Property ID. + /// Property ID. #[serde(alias="webPropertyId")] pub web_property_id: Option, - /// Boolean indicating whether the custom dimension is active. + /// Boolean indicating whether the custom dimension is active. pub active: Option, - /// Scope of the custom dimension: HIT, SESSION, USER or PRODUCT. + /// Scope of the custom dimension: HIT, SESSION, USER or PRODUCT. pub scope: Option, - /// Parent link for the custom dimension. Points to the property to which the custom dimension belongs. + /// Parent link for the custom dimension. Points to the property to which the custom dimension belongs. #[serde(alias="parentLink")] pub parent_link: Option, - /// Custom dimension ID. + /// Custom dimension ID. pub id: Option, - /// Link for the custom dimension + /// Link for the custom dimension #[serde(alias="selfLink")] pub self_link: Option, - /// Account ID. + /// Account ID. #[serde(alias="accountId")] pub account_id: Option, } @@ -2716,7 +2725,7 @@ impl ResponseResult for CustomDimension {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProfilePermissions { - /// All the permissions that the user has for this view (profile). These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent web property. + /// All the permissions that the user has for this view (profile). These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent web property. pub effective: Vec, } @@ -2730,15 +2739,15 @@ impl Part for ProfilePermissions {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ExperimentVariations { - /// Status of the variation. Possible values: "ACTIVE", "INACTIVE". INACTIVE variations are not served. This field may not be changed for an experiment whose status is ENDED. + /// Status of the variation. Possible values: "ACTIVE", "INACTIVE". INACTIVE variations are not served. This field may not be changed for an experiment whose status is ENDED. pub status: String, - /// The URL of the variation. This field may not be changed for an experiment whose status is RUNNING or ENDED. + /// The URL of the variation. This field may not be changed for an experiment whose status is RUNNING or ENDED. pub url: String, - /// True if the experiment has ended and this variation performed (statistically) significantly better than the original. This field is read-only. + /// True if the experiment has ended and this variation performed (statistically) significantly better than the original. This field is read-only. pub won: bool, - /// The name of the variation. This field is required when creating an experiment. This field may not be changed for an experiment whose status is ENDED. + /// The name of the variation. This field is required when creating an experiment. This field may not be changed for an experiment whose status is ENDED. pub name: String, - /// Weight that this variation should receive. Only present if the experiment is running. This field is read-only. + /// Weight that this variation should receive. Only present if the experiment is running. This field is read-only. pub weight: f64, } @@ -2752,26 +2761,26 @@ impl Part for ExperimentVariations {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Segment { - /// Segment definition. + /// Segment definition. pub definition: String, - /// Resource type for Analytics segment. + /// Resource type for Analytics segment. pub kind: String, - /// Segment ID. Can be used with the 'segment' parameter in Core Reporting API. + /// Segment ID. Can be used with the 'segment' parameter in Core Reporting API. #[serde(alias="segmentId")] pub segment_id: String, - /// Time the segment was created. + /// Time the segment was created. pub created: String, - /// Time the segment was last modified. + /// Time the segment was last modified. pub updated: String, - /// Type for a segment. Possible values are "BUILT_IN" or "CUSTOM". + /// Type for a segment. Possible values are "BUILT_IN" or "CUSTOM". #[serde(alias="type")] pub type_: String, - /// Segment ID. + /// Segment ID. pub id: String, - /// Link for this segment. + /// Link for this segment. #[serde(alias="selfLink")] pub self_link: String, - /// Segment name. + /// Segment name. pub name: String, } @@ -2784,32 +2793,32 @@ impl Part for Segment {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct McfDataQuery { - /// Maximum results per page. + /// Maximum results per page. #[serde(alias="max-results")] pub max_results: i32, - /// List of dimensions or metrics based on which Analytics data is sorted. + /// List of dimensions or metrics based on which Analytics data is sorted. pub sort: Vec, - /// List of analytics dimensions. + /// List of analytics dimensions. pub dimensions: String, - /// Start date. + /// Start date. #[serde(alias="start-date")] pub start_date: String, - /// Start index. + /// Start index. #[serde(alias="start-index")] pub start_index: i32, - /// End date. + /// End date. #[serde(alias="end-date")] pub end_date: String, - /// Unique table ID. + /// Unique table ID. pub ids: String, - /// List of analytics metrics. + /// List of analytics metrics. pub metrics: Vec, - /// Desired sampling level + /// Desired sampling level #[serde(alias="samplingLevel")] pub sampling_level: String, - /// Comma-separated list of dimension or metric filters. + /// Comma-separated list of dimension or metric filters. pub filters: String, - /// Analytics advanced segment. + /// Analytics advanced segment. pub segment: String, } @@ -2831,69 +2840,69 @@ impl Part for McfDataQuery {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Profile { - /// Time this view (profile) was last modified. + /// Time this view (profile) was last modified. pub updated: Option, - /// The query parameters that are excluded from this view (profile). + /// The query parameters that are excluded from this view (profile). #[serde(alias="excludeQueryParameters")] pub exclude_query_parameters: Option, /// The currency type associated with this view (profile). The supported values are: /// ARS, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, INR, JPY, KRW, LTL, MXN, NOK, NZD, PHP, PLN, RUB, SEK, THB, TRY, TWD, USD, VND, ZAR pub currency: Option, - /// Internal ID for the web property to which this view (profile) belongs. + /// Internal ID for the web property to which this view (profile) belongs. #[serde(alias="internalWebPropertyId")] pub internal_web_property_id: Option, - /// Child link for this view (profile). Points to the list of goals for this view (profile). + /// Child link for this view (profile). Points to the list of goals for this view (profile). #[serde(alias="childLink")] pub child_link: Option, - /// Indicates whether enhanced ecommerce tracking is enabled for this view (profile). This property can only be enabled if ecommerce tracking is enabled. + /// Indicates whether enhanced ecommerce tracking is enabled for this view (profile). This property can only be enabled if ecommerce tracking is enabled. #[serde(alias="enhancedECommerceTracking")] pub enhanced_e_commerce_tracking: Option, - /// Indicates whether ecommerce tracking is enabled for this view (profile). + /// Indicates whether ecommerce tracking is enabled for this view (profile). #[serde(alias="eCommerceTracking")] pub e_commerce_tracking: Option, - /// Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs. + /// Web property ID of the form UA-XXXXX-YY to which this view (profile) belongs. #[serde(alias="webPropertyId")] pub web_property_id: Option, - /// Time zone for which this view (profile) has been configured. Time zones are identified by strings from the TZ database. + /// Time zone for which this view (profile) has been configured. Time zones are identified by strings from the TZ database. pub timezone: Option, - /// View (Profile) ID. + /// View (Profile) ID. pub id: Option, - /// Account ID to which this view (profile) belongs. + /// Account ID to which this view (profile) belongs. #[serde(alias="accountId")] pub account_id: Option, - /// Default page for this view (profile). + /// Default page for this view (profile). #[serde(alias="defaultPage")] pub default_page: Option, - /// Resource type for Analytics view (profile). + /// Resource type for Analytics view (profile). pub kind: Option, - /// Whether or not Analytics will strip search query parameters from the URLs in your reports. + /// Whether or not Analytics will strip search query parameters from the URLs in your reports. #[serde(alias="stripSiteSearchQueryParameters")] pub strip_site_search_query_parameters: Option, - /// Name of this view (profile). + /// Name of this view (profile). pub name: Option, - /// Time this view (profile) was created. + /// Time this view (profile) was created. pub created: Option, - /// The site search query parameters for this view (profile). + /// The site search query parameters for this view (profile). #[serde(alias="siteSearchQueryParameters")] pub site_search_query_parameters: Option, - /// Website URL for this view (profile). + /// Website URL for this view (profile). #[serde(alias="websiteUrl")] pub website_url: Option, - /// Whether or not Analytics will strip search category parameters from the URLs in your reports. + /// Whether or not Analytics will strip search category parameters from the URLs in your reports. #[serde(alias="stripSiteSearchCategoryParameters")] pub strip_site_search_category_parameters: Option, - /// Site search category parameters for this view (profile). + /// Site search category parameters for this view (profile). #[serde(alias="siteSearchCategoryParameters")] pub site_search_category_parameters: Option, - /// Parent link for this view (profile). Points to the web property to which this view (profile) belongs. + /// Parent link for this view (profile). Points to the web property to which this view (profile) belongs. #[serde(alias="parentLink")] pub parent_link: Option, - /// Permissions the user has for this view (profile). + /// Permissions the user has for this view (profile). pub permissions: Option, - /// View (Profile) type. Supported types: WEB or APP. + /// View (Profile) type. Supported types: WEB or APP. #[serde(alias="type")] pub type_: Option, - /// Link for this view (profile). + /// Link for this view (profile). #[serde(alias="selfLink")] pub self_link: Option, } @@ -2908,13 +2917,13 @@ impl ResponseResult for Profile {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct GaDataColumnHeaders { - /// Data type. Dimension column headers have only STRING as the data type. Metric column headers have data types for metric values such as INTEGER, DOUBLE, CURRENCY etc. + /// Data type. Dimension column headers have only STRING as the data type. Metric column headers have data types for metric values such as INTEGER, DOUBLE, CURRENCY etc. #[serde(alias="dataType")] pub data_type: String, - /// Column Type. Either DIMENSION or METRIC. + /// Column Type. Either DIMENSION or METRIC. #[serde(alias="columnType")] pub column_type: String, - /// Column name. + /// Column name. pub name: String, } @@ -2928,12 +2937,12 @@ impl Part for GaDataColumnHeaders {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct GaDataDataTableCols { - /// no description provided + /// no description provided #[serde(alias="type")] pub type_: String, - /// no description provided + /// no description provided pub id: String, - /// no description provided + /// no description provided pub label: String, } @@ -2947,10 +2956,10 @@ impl Part for GaDataDataTableCols {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GoalVisitNumPagesDetails { - /// Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL. + /// Type of comparison. Possible values are LESS_THAN, GREATER_THAN, or EQUAL. #[serde(alias="comparisonType")] pub comparison_type: String, - /// Value used for this comparison. + /// Value used for this comparison. #[serde(alias="comparisonValue")] pub comparison_value: String, } @@ -2965,9 +2974,9 @@ impl Part for GoalVisitNumPagesDetails {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomDataSourceChildLink { - /// Link to the list of daily uploads for this custom data source. Link to the list of uploads for this custom data source. + /// Link to the list of daily uploads for this custom data source. Link to the list of uploads for this custom data source. pub href: String, - /// Value is "analytics#dailyUploads". Value is "analytics#uploads". + /// Value is "analytics#dailyUploads". Value is "analytics#uploads". #[serde(alias="type")] pub type_: String, } @@ -2987,25 +2996,25 @@ impl Part for CustomDataSourceChildLink {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UnsampledReports { - /// Email ID of the authenticated user + /// Email ID of the authenticated user pub username: String, - /// Collection type. + /// Collection type. pub kind: String, - /// A list of unsampled reports. + /// A list of unsampled reports. pub items: Vec, - /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Link to previous page for this unsampled report collection. + /// Link to previous page for this unsampled report collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Link to next page for this unsampled report collection. + /// Link to next page for this unsampled report collection. #[serde(alias="nextLink")] pub next_link: String, - /// The total number of results for the query, regardless of the number of resources in the result. + /// The total number of results for the query, regardless of the number of resources in the result. #[serde(alias="totalResults")] pub total_results: i32, } @@ -3019,13 +3028,13 @@ impl ResponseResult for UnsampledReports {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct RealtimeDataColumnHeaders { - /// Data type. Dimension column headers have only STRING as the data type. Metric column headers have data types for metric values such as INTEGER, DOUBLE, CURRENCY etc. + /// Data type. Dimension column headers have only STRING as the data type. Metric column headers have data types for metric values such as INTEGER, DOUBLE, CURRENCY etc. #[serde(alias="dataType")] pub data_type: String, - /// Column Type. Either DIMENSION or METRIC. + /// Column Type. Either DIMENSION or METRIC. #[serde(alias="columnType")] pub column_type: String, - /// Column name. + /// Column name. pub name: String, } @@ -3039,7 +3048,7 @@ impl Part for RealtimeDataColumnHeaders {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EntityAdWordsLinkEntity { - /// no description provided + /// no description provided #[serde(alias="webPropertyRef")] pub web_property_ref: WebPropertyRef, } @@ -3054,9 +3063,9 @@ impl Part for EntityAdWordsLinkEntity {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomDataSourceParentLink { - /// Link to the web property to which this custom data source belongs. + /// Link to the web property to which this custom data source belongs. pub href: String, - /// Value is "analytics#webproperty". + /// Value is "analytics#webproperty". #[serde(alias="type")] pub type_: String, } @@ -3071,44 +3080,44 @@ impl Part for CustomDataSourceParentLink {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomDataSource { - /// Resource type for Analytics custom data source. + /// Resource type for Analytics custom data source. pub kind: String, - /// Description of custom data source. + /// Description of custom data source. pub description: String, - /// IDs of views (profiles) linked to the custom data source. + /// IDs of views (profiles) linked to the custom data source. #[serde(alias="profilesLinked")] pub profiles_linked: Vec, - /// no description provided + /// no description provided #[serde(alias="uploadType")] pub upload_type: String, - /// Time this custom data source was created. + /// Time this custom data source was created. pub created: String, - /// Time this custom data source was last modified. + /// Time this custom data source was last modified. pub updated: String, - /// Account ID to which this custom data source belongs. + /// Account ID to which this custom data source belongs. #[serde(alias="accountId")] pub account_id: String, - /// no description provided + /// no description provided #[serde(alias="childLink")] pub child_link: CustomDataSourceChildLink, - /// Web property ID of the form UA-XXXXX-YY to which this custom data source belongs. + /// Web property ID of the form UA-XXXXX-YY to which this custom data source belongs. #[serde(alias="webPropertyId")] pub web_property_id: String, - /// Parent link for this custom data source. Points to the web property to which this custom data source belongs. + /// Parent link for this custom data source. Points to the web property to which this custom data source belongs. #[serde(alias="parentLink")] pub parent_link: CustomDataSourceParentLink, - /// no description provided + /// no description provided #[serde(alias="importBehavior")] pub import_behavior: String, - /// Type of the custom data source. + /// Type of the custom data source. #[serde(alias="type")] pub type_: String, - /// Custom data source ID. + /// Custom data source ID. pub id: String, - /// Link for this Analytics custom data source. + /// Link for this Analytics custom data source. #[serde(alias="selfLink")] pub self_link: String, - /// Name of this custom data source. + /// Name of this custom data source. pub name: String, } @@ -3121,9 +3130,9 @@ impl Part for CustomDataSource {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomDimensionParentLink { - /// Link to the property to which the custom dimension belongs. + /// Link to the property to which the custom dimension belongs. pub href: String, - /// Type of the parent link. Set to "analytics#webproperty". + /// Type of the parent link. Set to "analytics#webproperty". #[serde(alias="type")] pub type_: String, } @@ -3143,25 +3152,25 @@ impl Part for CustomDimensionParentLink {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Experiments { - /// Email ID of the authenticated user + /// Email ID of the authenticated user pub username: String, - /// Collection type. + /// Collection type. pub kind: String, - /// A list of experiments. + /// A list of experiments. pub items: Vec, - /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Link to previous page for this experiment collection. + /// Link to previous page for this experiment collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Link to next page for this experiment collection. + /// Link to next page for this experiment collection. #[serde(alias="nextLink")] pub next_link: String, - /// The total number of results for the query, regardless of the number of resources in the result. + /// The total number of results for the query, regardless of the number of resources in the result. #[serde(alias="totalResults")] pub total_results: i32, } @@ -3180,25 +3189,25 @@ impl ResponseResult for Experiments {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Filters { - /// Email ID of the authenticated user + /// Email ID of the authenticated user pub username: String, - /// Collection type. + /// Collection type. pub kind: String, - /// A list of filters. + /// A list of filters. pub items: Vec, - /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1,000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. + /// The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1,000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. #[serde(alias="itemsPerPage")] pub items_per_page: i32, - /// Link to previous page for this filter collection. + /// Link to previous page for this filter collection. #[serde(alias="previousLink")] pub previous_link: String, - /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. + /// The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. #[serde(alias="startIndex")] pub start_index: i32, - /// Link to next page for this filter collection. + /// Link to next page for this filter collection. #[serde(alias="nextLink")] pub next_link: String, - /// The total number of results for the query, regardless of the number of results in the response. + /// The total number of results for the query, regardless of the number of results in the response. #[serde(alias="totalResults")] pub total_results: i32, } @@ -3212,9 +3221,9 @@ impl ResponseResult for Filters {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProfileChildLink { - /// Link to the list of goals for this view (profile). + /// Link to the list of goals for this view (profile). pub href: String, - /// Value is "analytics#goals". + /// Value is "analytics#goals". #[serde(alias="type")] pub type_: String, } @@ -3262,13 +3271,18 @@ pub struct ManagementMethods<'a, C, NC, A> hub: &'a Analytics, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ManagementMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ManagementMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Create a new property if the account has fewer than 20 properties. Web properties are visible in the Google Analytics interface only if they have at least one profile. + /// Create a new property if the account has fewer than 20 properties. Web properties are visible in the Google Analytics interface only if they have at least one profile. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to create the web property for. pub fn webproperties_insert(&self, request: &Webproperty, account_id: &str) -> ManagementWebpropertyInsertCall<'a, C, NC, A> { ManagementWebpropertyInsertCall { hub: self.hub, @@ -3282,7 +3296,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets a view (profile) to which the user has access. + /// Gets a view (profile) to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to retrieve the goal for. + /// * `webPropertyId` - Web property ID to retrieve the goal for. + /// * `profileId` - View (Profile) ID to retrieve the goal for. pub fn profiles_get(&self, account_id: &str, web_property_id: &str, profile_id: &str) -> ManagementProfileGetCall<'a, C, NC, A> { ManagementProfileGetCall { hub: self.hub, @@ -3297,7 +3317,7 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all accounts to which the user has access. + /// Lists all accounts to which the user has access. pub fn accounts_list(&self) -> ManagementAccountListCall<'a, C, NC, A> { ManagementAccountListCall { hub: self.hub, @@ -3311,7 +3331,15 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update an existing profile filter link. This method supports patch semantics. + /// Update an existing profile filter link. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to which profile filter link belongs. + /// * `webPropertyId` - Web property Id to which profile filter link belongs + /// * `profileId` - Profile ID to which filter link belongs + /// * `linkId` - ID of the profile filter link to be updated. pub fn profile_filter_links_patch(&self, request: &ProfileFilterLink, account_id: &str, web_property_id: &str, profile_id: &str, link_id: &str) -> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> { ManagementProfileFilterLinkPatchCall { hub: self.hub, @@ -3328,7 +3356,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Removes a user from the given web property. + /// Removes a user from the given web property. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to delete the user link for. + /// * `webPropertyId` - Web Property ID to delete the user link for. + /// * `linkId` - Link ID to delete the user link for. pub fn webproperty_user_links_delete(&self, account_id: &str, web_property_id: &str, link_id: &str) -> ManagementWebpropertyUserLinkDeleteCall<'a, C, NC, A> { ManagementWebpropertyUserLinkDeleteCall { hub: self.hub, @@ -3343,7 +3377,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Removes a user from the given view (profile). + /// Removes a user from the given view (profile). + /// + /// # Arguments + /// + /// * `accountId` - Account ID to delete the user link for. + /// * `webPropertyId` - Web Property ID to delete the user link for. + /// * `profileId` - View (Profile) ID to delete the user link for. + /// * `linkId` - Link ID to delete the user link for. pub fn profile_user_links_delete(&self, account_id: &str, web_property_id: &str, profile_id: &str, link_id: &str) -> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> { ManagementProfileUserLinkDeleteCall { hub: self.hub, @@ -3359,7 +3400,15 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates permissions for an existing user on the given view (profile). + /// Updates permissions for an existing user on the given view (profile). + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to update the user link for. + /// * `webPropertyId` - Web Property ID to update the user link for. + /// * `profileId` - View (Profile ID) to update the user link for. + /// * `linkId` - Link ID to update the user link for. pub fn profile_user_links_update(&self, request: &EntityUserLink, account_id: &str, web_property_id: &str, profile_id: &str, link_id: &str) -> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> { ManagementProfileUserLinkUpdateCall { hub: self.hub, @@ -3376,7 +3425,12 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Create a new filter. + /// Create a new filter. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to create filter for. pub fn filters_insert(&self, request: &Filter, account_id: &str) -> ManagementFilterInsertCall<'a, C, NC, A> { ManagementFilterInsertCall { hub: self.hub, @@ -3390,7 +3444,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates permissions for an existing user on the given account. + /// Updates permissions for an existing user on the given account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to update the account-user link for. + /// * `linkId` - Link ID to update the account-user link for. pub fn account_user_links_update(&self, request: &EntityUserLink, account_id: &str, link_id: &str) -> ManagementAccountUserLinkUpdateCall<'a, C, NC, A> { ManagementAccountUserLinkUpdateCall { hub: self.hub, @@ -3405,7 +3465,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing web property. + /// Updates an existing web property. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to which the web property belongs + /// * `webPropertyId` - Web property ID pub fn webproperties_update(&self, request: &Webproperty, account_id: &str, web_property_id: &str) -> ManagementWebpropertyUpdateCall<'a, C, NC, A> { ManagementWebpropertyUpdateCall { hub: self.hub, @@ -3420,7 +3486,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates permissions for an existing user on the given web property. + /// Updates permissions for an existing user on the given web property. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to update the account-user link for. + /// * `webPropertyId` - Web property ID to update the account-user link for. + /// * `linkId` - Link ID to update the account-user link for. pub fn webproperty_user_links_update(&self, request: &EntityUserLink, account_id: &str, web_property_id: &str, link_id: &str) -> ManagementWebpropertyUserLinkUpdateCall<'a, C, NC, A> { ManagementWebpropertyUserLinkUpdateCall { hub: self.hub, @@ -3436,7 +3509,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Create a new unsampled report. + /// Create a new unsampled report. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to create the unsampled report for. + /// * `webPropertyId` - Web property ID to create the unsampled report for. + /// * `profileId` - View (Profile) ID to create the unsampled report for. pub fn unsampled_reports_insert(&self, request: &UnsampledReport, account_id: &str, web_property_id: &str, profile_id: &str) -> ManagementUnsampledReportInsertCall<'a, C, NC, A> { ManagementUnsampledReportInsertCall { hub: self.hub, @@ -3452,7 +3532,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get a custom metric to which the user has access. + /// Get a custom metric to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account ID for the custom metric to retrieve. + /// * `webPropertyId` - Web property ID for the custom metric to retrieve. + /// * `customMetricId` - The ID of the custom metric to retrieve. pub fn custom_metrics_get(&self, account_id: &str, web_property_id: &str, custom_metric_id: &str) -> ManagementCustomMetricGetCall<'a, C, NC, A> { ManagementCustomMetricGetCall { hub: self.hub, @@ -3467,7 +3553,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List uploads to which the user has access. + /// List uploads to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account Id for the upload to retrieve. + /// * `webPropertyId` - Web property Id for the upload to retrieve. + /// * `customDataSourceId` - Custom data source Id for upload to retrieve. + /// * `uploadId` - Upload Id to retrieve. pub fn uploads_get(&self, account_id: &str, web_property_id: &str, custom_data_source_id: &str, upload_id: &str) -> ManagementUploadGetCall<'a, C, NC, A> { ManagementUploadGetCall { hub: self.hub, @@ -3483,7 +3576,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns a web property-AdWords link to which the user has access. + /// Returns a web property-AdWords link to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - ID of the account which the given web property belongs to. + /// * `webPropertyId` - Web property ID to retrieve the AdWords link for. + /// * `webPropertyAdWordsLinkId` - Web property-AdWords link ID. pub fn web_property_ad_words_links_get(&self, account_id: &str, web_property_id: &str, web_property_ad_words_link_id: &str) -> ManagementWebPropertyAdWordsLinkGetCall<'a, C, NC, A> { ManagementWebPropertyAdWordsLinkGetCall { hub: self.hub, @@ -3498,7 +3597,12 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists webProperty-user links for a given web property. + /// Lists webProperty-user links for a given web property. + /// + /// # Arguments + /// + /// * `accountId` - Account ID which the given web property belongs to. + /// * `webPropertyId` - Web Property ID for the webProperty-user links to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. pub fn webproperty_user_links_list(&self, account_id: &str, web_property_id: &str) -> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> { ManagementWebpropertyUserLinkListCall { hub: self.hub, @@ -3514,7 +3618,15 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update an existing profile filter link. + /// Update an existing profile filter link. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to which profile filter link belongs. + /// * `webPropertyId` - Web property Id to which profile filter link belongs + /// * `profileId` - Profile ID to which filter link belongs + /// * `linkId` - ID of the profile filter link to be updated. pub fn profile_filter_links_update(&self, request: &ProfileFilterLink, account_id: &str, web_property_id: &str, profile_id: &str, link_id: &str) -> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> { ManagementProfileFilterLinkUpdateCall { hub: self.hub, @@ -3531,7 +3643,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns an experiment to which the user has access. + /// Returns an experiment to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to retrieve the experiment for. + /// * `webPropertyId` - Web property ID to retrieve the experiment for. + /// * `profileId` - View (Profile) ID to retrieve the experiment for. + /// * `experimentId` - Experiment ID to retrieve the experiment for. pub fn experiments_get(&self, account_id: &str, web_property_id: &str, profile_id: &str, experiment_id: &str) -> ManagementExperimentGetCall<'a, C, NC, A> { ManagementExperimentGetCall { hub: self.hub, @@ -3547,7 +3666,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing custom dimension. + /// Updates an existing custom dimension. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID for the custom dimension to update. + /// * `webPropertyId` - Web property ID for the custom dimension to update. + /// * `customDimensionId` - Custom dimension ID for the custom dimension to update. pub fn custom_dimensions_update(&self, request: &CustomDimension, account_id: &str, web_property_id: &str, custom_dimension_id: &str) -> ManagementCustomDimensionUpdateCall<'a, C, NC, A> { ManagementCustomDimensionUpdateCall { hub: self.hub, @@ -3564,7 +3690,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns a single unsampled report. + /// Returns a single unsampled report. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to retrieve unsampled report for. + /// * `webPropertyId` - Web property ID to retrieve unsampled reports for. + /// * `profileId` - View (Profile) ID to retrieve unsampled report for. + /// * `unsampledReportId` - ID of the unsampled report to retrieve. pub fn unsampled_reports_get(&self, account_id: &str, web_property_id: &str, profile_id: &str, unsampled_report_id: &str) -> ManagementUnsampledReportGetCall<'a, C, NC, A> { ManagementUnsampledReportGetCall { hub: self.hub, @@ -3580,7 +3713,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Create a new profile filter link. + /// Create a new profile filter link. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to create profile filter link for. + /// * `webPropertyId` - Web property Id to create profile filter link for. + /// * `profileId` - Profile ID to create filter link for. pub fn profile_filter_links_insert(&self, request: &ProfileFilterLink, account_id: &str, web_property_id: &str, profile_id: &str) -> ManagementProfileFilterLinkInsertCall<'a, C, NC, A> { ManagementProfileFilterLinkInsertCall { hub: self.hub, @@ -3596,7 +3736,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing filter. + /// Updates an existing filter. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to which the filter belongs. + /// * `filterId` - ID of the filter to be updated. pub fn filters_update(&self, request: &Filter, account_id: &str, filter_id: &str) -> ManagementFilterUpdateCall<'a, C, NC, A> { ManagementFilterUpdateCall { hub: self.hub, @@ -3611,7 +3757,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete a profile filter link. + /// Delete a profile filter link. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to which the profile filter link belongs. + /// * `webPropertyId` - Web property Id to which the profile filter link belongs. + /// * `profileId` - Profile ID to which the filter link belongs. + /// * `linkId` - ID of the profile filter link to delete. pub fn profile_filter_links_delete(&self, account_id: &str, web_property_id: &str, profile_id: &str, link_id: &str) -> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> { ManagementProfileFilterLinkDeleteCall { hub: self.hub, @@ -3627,7 +3780,7 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists segments to which the user has access. + /// Lists segments to which the user has access. pub fn segments_list(&self) -> ManagementSegmentListCall<'a, C, NC, A> { ManagementSegmentListCall { hub: self.hub, @@ -3641,7 +3794,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a view (profile). + /// Deletes a view (profile). + /// + /// # Arguments + /// + /// * `accountId` - Account ID to delete the view (profile) for. + /// * `webPropertyId` - Web property ID to delete the view (profile) for. + /// * `profileId` - ID of the view (profile) to be deleted. pub fn profiles_delete(&self, account_id: &str, web_property_id: &str, profile_id: &str) -> ManagementProfileDeleteCall<'a, C, NC, A> { ManagementProfileDeleteCall { hub: self.hub, @@ -3656,7 +3815,15 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing view (profile). This method supports patch semantics. + /// Updates an existing view (profile). This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to update the goal. + /// * `webPropertyId` - Web property ID to update the goal. + /// * `profileId` - View (Profile) ID to update the goal. + /// * `goalId` - Index of the goal to be updated. pub fn goals_patch(&self, request: &Goal, account_id: &str, web_property_id: &str, profile_id: &str, goal_id: &str) -> ManagementGoalPatchCall<'a, C, NC, A> { ManagementGoalPatchCall { hub: self.hub, @@ -3673,7 +3840,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing custom dimension. This method supports patch semantics. + /// Updates an existing custom dimension. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID for the custom dimension to update. + /// * `webPropertyId` - Web property ID for the custom dimension to update. + /// * `customDimensionId` - Custom dimension ID for the custom dimension to update. pub fn custom_dimensions_patch(&self, request: &CustomDimension, account_id: &str, web_property_id: &str, custom_dimension_id: &str) -> ManagementCustomDimensionPatchCall<'a, C, NC, A> { ManagementCustomDimensionPatchCall { hub: self.hub, @@ -3690,7 +3864,15 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update an existing experiment. This method supports patch semantics. + /// Update an existing experiment. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID of the experiment to update. + /// * `webPropertyId` - Web property ID of the experiment to update. + /// * `profileId` - View (Profile) ID of the experiment to update. + /// * `experimentId` - Experiment ID of the experiment to update. pub fn experiments_patch(&self, request: &Experiment, account_id: &str, web_property_id: &str, profile_id: &str, experiment_id: &str) -> ManagementExperimentPatchCall<'a, C, NC, A> { ManagementExperimentPatchCall { hub: self.hub, @@ -3707,7 +3889,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists experiments to which the user has access. + /// Lists experiments to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to retrieve experiments for. + /// * `webPropertyId` - Web property ID to retrieve experiments for. + /// * `profileId` - View (Profile) ID to retrieve experiments for. pub fn experiments_list(&self, account_id: &str, web_property_id: &str, profile_id: &str) -> ManagementExperimentListCall<'a, C, NC, A> { ManagementExperimentListCall { hub: self.hub, @@ -3724,7 +3912,12 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists views (profiles) to which the user has access. + /// Lists views (profiles) to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account ID for the view (profiles) to retrieve. Can either be a specific account ID or '~all', which refers to all the accounts to which the user has access. + /// * `webPropertyId` - Web property ID for the views (profiles) to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties to which the user has access. pub fn profiles_list(&self, account_id: &str, web_property_id: &str) -> ManagementProfileListCall<'a, C, NC, A> { ManagementProfileListCall { hub: self.hub, @@ -3740,7 +3933,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists goals to which the user has access. + /// Lists goals to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to retrieve goals for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to. + /// * `webPropertyId` - Web property ID to retrieve goals for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. + /// * `profileId` - View (Profile) ID to retrieve goals for. Can either be a specific view (profile) ID or '~all', which refers to all the views (profiles) that user has access to. pub fn goals_list(&self, account_id: &str, web_property_id: &str, profile_id: &str) -> ManagementGoalListCall<'a, C, NC, A> { ManagementGoalListCall { hub: self.hub, @@ -3757,7 +3956,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Create a new goal. + /// Create a new goal. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to create the goal for. + /// * `webPropertyId` - Web property ID to create the goal for. + /// * `profileId` - View (Profile) ID to create the goal for. pub fn goals_insert(&self, request: &Goal, account_id: &str, web_property_id: &str, profile_id: &str) -> ManagementGoalInsertCall<'a, C, NC, A> { ManagementGoalInsertCall { hub: self.hub, @@ -3773,7 +3979,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing custom metric. This method supports patch semantics. + /// Updates an existing custom metric. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID for the custom metric to update. + /// * `webPropertyId` - Web property ID for the custom metric to update. + /// * `customMetricId` - Custom metric ID for the custom metric to update. pub fn custom_metrics_patch(&self, request: &CustomMetric, account_id: &str, web_property_id: &str, custom_metric_id: &str) -> ManagementCustomMetricPatchCall<'a, C, NC, A> { ManagementCustomMetricPatchCall { hub: self.hub, @@ -3790,7 +4003,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Upload data for a custom data source. + /// Upload data for a custom data source. + /// + /// # Arguments + /// + /// * `accountId` - Account Id associated with the upload. + /// * `webPropertyId` - Web property UA-string associated with the upload. + /// * `customDataSourceId` - Custom data source Id to which the data being uploaded belongs. pub fn uploads_upload_data(&self, account_id: &str, web_property_id: &str, custom_data_source_id: &str) -> ManagementUploadUploadDataCall<'a, C, NC, A> { ManagementUploadUploadDataCall { hub: self.hub, @@ -3805,7 +4024,12 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Adds a new user to the given account. + /// Adds a new user to the given account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to create the user link for. pub fn account_user_links_insert(&self, request: &EntityUserLink, account_id: &str) -> ManagementAccountUserLinkInsertCall<'a, C, NC, A> { ManagementAccountUserLinkInsertCall { hub: self.hub, @@ -3819,7 +4043,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Adds a new user to the given web property. + /// Adds a new user to the given web property. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to create the user link for. + /// * `webPropertyId` - Web Property ID to create the user link for. pub fn webproperty_user_links_insert(&self, request: &EntityUserLink, account_id: &str, web_property_id: &str) -> ManagementWebpropertyUserLinkInsertCall<'a, C, NC, A> { ManagementWebpropertyUserLinkInsertCall { hub: self.hub, @@ -3834,7 +4064,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete an experiment. + /// Delete an experiment. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to which the experiment belongs + /// * `webPropertyId` - Web property ID to which the experiment belongs + /// * `profileId` - View (Profile) ID to which the experiment belongs + /// * `experimentId` - ID of the experiment to delete pub fn experiments_delete(&self, account_id: &str, web_property_id: &str, profile_id: &str, experiment_id: &str) -> ManagementExperimentDeleteCall<'a, C, NC, A> { ManagementExperimentDeleteCall { hub: self.hub, @@ -3850,7 +4087,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing view (profile). This method supports patch semantics. + /// Updates an existing view (profile). This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to which the view (profile) belongs + /// * `webPropertyId` - Web property ID to which the view (profile) belongs + /// * `profileId` - ID of the view (profile) to be updated. pub fn profiles_patch(&self, request: &Profile, account_id: &str, web_property_id: &str, profile_id: &str) -> ManagementProfilePatchCall<'a, C, NC, A> { ManagementProfilePatchCall { hub: self.hub, @@ -3866,7 +4110,12 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns a filters to which the user has access. + /// Returns a filters to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to retrieve filters for. + /// * `filterId` - Filter ID to retrieve filters for. pub fn filters_get(&self, account_id: &str, filter_id: &str) -> ManagementFilterGetCall<'a, C, NC, A> { ManagementFilterGetCall { hub: self.hub, @@ -3880,7 +4129,12 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists webProperty-AdWords links for a given web property. + /// Lists webProperty-AdWords links for a given web property. + /// + /// # Arguments + /// + /// * `accountId` - ID of the account which the given web property belongs to. + /// * `webPropertyId` - Web property ID to retrieve the AdWords links for. pub fn web_property_ad_words_links_list(&self, account_id: &str, web_property_id: &str) -> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> { ManagementWebPropertyAdWordsLinkListCall { hub: self.hub, @@ -3896,7 +4150,7 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access. + /// Lists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access. pub fn account_summaries_list(&self) -> ManagementAccountSummaryListCall<'a, C, NC, A> { ManagementAccountSummaryListCall { hub: self.hub, @@ -3910,7 +4164,12 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists custom dimensions to which the user has access. + /// Lists custom dimensions to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account ID for the custom dimensions to retrieve. + /// * `webPropertyId` - Web property ID for the custom dimensions to retrieve. pub fn custom_dimensions_list(&self, account_id: &str, web_property_id: &str) -> ManagementCustomDimensionListCall<'a, C, NC, A> { ManagementCustomDimensionListCall { hub: self.hub, @@ -3926,7 +4185,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List uploads to which the user has access. + /// List uploads to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account Id for the uploads to retrieve. + /// * `webPropertyId` - Web property Id for the uploads to retrieve. + /// * `customDataSourceId` - Custom data source Id for uploads to retrieve. pub fn uploads_list(&self, account_id: &str, web_property_id: &str, custom_data_source_id: &str) -> ManagementUploadListCall<'a, C, NC, A> { ManagementUploadListCall { hub: self.hub, @@ -3943,7 +4208,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists profile-user links for a given view (profile). + /// Lists profile-user links for a given view (profile). + /// + /// # Arguments + /// + /// * `accountId` - Account ID which the given view (profile) belongs to. + /// * `webPropertyId` - Web Property ID which the given view (profile) belongs to. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. + /// * `profileId` - View (Profile) ID to retrieve the profile-user links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to. pub fn profile_user_links_list(&self, account_id: &str, web_property_id: &str, profile_id: &str) -> ManagementProfileUserLinkListCall<'a, C, NC, A> { ManagementProfileUserLinkListCall { hub: self.hub, @@ -3960,7 +4231,11 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists account-user links for a given account. + /// Lists account-user links for a given account. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to retrieve the user links for. pub fn account_user_links_list(&self, account_id: &str) -> ManagementAccountUserLinkListCall<'a, C, NC, A> { ManagementAccountUserLinkListCall { hub: self.hub, @@ -3975,7 +4250,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing custom metric. + /// Updates an existing custom metric. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID for the custom metric to update. + /// * `webPropertyId` - Web property ID for the custom metric to update. + /// * `customMetricId` - Custom metric ID for the custom metric to update. pub fn custom_metrics_update(&self, request: &CustomMetric, account_id: &str, web_property_id: &str, custom_metric_id: &str) -> ManagementCustomMetricUpdateCall<'a, C, NC, A> { ManagementCustomMetricUpdateCall { hub: self.hub, @@ -3992,7 +4274,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete data associated with a previous upload. + /// Delete data associated with a previous upload. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account Id for the uploads to be deleted. + /// * `webPropertyId` - Web property Id for the uploads to be deleted. + /// * `customDataSourceId` - Custom data source Id for the uploads to be deleted. pub fn uploads_delete_upload_data(&self, request: &AnalyticsDataimportDeleteUploadDataRequest, account_id: &str, web_property_id: &str, custom_data_source_id: &str) -> ManagementUploadDeleteUploadDataCall<'a, C, NC, A> { ManagementUploadDeleteUploadDataCall { hub: self.hub, @@ -4008,7 +4297,15 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update an existing experiment. + /// Update an existing experiment. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID of the experiment to update. + /// * `webPropertyId` - Web property ID of the experiment to update. + /// * `profileId` - View (Profile) ID of the experiment to update. + /// * `experimentId` - Experiment ID of the experiment to update. pub fn experiments_update(&self, request: &Experiment, account_id: &str, web_property_id: &str, profile_id: &str, experiment_id: &str) -> ManagementExperimentUpdateCall<'a, C, NC, A> { ManagementExperimentUpdateCall { hub: self.hub, @@ -4025,7 +4322,15 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing view (profile). + /// Updates an existing view (profile). + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to update the goal. + /// * `webPropertyId` - Web property ID to update the goal. + /// * `profileId` - View (Profile) ID to update the goal. + /// * `goalId` - Index of the goal to be updated. pub fn goals_update(&self, request: &Goal, account_id: &str, web_property_id: &str, profile_id: &str, goal_id: &str) -> ManagementGoalUpdateCall<'a, C, NC, A> { ManagementGoalUpdateCall { hub: self.hub, @@ -4042,7 +4347,12 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List custom data sources to which the user has access. + /// List custom data sources to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account Id for the custom data sources to retrieve. + /// * `webPropertyId` - Web property Id for the custom data sources to retrieve. pub fn custom_data_sources_list(&self, account_id: &str, web_property_id: &str) -> ManagementCustomDataSourceListCall<'a, C, NC, A> { ManagementCustomDataSourceListCall { hub: self.hub, @@ -4058,7 +4368,12 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists custom metrics to which the user has access. + /// Lists custom metrics to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account ID for the custom metrics to retrieve. + /// * `webPropertyId` - Web property ID for the custom metrics to retrieve. pub fn custom_metrics_list(&self, account_id: &str, web_property_id: &str) -> ManagementCustomMetricListCall<'a, C, NC, A> { ManagementCustomMetricListCall { hub: self.hub, @@ -4074,7 +4389,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists unsampled reports to which the user has access. + /// Lists unsampled reports to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to retrieve unsampled reports for. Must be a specific account ID, ~all is not supported. + /// * `webPropertyId` - Web property ID to retrieve unsampled reports for. Must be a specific web property ID, ~all is not supported. + /// * `profileId` - View (Profile) ID to retrieve unsampled reports for. Must be a specific view (profile) ID, ~all is not supported. pub fn unsampled_reports_list(&self, account_id: &str, web_property_id: &str, profile_id: &str) -> ManagementUnsampledReportListCall<'a, C, NC, A> { ManagementUnsampledReportListCall { hub: self.hub, @@ -4091,7 +4412,12 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets a web property to which the user has access. + /// Gets a web property to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to retrieve the web property for. + /// * `webPropertyId` - ID to retrieve the web property for. pub fn webproperties_get(&self, account_id: &str, web_property_id: &str) -> ManagementWebpropertyGetCall<'a, C, NC, A> { ManagementWebpropertyGetCall { hub: self.hub, @@ -4105,7 +4431,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Create a new experiment. + /// Create a new experiment. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to create the experiment for. + /// * `webPropertyId` - Web property ID to create the experiment for. + /// * `profileId` - View (Profile) ID to create the experiment for. pub fn experiments_insert(&self, request: &Experiment, account_id: &str, web_property_id: &str, profile_id: &str) -> ManagementExperimentInsertCall<'a, C, NC, A> { ManagementExperimentInsertCall { hub: self.hub, @@ -4121,7 +4454,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get a custom dimension to which the user has access. + /// Get a custom dimension to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account ID for the custom dimension to retrieve. + /// * `webPropertyId` - Web property ID for the custom dimension to retrieve. + /// * `customDimensionId` - The ID of the custom dimension to retrieve. pub fn custom_dimensions_get(&self, account_id: &str, web_property_id: &str, custom_dimension_id: &str) -> ManagementCustomDimensionGetCall<'a, C, NC, A> { ManagementCustomDimensionGetCall { hub: self.hub, @@ -4136,7 +4475,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all profile filter links for a profile. + /// Lists all profile filter links for a profile. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to retrieve profile filter links for. + /// * `webPropertyId` - Web property Id for profile filter links for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. + /// * `profileId` - Profile ID to retrieve filter links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to. pub fn profile_filter_links_list(&self, account_id: &str, web_property_id: &str, profile_id: &str) -> ManagementProfileFilterLinkListCall<'a, C, NC, A> { ManagementProfileFilterLinkListCall { hub: self.hub, @@ -4153,7 +4498,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing web property. This method supports patch semantics. + /// Updates an existing web property. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to which the web property belongs + /// * `webPropertyId` - Web property ID pub fn webproperties_patch(&self, request: &Webproperty, account_id: &str, web_property_id: &str) -> ManagementWebpropertyPatchCall<'a, C, NC, A> { ManagementWebpropertyPatchCall { hub: self.hub, @@ -4168,7 +4519,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Create a new custom dimension. + /// Create a new custom dimension. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID for the custom dimension to create. + /// * `webPropertyId` - Web property ID for the custom dimension to create. pub fn custom_dimensions_insert(&self, request: &CustomDimension, account_id: &str, web_property_id: &str) -> ManagementCustomDimensionInsertCall<'a, C, NC, A> { ManagementCustomDimensionInsertCall { hub: self.hub, @@ -4183,7 +4540,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Create a new custom metric. + /// Create a new custom metric. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID for the custom metric to create. + /// * `webPropertyId` - Web property ID for the custom dimension to create. pub fn custom_metrics_insert(&self, request: &CustomMetric, account_id: &str, web_property_id: &str) -> ManagementCustomMetricInsertCall<'a, C, NC, A> { ManagementCustomMetricInsertCall { hub: self.hub, @@ -4198,7 +4561,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Adds a new user to the given view (profile). + /// Adds a new user to the given view (profile). + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to create the user link for. + /// * `webPropertyId` - Web Property ID to create the user link for. + /// * `profileId` - View (Profile) ID to create the user link for. pub fn profile_user_links_insert(&self, request: &EntityUserLink, account_id: &str, web_property_id: &str, profile_id: &str) -> ManagementProfileUserLinkInsertCall<'a, C, NC, A> { ManagementProfileUserLinkInsertCall { hub: self.hub, @@ -4214,7 +4584,11 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists web properties to which the user has access. + /// Lists web properties to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to retrieve web properties for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to. pub fn webproperties_list(&self, account_id: &str) -> ManagementWebpropertyListCall<'a, C, NC, A> { ManagementWebpropertyListCall { hub: self.hub, @@ -4229,7 +4603,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a webProperty-AdWords link. + /// Creates a webProperty-AdWords link. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - ID of the Google Analytics account to create the link for. + /// * `webPropertyId` - Web property ID to create the link for. pub fn web_property_ad_words_links_insert(&self, request: &EntityAdWordsLink, account_id: &str, web_property_id: &str) -> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, NC, A> { ManagementWebPropertyAdWordsLinkInsertCall { hub: self.hub, @@ -4244,7 +4624,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing webProperty-AdWords link. This method supports patch semantics. + /// Updates an existing webProperty-AdWords link. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - ID of the account which the given web property belongs to. + /// * `webPropertyId` - Web property ID to retrieve the AdWords link for. + /// * `webPropertyAdWordsLinkId` - Web property-AdWords link ID. pub fn web_property_ad_words_links_patch(&self, request: &EntityAdWordsLink, account_id: &str, web_property_id: &str, web_property_ad_words_link_id: &str) -> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, NC, A> { ManagementWebPropertyAdWordsLinkPatchCall { hub: self.hub, @@ -4260,7 +4647,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets a goal to which the user has access. + /// Gets a goal to which the user has access. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to retrieve the goal for. + /// * `webPropertyId` - Web property ID to retrieve the goal for. + /// * `profileId` - View (Profile) ID to retrieve the goal for. + /// * `goalId` - Goal ID to retrieve the goal for. pub fn goals_get(&self, account_id: &str, web_property_id: &str, profile_id: &str, goal_id: &str) -> ManagementGoalGetCall<'a, C, NC, A> { ManagementGoalGetCall { hub: self.hub, @@ -4276,7 +4670,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a web property-AdWords link. + /// Deletes a web property-AdWords link. + /// + /// # Arguments + /// + /// * `accountId` - ID of the account which the given web property belongs to. + /// * `webPropertyId` - Web property ID to delete the AdWords link for. + /// * `webPropertyAdWordsLinkId` - Web property AdWords link ID. pub fn web_property_ad_words_links_delete(&self, account_id: &str, web_property_id: &str, web_property_ad_words_link_id: &str) -> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, NC, A> { ManagementWebPropertyAdWordsLinkDeleteCall { hub: self.hub, @@ -4291,7 +4691,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing webProperty-AdWords link. + /// Updates an existing webProperty-AdWords link. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - ID of the account which the given web property belongs to. + /// * `webPropertyId` - Web property ID to retrieve the AdWords link for. + /// * `webPropertyAdWordsLinkId` - Web property-AdWords link ID. pub fn web_property_ad_words_links_update(&self, request: &EntityAdWordsLink, account_id: &str, web_property_id: &str, web_property_ad_words_link_id: &str) -> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, NC, A> { ManagementWebPropertyAdWordsLinkUpdateCall { hub: self.hub, @@ -4307,7 +4714,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing filter. This method supports patch semantics. + /// Updates an existing filter. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to which the filter belongs. + /// * `filterId` - ID of the filter to be updated. pub fn filters_patch(&self, request: &Filter, account_id: &str, filter_id: &str) -> ManagementFilterPatchCall<'a, C, NC, A> { ManagementFilterPatchCall { hub: self.hub, @@ -4322,7 +4735,11 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all filters for an account + /// Lists all filters for an account + /// + /// # Arguments + /// + /// * `accountId` - Account ID to retrieve filters for. pub fn filters_list(&self, account_id: &str) -> ManagementFilterListCall<'a, C, NC, A> { ManagementFilterListCall { hub: self.hub, @@ -4337,7 +4754,12 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete a filter. + /// Delete a filter. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to delete the filter for. + /// * `filterId` - ID of the filter to be deleted. pub fn filters_delete(&self, account_id: &str, filter_id: &str) -> ManagementFilterDeleteCall<'a, C, NC, A> { ManagementFilterDeleteCall { hub: self.hub, @@ -4351,7 +4773,13 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Create a new view (profile). + /// Create a new view (profile). + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to create the view (profile) for. + /// * `webPropertyId` - Web property ID to create the view (profile) for. pub fn profiles_insert(&self, request: &Profile, account_id: &str, web_property_id: &str) -> ManagementProfileInsertCall<'a, C, NC, A> { ManagementProfileInsertCall { hub: self.hub, @@ -4366,7 +4794,12 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Removes a user from the given account. + /// Removes a user from the given account. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to delete the user link for. + /// * `linkId` - Link ID to delete the user link for. pub fn account_user_links_delete(&self, account_id: &str, link_id: &str) -> ManagementAccountUserLinkDeleteCall<'a, C, NC, A> { ManagementAccountUserLinkDeleteCall { hub: self.hub, @@ -4380,7 +4813,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing view (profile). + /// Updates an existing view (profile). + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `accountId` - Account ID to which the view (profile) belongs + /// * `webPropertyId` - Web property ID to which the view (profile) belongs + /// * `profileId` - ID of the view (profile) to be updated. pub fn profiles_update(&self, request: &Profile, account_id: &str, web_property_id: &str, profile_id: &str) -> ManagementProfileUpdateCall<'a, C, NC, A> { ManagementProfileUpdateCall { hub: self.hub, @@ -4396,7 +4836,14 @@ impl<'a, C, NC, A> ManagementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns a single profile filter link. + /// Returns a single profile filter link. + /// + /// # Arguments + /// + /// * `accountId` - Account ID to retrieve profile filter link for. + /// * `webPropertyId` - Web property Id to retrieve profile filter link for. + /// * `profileId` - Profile ID to retrieve filter link for. + /// * `linkId` - ID of the profile filter link. pub fn profile_filter_links_get(&self, account_id: &str, web_property_id: &str, profile_id: &str, link_id: &str) -> ManagementProfileFilterLinkGetCall<'a, C, NC, A> { ManagementProfileFilterLinkGetCall { hub: self.hub, @@ -4447,13 +4894,20 @@ pub struct DataMethods<'a, C, NC, A> hub: &'a Analytics, } -impl<'a, C, NC, A> ResourceMethodsBuilder for DataMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for DataMethods<'a, C, NC, A> {} impl<'a, C, NC, A> DataMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns Analytics Multi-Channel Funnels data for a view (profile). + /// Returns Analytics Multi-Channel Funnels data for a view (profile). + /// + /// # Arguments + /// + /// * `ids` - Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. + /// * `start-date` - Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. + /// * `end-date` - End date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. + /// * `metrics` - A comma-separated list of Multi-Channel Funnels metrics. E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must be specified. pub fn mcf_get(&self, ids: &str, start_date: &str, end_date: &str, metrics: &str) -> DataMcfGetCall<'a, C, NC, A> { DataMcfGetCall { hub: self.hub, @@ -4475,7 +4929,14 @@ impl<'a, C, NC, A> DataMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns Analytics data for a view (profile). + /// Returns Analytics data for a view (profile). + /// + /// # Arguments + /// + /// * `ids` - Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. + /// * `start-date` - Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. + /// * `end-date` - End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is yesterday. + /// * `metrics` - A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric must be specified. pub fn ga_get(&self, ids: &str, start_date: &str, end_date: &str, metrics: &str) -> DataGaGetCall<'a, C, NC, A> { DataGaGetCall { hub: self.hub, @@ -4499,7 +4960,12 @@ impl<'a, C, NC, A> DataMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns real time data for a view (profile). + /// Returns real time data for a view (profile). + /// + /// # Arguments + /// + /// * `ids` - Unique table ID for retrieving real time data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. + /// * `metrics` - A comma-separated list of real time metrics. E.g., 'rt:activeUsers'. At least one metric must be specified. pub fn realtime_get(&self, ids: &str, metrics: &str) -> DataRealtimeGetCall<'a, C, NC, A> { DataRealtimeGetCall { hub: self.hub, @@ -4552,13 +5018,17 @@ pub struct ProvisioningMethods<'a, C, NC, A> hub: &'a Analytics, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ProvisioningMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ProvisioningMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ProvisioningMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates an account ticket. + /// Creates an account ticket. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn create_account_ticket(&self, request: &AccountTicket) -> ProvisioningCreateAccountTicketCall<'a, C, NC, A> { ProvisioningCreateAccountTicketCall { hub: self.hub, @@ -4606,13 +5076,17 @@ pub struct MetadataMethods<'a, C, NC, A> hub: &'a Analytics, } -impl<'a, C, NC, A> ResourceMethodsBuilder for MetadataMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for MetadataMethods<'a, C, NC, A> {} impl<'a, C, NC, A> MetadataMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all columns for a report type + /// Lists all columns for a report type + /// + /// # Arguments + /// + /// * `reportType` - Report type. Allowed Values: 'ga'. Where 'ga' corresponds to the Core Reporting API pub fn columns_list(&self, report_type: &str) -> MetadataColumnListCall<'a, C, NC, A> { MetadataColumnListCall { hub: self.hub, @@ -4635,7 +5109,7 @@ impl<'a, C, NC, A> MetadataMethods<'a, C, NC, A> { /// Create a new property if the account has fewer than 20 properties. Web properties are visible in the Google Analytics interface only if they have at least one profile. /// /// A builder for the *webproperties.insert* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -4700,7 +5174,7 @@ impl<'a, C, NC, A> ManagementWebpropertyInsertCall<'a, C, NC, A> where NC: hyper for &field in ["alt", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4757,7 +5231,7 @@ impl<'a, C, NC, A> ManagementWebpropertyInsertCall<'a, C, NC, A> where NC: hyper } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4773,7 +5247,6 @@ impl<'a, C, NC, A> ManagementWebpropertyInsertCall<'a, C, NC, A> where NC: hyper dlg.pre_request(); req.send() - }; match req_result { @@ -4783,7 +5256,7 @@ impl<'a, C, NC, A> ManagementWebpropertyInsertCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4794,7 +5267,7 @@ impl<'a, C, NC, A> ManagementWebpropertyInsertCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4803,13 +5276,13 @@ impl<'a, C, NC, A> ManagementWebpropertyInsertCall<'a, C, NC, A> where NC: hyper Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4830,7 +5303,7 @@ impl<'a, C, NC, A> ManagementWebpropertyInsertCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to create the web property for. + /// Account ID to create the web property for. pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -4891,7 +5364,7 @@ impl<'a, C, NC, A> ManagementWebpropertyInsertCall<'a, C, NC, A> where NC: hyper /// Gets a view (profile) to which the user has access. /// /// A builder for the *profiles.get* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -4953,7 +5426,7 @@ impl<'a, C, NC, A> ManagementProfileGetCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "accountId", "webPropertyId", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5006,7 +5479,7 @@ impl<'a, C, NC, A> ManagementProfileGetCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5018,7 +5491,6 @@ impl<'a, C, NC, A> ManagementProfileGetCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -5028,7 +5500,7 @@ impl<'a, C, NC, A> ManagementProfileGetCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5039,7 +5511,7 @@ impl<'a, C, NC, A> ManagementProfileGetCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5048,13 +5520,13 @@ impl<'a, C, NC, A> ManagementProfileGetCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5066,7 +5538,7 @@ impl<'a, C, NC, A> ManagementProfileGetCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to retrieve the goal for. + /// Account ID to retrieve the goal for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -5076,7 +5548,7 @@ impl<'a, C, NC, A> ManagementProfileGetCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to retrieve the goal for. + /// Web property ID to retrieve the goal for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileGetCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -5086,7 +5558,7 @@ impl<'a, C, NC, A> ManagementProfileGetCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to retrieve the goal for. + /// View (Profile) ID to retrieve the goal for. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -5147,7 +5619,7 @@ impl<'a, C, NC, A> ManagementProfileGetCall<'a, C, NC, A> where NC: hyper::net:: /// Lists all accounts to which the user has access. /// /// A builder for the *accounts.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -5213,7 +5685,7 @@ impl<'a, C, NC, A> ManagementAccountListCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5242,7 +5714,7 @@ impl<'a, C, NC, A> ManagementAccountListCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5254,7 +5726,6 @@ impl<'a, C, NC, A> ManagementAccountListCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -5264,7 +5735,7 @@ impl<'a, C, NC, A> ManagementAccountListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5275,7 +5746,7 @@ impl<'a, C, NC, A> ManagementAccountListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5284,13 +5755,13 @@ impl<'a, C, NC, A> ManagementAccountListCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5300,7 +5771,7 @@ impl<'a, C, NC, A> ManagementAccountListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first account to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first account to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementAccountListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -5308,7 +5779,7 @@ impl<'a, C, NC, A> ManagementAccountListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of accounts to include in this response. + /// The maximum number of accounts to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementAccountListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -5369,7 +5840,7 @@ impl<'a, C, NC, A> ManagementAccountListCall<'a, C, NC, A> where NC: hyper::net: /// Update an existing profile filter link. This method supports patch semantics. /// /// A builder for the *profileFilterLinks.patch* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -5440,7 +5911,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> where NC: for &field in ["alt", "accountId", "webPropertyId", "profileId", "linkId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5497,7 +5968,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> where NC: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5513,7 +5984,6 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> where NC: dlg.pre_request(); req.send() - }; match req_result { @@ -5523,7 +5993,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5534,7 +6004,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5543,13 +6013,13 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> where NC: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5570,7 +6040,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to which profile filter link belongs. + /// Account ID to which profile filter link belongs. pub fn account_id(mut self, new_value: &str) -> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -5580,7 +6050,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property Id to which profile filter link belongs + /// Web property Id to which profile filter link belongs pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -5590,7 +6060,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Profile ID to which filter link belongs + /// Profile ID to which filter link belongs pub fn profile_id(mut self, new_value: &str) -> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -5600,7 +6070,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the profile filter link to be updated. + /// ID of the profile filter link to be updated. pub fn link_id(mut self, new_value: &str) -> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> { self._link_id = new_value.to_string(); self @@ -5661,7 +6131,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkPatchCall<'a, C, NC, A> where NC: /// Removes a user from the given web property. /// /// A builder for the *webpropertyUserLinks.delete* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -5723,7 +6193,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, NC, A> where N for &field in ["accountId", "webPropertyId", "linkId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5775,7 +6245,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, NC, A> where N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5787,7 +6257,6 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, NC, A> where N dlg.pre_request(); req.send() - }; match req_result { @@ -5797,7 +6266,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, NC, A> where N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5808,12 +6277,12 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, NC, A> where N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5825,7 +6294,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, NC, A> where N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to delete the user link for. + /// Account ID to delete the user link for. pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkDeleteCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -5835,7 +6304,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, NC, A> where N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web Property ID to delete the user link for. + /// Web Property ID to delete the user link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkDeleteCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -5845,7 +6314,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, NC, A> where N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Link ID to delete the user link for. + /// Link ID to delete the user link for. pub fn link_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkDeleteCall<'a, C, NC, A> { self._link_id = new_value.to_string(); self @@ -5906,7 +6375,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, NC, A> where N /// Removes a user from the given view (profile). /// /// A builder for the *profileUserLinks.delete* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -5970,7 +6439,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> where NC: h for &field in ["accountId", "webPropertyId", "profileId", "linkId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6022,7 +6491,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> where NC: h } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6034,7 +6503,6 @@ impl<'a, C, NC, A> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> where NC: h dlg.pre_request(); req.send() - }; match req_result { @@ -6044,7 +6512,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6055,12 +6523,12 @@ impl<'a, C, NC, A> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6072,7 +6540,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to delete the user link for. + /// Account ID to delete the user link for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -6082,7 +6550,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web Property ID to delete the user link for. + /// Web Property ID to delete the user link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -6092,7 +6560,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to delete the user link for. + /// View (Profile) ID to delete the user link for. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -6102,7 +6570,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Link ID to delete the user link for. + /// Link ID to delete the user link for. pub fn link_id(mut self, new_value: &str) -> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> { self._link_id = new_value.to_string(); self @@ -6163,7 +6631,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkDeleteCall<'a, C, NC, A> where NC: h /// Updates permissions for an existing user on the given view (profile). /// /// A builder for the *profileUserLinks.update* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -6234,7 +6702,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> where NC: h for &field in ["alt", "accountId", "webPropertyId", "profileId", "linkId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6291,7 +6759,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> where NC: h } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6307,7 +6775,6 @@ impl<'a, C, NC, A> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> where NC: h dlg.pre_request(); req.send() - }; match req_result { @@ -6317,7 +6784,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6328,7 +6795,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6337,13 +6804,13 @@ impl<'a, C, NC, A> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> where NC: h Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6364,7 +6831,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to update the user link for. + /// Account ID to update the user link for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -6374,7 +6841,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web Property ID to update the user link for. + /// Web Property ID to update the user link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -6384,7 +6851,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile ID) to update the user link for. + /// View (Profile ID) to update the user link for. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -6394,7 +6861,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Link ID to update the user link for. + /// Link ID to update the user link for. pub fn link_id(mut self, new_value: &str) -> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> { self._link_id = new_value.to_string(); self @@ -6455,7 +6922,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkUpdateCall<'a, C, NC, A> where NC: h /// Create a new filter. /// /// A builder for the *filters.insert* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -6520,7 +6987,7 @@ impl<'a, C, NC, A> ManagementFilterInsertCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6577,7 +7044,7 @@ impl<'a, C, NC, A> ManagementFilterInsertCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6593,7 +7060,6 @@ impl<'a, C, NC, A> ManagementFilterInsertCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -6603,7 +7069,7 @@ impl<'a, C, NC, A> ManagementFilterInsertCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6614,7 +7080,7 @@ impl<'a, C, NC, A> ManagementFilterInsertCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6623,13 +7089,13 @@ impl<'a, C, NC, A> ManagementFilterInsertCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6650,7 +7116,7 @@ impl<'a, C, NC, A> ManagementFilterInsertCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to create filter for. + /// Account ID to create filter for. pub fn account_id(mut self, new_value: &str) -> ManagementFilterInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -6711,7 +7177,7 @@ impl<'a, C, NC, A> ManagementFilterInsertCall<'a, C, NC, A> where NC: hyper::net /// Updates permissions for an existing user on the given account. /// /// A builder for the *accountUserLinks.update* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -6778,7 +7244,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkUpdateCall<'a, C, NC, A> where NC: h for &field in ["alt", "accountId", "linkId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6835,7 +7301,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkUpdateCall<'a, C, NC, A> where NC: h } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6851,7 +7317,6 @@ impl<'a, C, NC, A> ManagementAccountUserLinkUpdateCall<'a, C, NC, A> where NC: h dlg.pre_request(); req.send() - }; match req_result { @@ -6861,7 +7326,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkUpdateCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6872,7 +7337,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkUpdateCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6881,13 +7346,13 @@ impl<'a, C, NC, A> ManagementAccountUserLinkUpdateCall<'a, C, NC, A> where NC: h Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6908,7 +7373,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkUpdateCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to update the account-user link for. + /// Account ID to update the account-user link for. pub fn account_id(mut self, new_value: &str) -> ManagementAccountUserLinkUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -6918,7 +7383,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkUpdateCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Link ID to update the account-user link for. + /// Link ID to update the account-user link for. pub fn link_id(mut self, new_value: &str) -> ManagementAccountUserLinkUpdateCall<'a, C, NC, A> { self._link_id = new_value.to_string(); self @@ -6979,7 +7444,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkUpdateCall<'a, C, NC, A> where NC: h /// Updates an existing web property. /// /// A builder for the *webproperties.update* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -7046,7 +7511,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUpdateCall<'a, C, NC, A> where NC: hyper for &field in ["alt", "accountId", "webPropertyId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7103,7 +7568,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUpdateCall<'a, C, NC, A> where NC: hyper } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7119,7 +7584,6 @@ impl<'a, C, NC, A> ManagementWebpropertyUpdateCall<'a, C, NC, A> where NC: hyper dlg.pre_request(); req.send() - }; match req_result { @@ -7129,7 +7593,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUpdateCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7140,7 +7604,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUpdateCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7149,13 +7613,13 @@ impl<'a, C, NC, A> ManagementWebpropertyUpdateCall<'a, C, NC, A> where NC: hyper Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7176,7 +7640,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUpdateCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to which the web property belongs + /// Account ID to which the web property belongs pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -7186,7 +7650,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUpdateCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID + /// Web property ID pub fn web_property_id(mut self, new_value: &str) -> ManagementWebpropertyUpdateCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -7247,7 +7711,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUpdateCall<'a, C, NC, A> where NC: hyper /// Updates permissions for an existing user on the given web property. /// /// A builder for the *webpropertyUserLinks.update* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -7316,7 +7780,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkUpdateCall<'a, C, NC, A> where N for &field in ["alt", "accountId", "webPropertyId", "linkId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7373,7 +7837,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkUpdateCall<'a, C, NC, A> where N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7389,7 +7853,6 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkUpdateCall<'a, C, NC, A> where N dlg.pre_request(); req.send() - }; match req_result { @@ -7399,7 +7862,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkUpdateCall<'a, C, NC, A> where N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7410,7 +7873,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkUpdateCall<'a, C, NC, A> where N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7419,13 +7882,13 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkUpdateCall<'a, C, NC, A> where N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7446,7 +7909,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkUpdateCall<'a, C, NC, A> where N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to update the account-user link for. + /// Account ID to update the account-user link for. pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -7456,7 +7919,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkUpdateCall<'a, C, NC, A> where N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to update the account-user link for. + /// Web property ID to update the account-user link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkUpdateCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -7466,7 +7929,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkUpdateCall<'a, C, NC, A> where N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Link ID to update the account-user link for. + /// Link ID to update the account-user link for. pub fn link_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkUpdateCall<'a, C, NC, A> { self._link_id = new_value.to_string(); self @@ -7527,7 +7990,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkUpdateCall<'a, C, NC, A> where N /// Create a new unsampled report. /// /// A builder for the *unsampledReports.insert* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -7596,7 +8059,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportInsertCall<'a, C, NC, A> where NC: h for &field in ["alt", "accountId", "webPropertyId", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7653,7 +8116,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportInsertCall<'a, C, NC, A> where NC: h } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7669,7 +8132,6 @@ impl<'a, C, NC, A> ManagementUnsampledReportInsertCall<'a, C, NC, A> where NC: h dlg.pre_request(); req.send() - }; match req_result { @@ -7679,7 +8141,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportInsertCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7690,7 +8152,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportInsertCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7699,13 +8161,13 @@ impl<'a, C, NC, A> ManagementUnsampledReportInsertCall<'a, C, NC, A> where NC: h Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7726,7 +8188,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportInsertCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to create the unsampled report for. + /// Account ID to create the unsampled report for. pub fn account_id(mut self, new_value: &str) -> ManagementUnsampledReportInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -7736,7 +8198,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportInsertCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to create the unsampled report for. + /// Web property ID to create the unsampled report for. pub fn web_property_id(mut self, new_value: &str) -> ManagementUnsampledReportInsertCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -7746,7 +8208,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportInsertCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to create the unsampled report for. + /// View (Profile) ID to create the unsampled report for. pub fn profile_id(mut self, new_value: &str) -> ManagementUnsampledReportInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -7807,7 +8269,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportInsertCall<'a, C, NC, A> where NC: h /// Get a custom metric to which the user has access. /// /// A builder for the *customMetrics.get* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -7869,7 +8331,7 @@ impl<'a, C, NC, A> ManagementCustomMetricGetCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt", "accountId", "webPropertyId", "customMetricId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7922,7 +8384,7 @@ impl<'a, C, NC, A> ManagementCustomMetricGetCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7934,7 +8396,6 @@ impl<'a, C, NC, A> ManagementCustomMetricGetCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -7944,7 +8405,7 @@ impl<'a, C, NC, A> ManagementCustomMetricGetCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7955,7 +8416,7 @@ impl<'a, C, NC, A> ManagementCustomMetricGetCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7964,13 +8425,13 @@ impl<'a, C, NC, A> ManagementCustomMetricGetCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7982,7 +8443,7 @@ impl<'a, C, NC, A> ManagementCustomMetricGetCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID for the custom metric to retrieve. + /// Account ID for the custom metric to retrieve. pub fn account_id(mut self, new_value: &str) -> ManagementCustomMetricGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -7992,7 +8453,7 @@ impl<'a, C, NC, A> ManagementCustomMetricGetCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID for the custom metric to retrieve. + /// Web property ID for the custom metric to retrieve. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomMetricGetCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -8002,7 +8463,7 @@ impl<'a, C, NC, A> ManagementCustomMetricGetCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the custom metric to retrieve. + /// The ID of the custom metric to retrieve. pub fn custom_metric_id(mut self, new_value: &str) -> ManagementCustomMetricGetCall<'a, C, NC, A> { self._custom_metric_id = new_value.to_string(); self @@ -8063,7 +8524,7 @@ impl<'a, C, NC, A> ManagementCustomMetricGetCall<'a, C, NC, A> where NC: hyper:: /// List uploads to which the user has access. /// /// A builder for the *uploads.get* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -8127,7 +8588,7 @@ impl<'a, C, NC, A> ManagementUploadGetCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "accountId", "webPropertyId", "customDataSourceId", "uploadId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8180,7 +8641,7 @@ impl<'a, C, NC, A> ManagementUploadGetCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8192,7 +8653,6 @@ impl<'a, C, NC, A> ManagementUploadGetCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -8202,7 +8662,7 @@ impl<'a, C, NC, A> ManagementUploadGetCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8213,7 +8673,7 @@ impl<'a, C, NC, A> ManagementUploadGetCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8222,13 +8682,13 @@ impl<'a, C, NC, A> ManagementUploadGetCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8240,7 +8700,7 @@ impl<'a, C, NC, A> ManagementUploadGetCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account Id for the upload to retrieve. + /// Account Id for the upload to retrieve. pub fn account_id(mut self, new_value: &str) -> ManagementUploadGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -8250,7 +8710,7 @@ impl<'a, C, NC, A> ManagementUploadGetCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property Id for the upload to retrieve. + /// Web property Id for the upload to retrieve. pub fn web_property_id(mut self, new_value: &str) -> ManagementUploadGetCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -8260,7 +8720,7 @@ impl<'a, C, NC, A> ManagementUploadGetCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom data source Id for upload to retrieve. + /// Custom data source Id for upload to retrieve. pub fn custom_data_source_id(mut self, new_value: &str) -> ManagementUploadGetCall<'a, C, NC, A> { self._custom_data_source_id = new_value.to_string(); self @@ -8270,7 +8730,7 @@ impl<'a, C, NC, A> ManagementUploadGetCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Upload Id to retrieve. + /// Upload Id to retrieve. pub fn upload_id(mut self, new_value: &str) -> ManagementUploadGetCall<'a, C, NC, A> { self._upload_id = new_value.to_string(); self @@ -8331,7 +8791,7 @@ impl<'a, C, NC, A> ManagementUploadGetCall<'a, C, NC, A> where NC: hyper::net::N /// Returns a web property-AdWords link to which the user has access. /// /// A builder for the *webPropertyAdWordsLinks.get* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -8393,7 +8853,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkGetCall<'a, C, NC, A> where N for &field in ["alt", "accountId", "webPropertyId", "webPropertyAdWordsLinkId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8446,7 +8906,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkGetCall<'a, C, NC, A> where N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8458,7 +8918,6 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkGetCall<'a, C, NC, A> where N dlg.pre_request(); req.send() - }; match req_result { @@ -8468,7 +8927,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkGetCall<'a, C, NC, A> where N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8479,7 +8938,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkGetCall<'a, C, NC, A> where N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8488,13 +8947,13 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkGetCall<'a, C, NC, A> where N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8506,7 +8965,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkGetCall<'a, C, NC, A> where N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the account which the given web property belongs to. + /// ID of the account which the given web property belongs to. pub fn account_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -8516,7 +8975,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkGetCall<'a, C, NC, A> where N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to retrieve the AdWords link for. + /// Web property ID to retrieve the AdWords link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkGetCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -8526,7 +8985,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkGetCall<'a, C, NC, A> where N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property-AdWords link ID. + /// Web property-AdWords link ID. pub fn web_property_ad_words_link_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkGetCall<'a, C, NC, A> { self._web_property_ad_words_link_id = new_value.to_string(); self @@ -8587,7 +9046,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkGetCall<'a, C, NC, A> where N /// Lists webProperty-user links for a given web property. /// /// A builder for the *webpropertyUserLinks.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -8657,7 +9116,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> where NC: for &field in ["alt", "accountId", "webPropertyId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8710,7 +9169,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> where NC: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8722,7 +9181,6 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> where NC: dlg.pre_request(); req.send() - }; match req_result { @@ -8732,7 +9190,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8743,7 +9201,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8752,13 +9210,13 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> where NC: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8770,7 +9228,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID which the given web property belongs to. + /// Account ID which the given web property belongs to. pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -8780,7 +9238,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web Property ID for the webProperty-user links to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. + /// Web Property ID for the webProperty-user links to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -8788,7 +9246,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> where NC: /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first webProperty-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first webProperty-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -8796,7 +9254,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> where NC: /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of webProperty-user Links to include in this response. + /// The maximum number of webProperty-user Links to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -8857,7 +9315,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkListCall<'a, C, NC, A> where NC: /// Update an existing profile filter link. /// /// A builder for the *profileFilterLinks.update* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -8928,7 +9386,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> where NC: for &field in ["alt", "accountId", "webPropertyId", "profileId", "linkId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8985,7 +9443,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> where NC: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9001,7 +9459,6 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> where NC: dlg.pre_request(); req.send() - }; match req_result { @@ -9011,7 +9468,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9022,7 +9479,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9031,13 +9488,13 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> where NC: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9058,7 +9515,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to which profile filter link belongs. + /// Account ID to which profile filter link belongs. pub fn account_id(mut self, new_value: &str) -> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -9068,7 +9525,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property Id to which profile filter link belongs + /// Web property Id to which profile filter link belongs pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -9078,7 +9535,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Profile ID to which filter link belongs + /// Profile ID to which filter link belongs pub fn profile_id(mut self, new_value: &str) -> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -9088,7 +9545,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the profile filter link to be updated. + /// ID of the profile filter link to be updated. pub fn link_id(mut self, new_value: &str) -> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> { self._link_id = new_value.to_string(); self @@ -9149,7 +9606,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkUpdateCall<'a, C, NC, A> where NC: /// Returns an experiment to which the user has access. /// /// A builder for the *experiments.get* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -9213,7 +9670,7 @@ impl<'a, C, NC, A> ManagementExperimentGetCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "accountId", "webPropertyId", "profileId", "experimentId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9266,7 +9723,7 @@ impl<'a, C, NC, A> ManagementExperimentGetCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9278,7 +9735,6 @@ impl<'a, C, NC, A> ManagementExperimentGetCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -9288,7 +9744,7 @@ impl<'a, C, NC, A> ManagementExperimentGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9299,7 +9755,7 @@ impl<'a, C, NC, A> ManagementExperimentGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9308,13 +9764,13 @@ impl<'a, C, NC, A> ManagementExperimentGetCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9326,7 +9782,7 @@ impl<'a, C, NC, A> ManagementExperimentGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to retrieve the experiment for. + /// Account ID to retrieve the experiment for. pub fn account_id(mut self, new_value: &str) -> ManagementExperimentGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -9336,7 +9792,7 @@ impl<'a, C, NC, A> ManagementExperimentGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to retrieve the experiment for. + /// Web property ID to retrieve the experiment for. pub fn web_property_id(mut self, new_value: &str) -> ManagementExperimentGetCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -9346,7 +9802,7 @@ impl<'a, C, NC, A> ManagementExperimentGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to retrieve the experiment for. + /// View (Profile) ID to retrieve the experiment for. pub fn profile_id(mut self, new_value: &str) -> ManagementExperimentGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -9356,7 +9812,7 @@ impl<'a, C, NC, A> ManagementExperimentGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Experiment ID to retrieve the experiment for. + /// Experiment ID to retrieve the experiment for. pub fn experiment_id(mut self, new_value: &str) -> ManagementExperimentGetCall<'a, C, NC, A> { self._experiment_id = new_value.to_string(); self @@ -9417,7 +9873,7 @@ impl<'a, C, NC, A> ManagementExperimentGetCall<'a, C, NC, A> where NC: hyper::ne /// Updates an existing custom dimension. /// /// A builder for the *customDimensions.update* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -9491,7 +9947,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionUpdateCall<'a, C, NC, A> where NC: h for &field in ["alt", "accountId", "webPropertyId", "customDimensionId", "ignoreCustomDataSourceLinks"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9548,7 +10004,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionUpdateCall<'a, C, NC, A> where NC: h } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9564,7 +10020,6 @@ impl<'a, C, NC, A> ManagementCustomDimensionUpdateCall<'a, C, NC, A> where NC: h dlg.pre_request(); req.send() - }; match req_result { @@ -9574,7 +10029,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionUpdateCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9585,7 +10040,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionUpdateCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9594,13 +10049,13 @@ impl<'a, C, NC, A> ManagementCustomDimensionUpdateCall<'a, C, NC, A> where NC: h Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9621,7 +10076,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionUpdateCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID for the custom dimension to update. + /// Account ID for the custom dimension to update. pub fn account_id(mut self, new_value: &str) -> ManagementCustomDimensionUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -9631,7 +10086,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionUpdateCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID for the custom dimension to update. + /// Web property ID for the custom dimension to update. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomDimensionUpdateCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -9641,7 +10096,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionUpdateCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom dimension ID for the custom dimension to update. + /// Custom dimension ID for the custom dimension to update. pub fn custom_dimension_id(mut self, new_value: &str) -> ManagementCustomDimensionUpdateCall<'a, C, NC, A> { self._custom_dimension_id = new_value.to_string(); self @@ -9649,7 +10104,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionUpdateCall<'a, C, NC, A> where NC: h /// Sets the *ignore custom data source links* query property to the given value. /// /// - /// Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set. + /// Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set. pub fn ignore_custom_data_source_links(mut self, new_value: bool) -> ManagementCustomDimensionUpdateCall<'a, C, NC, A> { self._ignore_custom_data_source_links = Some(new_value); self @@ -9710,7 +10165,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionUpdateCall<'a, C, NC, A> where NC: h /// Returns a single unsampled report. /// /// A builder for the *unsampledReports.get* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -9774,7 +10229,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportGetCall<'a, C, NC, A> where NC: hype for &field in ["alt", "accountId", "webPropertyId", "profileId", "unsampledReportId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9827,7 +10282,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportGetCall<'a, C, NC, A> where NC: hype } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9839,7 +10294,6 @@ impl<'a, C, NC, A> ManagementUnsampledReportGetCall<'a, C, NC, A> where NC: hype dlg.pre_request(); req.send() - }; match req_result { @@ -9849,7 +10303,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportGetCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9860,7 +10314,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportGetCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9869,13 +10323,13 @@ impl<'a, C, NC, A> ManagementUnsampledReportGetCall<'a, C, NC, A> where NC: hype Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9887,7 +10341,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportGetCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to retrieve unsampled report for. + /// Account ID to retrieve unsampled report for. pub fn account_id(mut self, new_value: &str) -> ManagementUnsampledReportGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -9897,7 +10351,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportGetCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to retrieve unsampled reports for. + /// Web property ID to retrieve unsampled reports for. pub fn web_property_id(mut self, new_value: &str) -> ManagementUnsampledReportGetCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -9907,7 +10361,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportGetCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to retrieve unsampled report for. + /// View (Profile) ID to retrieve unsampled report for. pub fn profile_id(mut self, new_value: &str) -> ManagementUnsampledReportGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -9917,7 +10371,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportGetCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the unsampled report to retrieve. + /// ID of the unsampled report to retrieve. pub fn unsampled_report_id(mut self, new_value: &str) -> ManagementUnsampledReportGetCall<'a, C, NC, A> { self._unsampled_report_id = new_value.to_string(); self @@ -9978,7 +10432,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportGetCall<'a, C, NC, A> where NC: hype /// Create a new profile filter link. /// /// A builder for the *profileFilterLinks.insert* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -10047,7 +10501,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkInsertCall<'a, C, NC, A> where NC: for &field in ["alt", "accountId", "webPropertyId", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10104,7 +10558,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkInsertCall<'a, C, NC, A> where NC: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10120,7 +10574,6 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkInsertCall<'a, C, NC, A> where NC: dlg.pre_request(); req.send() - }; match req_result { @@ -10130,7 +10583,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkInsertCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10141,7 +10594,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkInsertCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10150,13 +10603,13 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkInsertCall<'a, C, NC, A> where NC: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10177,7 +10630,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkInsertCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to create profile filter link for. + /// Account ID to create profile filter link for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileFilterLinkInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -10187,7 +10640,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkInsertCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property Id to create profile filter link for. + /// Web property Id to create profile filter link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileFilterLinkInsertCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -10197,7 +10650,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkInsertCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Profile ID to create filter link for. + /// Profile ID to create filter link for. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileFilterLinkInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -10258,7 +10711,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkInsertCall<'a, C, NC, A> where NC: /// Updates an existing filter. /// /// A builder for the *filters.update* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -10325,7 +10778,7 @@ impl<'a, C, NC, A> ManagementFilterUpdateCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "accountId", "filterId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10382,7 +10835,7 @@ impl<'a, C, NC, A> ManagementFilterUpdateCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10398,7 +10851,6 @@ impl<'a, C, NC, A> ManagementFilterUpdateCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -10408,7 +10860,7 @@ impl<'a, C, NC, A> ManagementFilterUpdateCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10419,7 +10871,7 @@ impl<'a, C, NC, A> ManagementFilterUpdateCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10428,13 +10880,13 @@ impl<'a, C, NC, A> ManagementFilterUpdateCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10455,7 +10907,7 @@ impl<'a, C, NC, A> ManagementFilterUpdateCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to which the filter belongs. + /// Account ID to which the filter belongs. pub fn account_id(mut self, new_value: &str) -> ManagementFilterUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -10465,7 +10917,7 @@ impl<'a, C, NC, A> ManagementFilterUpdateCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the filter to be updated. + /// ID of the filter to be updated. pub fn filter_id(mut self, new_value: &str) -> ManagementFilterUpdateCall<'a, C, NC, A> { self._filter_id = new_value.to_string(); self @@ -10526,7 +10978,7 @@ impl<'a, C, NC, A> ManagementFilterUpdateCall<'a, C, NC, A> where NC: hyper::net /// Delete a profile filter link. /// /// A builder for the *profileFilterLinks.delete* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -10590,7 +11042,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> where NC: for &field in ["accountId", "webPropertyId", "profileId", "linkId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10642,7 +11094,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> where NC: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10654,7 +11106,6 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> where NC: dlg.pre_request(); req.send() - }; match req_result { @@ -10664,7 +11115,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10675,12 +11126,12 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10692,7 +11143,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to which the profile filter link belongs. + /// Account ID to which the profile filter link belongs. pub fn account_id(mut self, new_value: &str) -> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -10702,7 +11153,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property Id to which the profile filter link belongs. + /// Web property Id to which the profile filter link belongs. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -10712,7 +11163,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Profile ID to which the filter link belongs. + /// Profile ID to which the filter link belongs. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -10722,7 +11173,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the profile filter link to delete. + /// ID of the profile filter link to delete. pub fn link_id(mut self, new_value: &str) -> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> { self._link_id = new_value.to_string(); self @@ -10783,7 +11234,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkDeleteCall<'a, C, NC, A> where NC: /// Lists segments to which the user has access. /// /// A builder for the *segments.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -10849,7 +11300,7 @@ impl<'a, C, NC, A> ManagementSegmentListCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10878,7 +11329,7 @@ impl<'a, C, NC, A> ManagementSegmentListCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10890,7 +11341,6 @@ impl<'a, C, NC, A> ManagementSegmentListCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -10900,7 +11350,7 @@ impl<'a, C, NC, A> ManagementSegmentListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10911,7 +11361,7 @@ impl<'a, C, NC, A> ManagementSegmentListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10920,13 +11370,13 @@ impl<'a, C, NC, A> ManagementSegmentListCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10936,7 +11386,7 @@ impl<'a, C, NC, A> ManagementSegmentListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first segment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first segment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementSegmentListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -10944,7 +11394,7 @@ impl<'a, C, NC, A> ManagementSegmentListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of segments to include in this response. + /// The maximum number of segments to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementSegmentListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -11005,7 +11455,7 @@ impl<'a, C, NC, A> ManagementSegmentListCall<'a, C, NC, A> where NC: hyper::net: /// Deletes a view (profile). /// /// A builder for the *profiles.delete* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -11067,7 +11517,7 @@ impl<'a, C, NC, A> ManagementProfileDeleteCall<'a, C, NC, A> where NC: hyper::ne for &field in ["accountId", "webPropertyId", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11119,7 +11569,7 @@ impl<'a, C, NC, A> ManagementProfileDeleteCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11131,7 +11581,6 @@ impl<'a, C, NC, A> ManagementProfileDeleteCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -11141,7 +11590,7 @@ impl<'a, C, NC, A> ManagementProfileDeleteCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11152,12 +11601,12 @@ impl<'a, C, NC, A> ManagementProfileDeleteCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11169,7 +11618,7 @@ impl<'a, C, NC, A> ManagementProfileDeleteCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to delete the view (profile) for. + /// Account ID to delete the view (profile) for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileDeleteCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -11179,7 +11628,7 @@ impl<'a, C, NC, A> ManagementProfileDeleteCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to delete the view (profile) for. + /// Web property ID to delete the view (profile) for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileDeleteCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -11189,7 +11638,7 @@ impl<'a, C, NC, A> ManagementProfileDeleteCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the view (profile) to be deleted. + /// ID of the view (profile) to be deleted. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -11250,7 +11699,7 @@ impl<'a, C, NC, A> ManagementProfileDeleteCall<'a, C, NC, A> where NC: hyper::ne /// Updates an existing view (profile). This method supports patch semantics. /// /// A builder for the *goals.patch* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -11321,7 +11770,7 @@ impl<'a, C, NC, A> ManagementGoalPatchCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "accountId", "webPropertyId", "profileId", "goalId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11378,7 +11827,7 @@ impl<'a, C, NC, A> ManagementGoalPatchCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11394,7 +11843,6 @@ impl<'a, C, NC, A> ManagementGoalPatchCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -11404,7 +11852,7 @@ impl<'a, C, NC, A> ManagementGoalPatchCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11415,7 +11863,7 @@ impl<'a, C, NC, A> ManagementGoalPatchCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11424,13 +11872,13 @@ impl<'a, C, NC, A> ManagementGoalPatchCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11451,7 +11899,7 @@ impl<'a, C, NC, A> ManagementGoalPatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to update the goal. + /// Account ID to update the goal. pub fn account_id(mut self, new_value: &str) -> ManagementGoalPatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -11461,7 +11909,7 @@ impl<'a, C, NC, A> ManagementGoalPatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to update the goal. + /// Web property ID to update the goal. pub fn web_property_id(mut self, new_value: &str) -> ManagementGoalPatchCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -11471,7 +11919,7 @@ impl<'a, C, NC, A> ManagementGoalPatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to update the goal. + /// View (Profile) ID to update the goal. pub fn profile_id(mut self, new_value: &str) -> ManagementGoalPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -11481,7 +11929,7 @@ impl<'a, C, NC, A> ManagementGoalPatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Index of the goal to be updated. + /// Index of the goal to be updated. pub fn goal_id(mut self, new_value: &str) -> ManagementGoalPatchCall<'a, C, NC, A> { self._goal_id = new_value.to_string(); self @@ -11542,7 +11990,7 @@ impl<'a, C, NC, A> ManagementGoalPatchCall<'a, C, NC, A> where NC: hyper::net::N /// Updates an existing custom dimension. This method supports patch semantics. /// /// A builder for the *customDimensions.patch* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -11616,7 +12064,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionPatchCall<'a, C, NC, A> where NC: hy for &field in ["alt", "accountId", "webPropertyId", "customDimensionId", "ignoreCustomDataSourceLinks"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11673,7 +12121,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionPatchCall<'a, C, NC, A> where NC: hy } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11689,7 +12137,6 @@ impl<'a, C, NC, A> ManagementCustomDimensionPatchCall<'a, C, NC, A> where NC: hy dlg.pre_request(); req.send() - }; match req_result { @@ -11699,7 +12146,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionPatchCall<'a, C, NC, A> where NC: hy continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11710,7 +12157,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionPatchCall<'a, C, NC, A> where NC: hy continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11719,13 +12166,13 @@ impl<'a, C, NC, A> ManagementCustomDimensionPatchCall<'a, C, NC, A> where NC: hy Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11746,7 +12193,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionPatchCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID for the custom dimension to update. + /// Account ID for the custom dimension to update. pub fn account_id(mut self, new_value: &str) -> ManagementCustomDimensionPatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -11756,7 +12203,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionPatchCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID for the custom dimension to update. + /// Web property ID for the custom dimension to update. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomDimensionPatchCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -11766,7 +12213,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionPatchCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom dimension ID for the custom dimension to update. + /// Custom dimension ID for the custom dimension to update. pub fn custom_dimension_id(mut self, new_value: &str) -> ManagementCustomDimensionPatchCall<'a, C, NC, A> { self._custom_dimension_id = new_value.to_string(); self @@ -11774,7 +12221,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionPatchCall<'a, C, NC, A> where NC: hy /// Sets the *ignore custom data source links* query property to the given value. /// /// - /// Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set. + /// Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set. pub fn ignore_custom_data_source_links(mut self, new_value: bool) -> ManagementCustomDimensionPatchCall<'a, C, NC, A> { self._ignore_custom_data_source_links = Some(new_value); self @@ -11835,7 +12282,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionPatchCall<'a, C, NC, A> where NC: hy /// Update an existing experiment. This method supports patch semantics. /// /// A builder for the *experiments.patch* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -11906,7 +12353,7 @@ impl<'a, C, NC, A> ManagementExperimentPatchCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt", "accountId", "webPropertyId", "profileId", "experimentId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11963,7 +12410,7 @@ impl<'a, C, NC, A> ManagementExperimentPatchCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11979,7 +12426,6 @@ impl<'a, C, NC, A> ManagementExperimentPatchCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -11989,7 +12435,7 @@ impl<'a, C, NC, A> ManagementExperimentPatchCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12000,7 +12446,7 @@ impl<'a, C, NC, A> ManagementExperimentPatchCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12009,13 +12455,13 @@ impl<'a, C, NC, A> ManagementExperimentPatchCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12036,7 +12482,7 @@ impl<'a, C, NC, A> ManagementExperimentPatchCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID of the experiment to update. + /// Account ID of the experiment to update. pub fn account_id(mut self, new_value: &str) -> ManagementExperimentPatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -12046,7 +12492,7 @@ impl<'a, C, NC, A> ManagementExperimentPatchCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID of the experiment to update. + /// Web property ID of the experiment to update. pub fn web_property_id(mut self, new_value: &str) -> ManagementExperimentPatchCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -12056,7 +12502,7 @@ impl<'a, C, NC, A> ManagementExperimentPatchCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID of the experiment to update. + /// View (Profile) ID of the experiment to update. pub fn profile_id(mut self, new_value: &str) -> ManagementExperimentPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -12066,7 +12512,7 @@ impl<'a, C, NC, A> ManagementExperimentPatchCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Experiment ID of the experiment to update. + /// Experiment ID of the experiment to update. pub fn experiment_id(mut self, new_value: &str) -> ManagementExperimentPatchCall<'a, C, NC, A> { self._experiment_id = new_value.to_string(); self @@ -12127,7 +12573,7 @@ impl<'a, C, NC, A> ManagementExperimentPatchCall<'a, C, NC, A> where NC: hyper:: /// Lists experiments to which the user has access. /// /// A builder for the *experiments.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -12199,7 +12645,7 @@ impl<'a, C, NC, A> ManagementExperimentListCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "accountId", "webPropertyId", "profileId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12252,7 +12698,7 @@ impl<'a, C, NC, A> ManagementExperimentListCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12264,7 +12710,6 @@ impl<'a, C, NC, A> ManagementExperimentListCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -12274,7 +12719,7 @@ impl<'a, C, NC, A> ManagementExperimentListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12285,7 +12730,7 @@ impl<'a, C, NC, A> ManagementExperimentListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12294,13 +12739,13 @@ impl<'a, C, NC, A> ManagementExperimentListCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12312,7 +12757,7 @@ impl<'a, C, NC, A> ManagementExperimentListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to retrieve experiments for. + /// Account ID to retrieve experiments for. pub fn account_id(mut self, new_value: &str) -> ManagementExperimentListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -12322,7 +12767,7 @@ impl<'a, C, NC, A> ManagementExperimentListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to retrieve experiments for. + /// Web property ID to retrieve experiments for. pub fn web_property_id(mut self, new_value: &str) -> ManagementExperimentListCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -12332,7 +12777,7 @@ impl<'a, C, NC, A> ManagementExperimentListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to retrieve experiments for. + /// View (Profile) ID to retrieve experiments for. pub fn profile_id(mut self, new_value: &str) -> ManagementExperimentListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -12340,7 +12785,7 @@ impl<'a, C, NC, A> ManagementExperimentListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first experiment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first experiment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementExperimentListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -12348,7 +12793,7 @@ impl<'a, C, NC, A> ManagementExperimentListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of experiments to include in this response. + /// The maximum number of experiments to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementExperimentListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -12409,7 +12854,7 @@ impl<'a, C, NC, A> ManagementExperimentListCall<'a, C, NC, A> where NC: hyper::n /// Lists views (profiles) to which the user has access. /// /// A builder for the *profiles.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -12479,7 +12924,7 @@ impl<'a, C, NC, A> ManagementProfileListCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "accountId", "webPropertyId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12532,7 +12977,7 @@ impl<'a, C, NC, A> ManagementProfileListCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12544,7 +12989,6 @@ impl<'a, C, NC, A> ManagementProfileListCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -12554,7 +12998,7 @@ impl<'a, C, NC, A> ManagementProfileListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12565,7 +13009,7 @@ impl<'a, C, NC, A> ManagementProfileListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12574,13 +13018,13 @@ impl<'a, C, NC, A> ManagementProfileListCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12592,7 +13036,7 @@ impl<'a, C, NC, A> ManagementProfileListCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID for the view (profiles) to retrieve. Can either be a specific account ID or '~all', which refers to all the accounts to which the user has access. + /// Account ID for the view (profiles) to retrieve. Can either be a specific account ID or '~all', which refers to all the accounts to which the user has access. pub fn account_id(mut self, new_value: &str) -> ManagementProfileListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -12602,7 +13046,7 @@ impl<'a, C, NC, A> ManagementProfileListCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID for the views (profiles) to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties to which the user has access. + /// Web property ID for the views (profiles) to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties to which the user has access. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileListCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -12610,7 +13054,7 @@ impl<'a, C, NC, A> ManagementProfileListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementProfileListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -12618,7 +13062,7 @@ impl<'a, C, NC, A> ManagementProfileListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of views (profiles) to include in this response. + /// The maximum number of views (profiles) to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementProfileListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -12679,7 +13123,7 @@ impl<'a, C, NC, A> ManagementProfileListCall<'a, C, NC, A> where NC: hyper::net: /// Lists goals to which the user has access. /// /// A builder for the *goals.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -12751,7 +13195,7 @@ impl<'a, C, NC, A> ManagementGoalListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "accountId", "webPropertyId", "profileId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12804,7 +13248,7 @@ impl<'a, C, NC, A> ManagementGoalListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12816,7 +13260,6 @@ impl<'a, C, NC, A> ManagementGoalListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -12826,7 +13269,7 @@ impl<'a, C, NC, A> ManagementGoalListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12837,7 +13280,7 @@ impl<'a, C, NC, A> ManagementGoalListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12846,13 +13289,13 @@ impl<'a, C, NC, A> ManagementGoalListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12864,7 +13307,7 @@ impl<'a, C, NC, A> ManagementGoalListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to retrieve goals for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to. + /// Account ID to retrieve goals for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to. pub fn account_id(mut self, new_value: &str) -> ManagementGoalListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -12874,7 +13317,7 @@ impl<'a, C, NC, A> ManagementGoalListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to retrieve goals for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. + /// Web property ID to retrieve goals for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. pub fn web_property_id(mut self, new_value: &str) -> ManagementGoalListCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -12884,7 +13327,7 @@ impl<'a, C, NC, A> ManagementGoalListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to retrieve goals for. Can either be a specific view (profile) ID or '~all', which refers to all the views (profiles) that user has access to. + /// View (Profile) ID to retrieve goals for. Can either be a specific view (profile) ID or '~all', which refers to all the views (profiles) that user has access to. pub fn profile_id(mut self, new_value: &str) -> ManagementGoalListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -12892,7 +13335,7 @@ impl<'a, C, NC, A> ManagementGoalListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementGoalListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -12900,7 +13343,7 @@ impl<'a, C, NC, A> ManagementGoalListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of goals to include in this response. + /// The maximum number of goals to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementGoalListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -12961,7 +13404,7 @@ impl<'a, C, NC, A> ManagementGoalListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Create a new goal. /// /// A builder for the *goals.insert* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -13030,7 +13473,7 @@ impl<'a, C, NC, A> ManagementGoalInsertCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "accountId", "webPropertyId", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13087,7 +13530,7 @@ impl<'a, C, NC, A> ManagementGoalInsertCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13103,7 +13546,6 @@ impl<'a, C, NC, A> ManagementGoalInsertCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -13113,7 +13555,7 @@ impl<'a, C, NC, A> ManagementGoalInsertCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13124,7 +13566,7 @@ impl<'a, C, NC, A> ManagementGoalInsertCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13133,13 +13575,13 @@ impl<'a, C, NC, A> ManagementGoalInsertCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13160,7 +13602,7 @@ impl<'a, C, NC, A> ManagementGoalInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to create the goal for. + /// Account ID to create the goal for. pub fn account_id(mut self, new_value: &str) -> ManagementGoalInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -13170,7 +13612,7 @@ impl<'a, C, NC, A> ManagementGoalInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to create the goal for. + /// Web property ID to create the goal for. pub fn web_property_id(mut self, new_value: &str) -> ManagementGoalInsertCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -13180,7 +13622,7 @@ impl<'a, C, NC, A> ManagementGoalInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to create the goal for. + /// View (Profile) ID to create the goal for. pub fn profile_id(mut self, new_value: &str) -> ManagementGoalInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -13241,7 +13683,7 @@ impl<'a, C, NC, A> ManagementGoalInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Updates an existing custom metric. This method supports patch semantics. /// /// A builder for the *customMetrics.patch* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -13315,7 +13757,7 @@ impl<'a, C, NC, A> ManagementCustomMetricPatchCall<'a, C, NC, A> where NC: hyper for &field in ["alt", "accountId", "webPropertyId", "customMetricId", "ignoreCustomDataSourceLinks"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13372,7 +13814,7 @@ impl<'a, C, NC, A> ManagementCustomMetricPatchCall<'a, C, NC, A> where NC: hyper } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13388,7 +13830,6 @@ impl<'a, C, NC, A> ManagementCustomMetricPatchCall<'a, C, NC, A> where NC: hyper dlg.pre_request(); req.send() - }; match req_result { @@ -13398,7 +13839,7 @@ impl<'a, C, NC, A> ManagementCustomMetricPatchCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13409,7 +13850,7 @@ impl<'a, C, NC, A> ManagementCustomMetricPatchCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13418,13 +13859,13 @@ impl<'a, C, NC, A> ManagementCustomMetricPatchCall<'a, C, NC, A> where NC: hyper Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13445,7 +13886,7 @@ impl<'a, C, NC, A> ManagementCustomMetricPatchCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID for the custom metric to update. + /// Account ID for the custom metric to update. pub fn account_id(mut self, new_value: &str) -> ManagementCustomMetricPatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -13455,7 +13896,7 @@ impl<'a, C, NC, A> ManagementCustomMetricPatchCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID for the custom metric to update. + /// Web property ID for the custom metric to update. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomMetricPatchCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -13465,7 +13906,7 @@ impl<'a, C, NC, A> ManagementCustomMetricPatchCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom metric ID for the custom metric to update. + /// Custom metric ID for the custom metric to update. pub fn custom_metric_id(mut self, new_value: &str) -> ManagementCustomMetricPatchCall<'a, C, NC, A> { self._custom_metric_id = new_value.to_string(); self @@ -13473,7 +13914,7 @@ impl<'a, C, NC, A> ManagementCustomMetricPatchCall<'a, C, NC, A> where NC: hyper /// Sets the *ignore custom data source links* query property to the given value. /// /// - /// Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set. + /// Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set. pub fn ignore_custom_data_source_links(mut self, new_value: bool) -> ManagementCustomMetricPatchCall<'a, C, NC, A> { self._ignore_custom_data_source_links = Some(new_value); self @@ -13534,7 +13975,7 @@ impl<'a, C, NC, A> ManagementCustomMetricPatchCall<'a, C, NC, A> where NC: hyper /// Upload data for a custom data source. /// /// A builder for the *uploads.uploadData* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -13598,7 +14039,7 @@ impl<'a, C, NC, A> ManagementUploadUploadDataCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "accountId", "webPropertyId", "customDataSourceId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13661,7 +14102,7 @@ impl<'a, C, NC, A> ManagementUploadUploadDataCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13687,7 +14128,7 @@ impl<'a, C, NC, A> ManagementUploadUploadDataCall<'a, C, NC, A> where NC: hyper: let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); if size > 1073741824 { - return Result::UploadSizeLimitExceeded(size, 1073741824) + return Err(Error::UploadSizeLimitExceeded(size, 1073741824)) } req = req.header(ContentType(reader_mime_type.clone())) .header(ContentLength(size)) @@ -13700,7 +14141,6 @@ impl<'a, C, NC, A> ManagementUploadUploadDataCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - } }; @@ -13711,7 +14151,7 @@ impl<'a, C, NC, A> ManagementUploadUploadDataCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13722,13 +14162,13 @@ impl<'a, C, NC, A> ManagementUploadUploadDataCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } if protocol == "resumable" { let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); if size > 1073741824 { - return Result::UploadSizeLimitExceeded(size, 1073741824) + return Err(Error::UploadSizeLimitExceeded(size, 1073741824)) } let mut client = &mut *self.hub.client.borrow_mut(); let upload_result = { @@ -13753,17 +14193,17 @@ impl<'a, C, NC, A> ManagementUploadUploadDataCall<'a, C, NC, A> where NC: hyper: match upload_result { None => { dlg.finished(false); - return Result::Cancelled + return Err(Error::Cancelled) } Some(Err(err)) => { dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Some(Ok(upload_result)) => { res = upload_result; if !res.status.is_success() { dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } } } @@ -13775,13 +14215,13 @@ impl<'a, C, NC, A> ManagementUploadUploadDataCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13797,11 +14237,14 @@ impl<'a, C, NC, A> ManagementUploadUploadDataCall<'a, C, NC, A> where NC: hyper: where RS: ReadSeek { self.doit(stream, mime_type, "simple") } - /// Upload media in a resumeable fashion. + /// Upload media in a resumable fashion. /// Even if the upload fails or is interrupted, it can be resumed for a /// certain amount of time as the server maintains state temporarily. /// - /// TODO: Write more about how delegation works in this particular case. + /// The delegate will be asked for an `upload_url()`, and if not provided, will be asked to store an upload URL + /// that was provided by the server, using `store_upload_url(...)`. The upload will be done in chunks, the delegate + /// may specify the `chunk_size()` and may cancel the operation before each chunk is uploaded, using + /// `cancel_chunk_upload(...)`. /// /// * *max size*: 1GB /// * *multipart*: yes @@ -13816,7 +14259,7 @@ impl<'a, C, NC, A> ManagementUploadUploadDataCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account Id associated with the upload. + /// Account Id associated with the upload. pub fn account_id(mut self, new_value: &str) -> ManagementUploadUploadDataCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -13826,7 +14269,7 @@ impl<'a, C, NC, A> ManagementUploadUploadDataCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property UA-string associated with the upload. + /// Web property UA-string associated with the upload. pub fn web_property_id(mut self, new_value: &str) -> ManagementUploadUploadDataCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -13836,7 +14279,7 @@ impl<'a, C, NC, A> ManagementUploadUploadDataCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom data source Id to which the data being uploaded belongs. + /// Custom data source Id to which the data being uploaded belongs. pub fn custom_data_source_id(mut self, new_value: &str) -> ManagementUploadUploadDataCall<'a, C, NC, A> { self._custom_data_source_id = new_value.to_string(); self @@ -13897,7 +14340,7 @@ impl<'a, C, NC, A> ManagementUploadUploadDataCall<'a, C, NC, A> where NC: hyper: /// Adds a new user to the given account. /// /// A builder for the *accountUserLinks.insert* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -13962,7 +14405,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkInsertCall<'a, C, NC, A> where NC: h for &field in ["alt", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14019,7 +14462,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkInsertCall<'a, C, NC, A> where NC: h } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14035,7 +14478,6 @@ impl<'a, C, NC, A> ManagementAccountUserLinkInsertCall<'a, C, NC, A> where NC: h dlg.pre_request(); req.send() - }; match req_result { @@ -14045,7 +14487,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkInsertCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14056,7 +14498,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkInsertCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14065,13 +14507,13 @@ impl<'a, C, NC, A> ManagementAccountUserLinkInsertCall<'a, C, NC, A> where NC: h Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14092,7 +14534,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkInsertCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to create the user link for. + /// Account ID to create the user link for. pub fn account_id(mut self, new_value: &str) -> ManagementAccountUserLinkInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -14153,7 +14595,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkInsertCall<'a, C, NC, A> where NC: h /// Adds a new user to the given web property. /// /// A builder for the *webpropertyUserLinks.insert* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -14220,7 +14662,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkInsertCall<'a, C, NC, A> where N for &field in ["alt", "accountId", "webPropertyId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14277,7 +14719,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkInsertCall<'a, C, NC, A> where N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14293,7 +14735,6 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkInsertCall<'a, C, NC, A> where N dlg.pre_request(); req.send() - }; match req_result { @@ -14303,7 +14744,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkInsertCall<'a, C, NC, A> where N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14314,7 +14755,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkInsertCall<'a, C, NC, A> where N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14323,13 +14764,13 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkInsertCall<'a, C, NC, A> where N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14350,7 +14791,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkInsertCall<'a, C, NC, A> where N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to create the user link for. + /// Account ID to create the user link for. pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -14360,7 +14801,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkInsertCall<'a, C, NC, A> where N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web Property ID to create the user link for. + /// Web Property ID to create the user link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebpropertyUserLinkInsertCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -14421,7 +14862,7 @@ impl<'a, C, NC, A> ManagementWebpropertyUserLinkInsertCall<'a, C, NC, A> where N /// Delete an experiment. /// /// A builder for the *experiments.delete* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -14485,7 +14926,7 @@ impl<'a, C, NC, A> ManagementExperimentDeleteCall<'a, C, NC, A> where NC: hyper: for &field in ["accountId", "webPropertyId", "profileId", "experimentId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14537,7 +14978,7 @@ impl<'a, C, NC, A> ManagementExperimentDeleteCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14549,7 +14990,6 @@ impl<'a, C, NC, A> ManagementExperimentDeleteCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -14559,7 +14999,7 @@ impl<'a, C, NC, A> ManagementExperimentDeleteCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14570,12 +15010,12 @@ impl<'a, C, NC, A> ManagementExperimentDeleteCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14587,7 +15027,7 @@ impl<'a, C, NC, A> ManagementExperimentDeleteCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to which the experiment belongs + /// Account ID to which the experiment belongs pub fn account_id(mut self, new_value: &str) -> ManagementExperimentDeleteCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -14597,7 +15037,7 @@ impl<'a, C, NC, A> ManagementExperimentDeleteCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to which the experiment belongs + /// Web property ID to which the experiment belongs pub fn web_property_id(mut self, new_value: &str) -> ManagementExperimentDeleteCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -14607,7 +15047,7 @@ impl<'a, C, NC, A> ManagementExperimentDeleteCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to which the experiment belongs + /// View (Profile) ID to which the experiment belongs pub fn profile_id(mut self, new_value: &str) -> ManagementExperimentDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -14617,7 +15057,7 @@ impl<'a, C, NC, A> ManagementExperimentDeleteCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the experiment to delete + /// ID of the experiment to delete pub fn experiment_id(mut self, new_value: &str) -> ManagementExperimentDeleteCall<'a, C, NC, A> { self._experiment_id = new_value.to_string(); self @@ -14678,7 +15118,7 @@ impl<'a, C, NC, A> ManagementExperimentDeleteCall<'a, C, NC, A> where NC: hyper: /// Updates an existing view (profile). This method supports patch semantics. /// /// A builder for the *profiles.patch* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -14747,7 +15187,7 @@ impl<'a, C, NC, A> ManagementProfilePatchCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "accountId", "webPropertyId", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14804,7 +15244,7 @@ impl<'a, C, NC, A> ManagementProfilePatchCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14820,7 +15260,6 @@ impl<'a, C, NC, A> ManagementProfilePatchCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -14830,7 +15269,7 @@ impl<'a, C, NC, A> ManagementProfilePatchCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14841,7 +15280,7 @@ impl<'a, C, NC, A> ManagementProfilePatchCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14850,13 +15289,13 @@ impl<'a, C, NC, A> ManagementProfilePatchCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14877,7 +15316,7 @@ impl<'a, C, NC, A> ManagementProfilePatchCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to which the view (profile) belongs + /// Account ID to which the view (profile) belongs pub fn account_id(mut self, new_value: &str) -> ManagementProfilePatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -14887,7 +15326,7 @@ impl<'a, C, NC, A> ManagementProfilePatchCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to which the view (profile) belongs + /// Web property ID to which the view (profile) belongs pub fn web_property_id(mut self, new_value: &str) -> ManagementProfilePatchCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -14897,7 +15336,7 @@ impl<'a, C, NC, A> ManagementProfilePatchCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the view (profile) to be updated. + /// ID of the view (profile) to be updated. pub fn profile_id(mut self, new_value: &str) -> ManagementProfilePatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -14958,7 +15397,7 @@ impl<'a, C, NC, A> ManagementProfilePatchCall<'a, C, NC, A> where NC: hyper::net /// Returns a filters to which the user has access. /// /// A builder for the *filters.get* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -15018,7 +15457,7 @@ impl<'a, C, NC, A> ManagementFilterGetCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "accountId", "filterId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15071,7 +15510,7 @@ impl<'a, C, NC, A> ManagementFilterGetCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15083,7 +15522,6 @@ impl<'a, C, NC, A> ManagementFilterGetCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -15093,7 +15531,7 @@ impl<'a, C, NC, A> ManagementFilterGetCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15104,7 +15542,7 @@ impl<'a, C, NC, A> ManagementFilterGetCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15113,13 +15551,13 @@ impl<'a, C, NC, A> ManagementFilterGetCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15131,7 +15569,7 @@ impl<'a, C, NC, A> ManagementFilterGetCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to retrieve filters for. + /// Account ID to retrieve filters for. pub fn account_id(mut self, new_value: &str) -> ManagementFilterGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -15141,7 +15579,7 @@ impl<'a, C, NC, A> ManagementFilterGetCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Filter ID to retrieve filters for. + /// Filter ID to retrieve filters for. pub fn filter_id(mut self, new_value: &str) -> ManagementFilterGetCall<'a, C, NC, A> { self._filter_id = new_value.to_string(); self @@ -15202,7 +15640,7 @@ impl<'a, C, NC, A> ManagementFilterGetCall<'a, C, NC, A> where NC: hyper::net::N /// Lists webProperty-AdWords links for a given web property. /// /// A builder for the *webPropertyAdWordsLinks.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -15272,7 +15710,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> where for &field in ["alt", "accountId", "webPropertyId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15325,7 +15763,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> where } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15337,7 +15775,6 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> where dlg.pre_request(); req.send() - }; match req_result { @@ -15347,7 +15784,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> where continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15358,7 +15795,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> where continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15367,13 +15804,13 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> where Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15385,7 +15822,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> where /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the account which the given web property belongs to. + /// ID of the account which the given web property belongs to. pub fn account_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -15395,7 +15832,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> where /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to retrieve the AdWords links for. + /// Web property ID to retrieve the AdWords links for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -15403,7 +15840,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> where /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first webProperty-AdWords link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first webProperty-AdWords link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -15411,7 +15848,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> where /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of webProperty-AdWords links to include in this response. + /// The maximum number of webProperty-AdWords links to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -15472,7 +15909,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, NC, A> where /// Lists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access. /// /// A builder for the *accountSummaries.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -15538,7 +15975,7 @@ impl<'a, C, NC, A> ManagementAccountSummaryListCall<'a, C, NC, A> where NC: hype for &field in ["alt", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15567,7 +16004,7 @@ impl<'a, C, NC, A> ManagementAccountSummaryListCall<'a, C, NC, A> where NC: hype } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15579,7 +16016,6 @@ impl<'a, C, NC, A> ManagementAccountSummaryListCall<'a, C, NC, A> where NC: hype dlg.pre_request(); req.send() - }; match req_result { @@ -15589,7 +16025,7 @@ impl<'a, C, NC, A> ManagementAccountSummaryListCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15600,7 +16036,7 @@ impl<'a, C, NC, A> ManagementAccountSummaryListCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15609,13 +16045,13 @@ impl<'a, C, NC, A> ManagementAccountSummaryListCall<'a, C, NC, A> where NC: hype Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15625,7 +16061,7 @@ impl<'a, C, NC, A> ManagementAccountSummaryListCall<'a, C, NC, A> where NC: hype /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementAccountSummaryListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -15633,7 +16069,7 @@ impl<'a, C, NC, A> ManagementAccountSummaryListCall<'a, C, NC, A> where NC: hype /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of account summaries to include in this response, where the largest acceptable value is 1000. + /// The maximum number of account summaries to include in this response, where the largest acceptable value is 1000. pub fn max_results(mut self, new_value: i32) -> ManagementAccountSummaryListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -15694,7 +16130,7 @@ impl<'a, C, NC, A> ManagementAccountSummaryListCall<'a, C, NC, A> where NC: hype /// Lists custom dimensions to which the user has access. /// /// A builder for the *customDimensions.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -15764,7 +16200,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionListCall<'a, C, NC, A> where NC: hyp for &field in ["alt", "accountId", "webPropertyId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15817,7 +16253,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionListCall<'a, C, NC, A> where NC: hyp } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15829,7 +16265,6 @@ impl<'a, C, NC, A> ManagementCustomDimensionListCall<'a, C, NC, A> where NC: hyp dlg.pre_request(); req.send() - }; match req_result { @@ -15839,7 +16274,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionListCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15850,7 +16285,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionListCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15859,13 +16294,13 @@ impl<'a, C, NC, A> ManagementCustomDimensionListCall<'a, C, NC, A> where NC: hyp Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15877,7 +16312,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionListCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID for the custom dimensions to retrieve. + /// Account ID for the custom dimensions to retrieve. pub fn account_id(mut self, new_value: &str) -> ManagementCustomDimensionListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -15887,7 +16322,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionListCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID for the custom dimensions to retrieve. + /// Web property ID for the custom dimensions to retrieve. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomDimensionListCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -15895,7 +16330,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionListCall<'a, C, NC, A> where NC: hyp /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementCustomDimensionListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -15903,7 +16338,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionListCall<'a, C, NC, A> where NC: hyp /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of custom dimensions to include in this response. + /// The maximum number of custom dimensions to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementCustomDimensionListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -15964,7 +16399,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionListCall<'a, C, NC, A> where NC: hyp /// List uploads to which the user has access. /// /// A builder for the *uploads.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -16036,7 +16471,7 @@ impl<'a, C, NC, A> ManagementUploadListCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "accountId", "webPropertyId", "customDataSourceId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16089,7 +16524,7 @@ impl<'a, C, NC, A> ManagementUploadListCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16101,7 +16536,6 @@ impl<'a, C, NC, A> ManagementUploadListCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -16111,7 +16545,7 @@ impl<'a, C, NC, A> ManagementUploadListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16122,7 +16556,7 @@ impl<'a, C, NC, A> ManagementUploadListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16131,13 +16565,13 @@ impl<'a, C, NC, A> ManagementUploadListCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16149,7 +16583,7 @@ impl<'a, C, NC, A> ManagementUploadListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account Id for the uploads to retrieve. + /// Account Id for the uploads to retrieve. pub fn account_id(mut self, new_value: &str) -> ManagementUploadListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -16159,7 +16593,7 @@ impl<'a, C, NC, A> ManagementUploadListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property Id for the uploads to retrieve. + /// Web property Id for the uploads to retrieve. pub fn web_property_id(mut self, new_value: &str) -> ManagementUploadListCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -16169,7 +16603,7 @@ impl<'a, C, NC, A> ManagementUploadListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom data source Id for uploads to retrieve. + /// Custom data source Id for uploads to retrieve. pub fn custom_data_source_id(mut self, new_value: &str) -> ManagementUploadListCall<'a, C, NC, A> { self._custom_data_source_id = new_value.to_string(); self @@ -16177,7 +16611,7 @@ impl<'a, C, NC, A> ManagementUploadListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *start-index* query property to the given value. /// /// - /// A 1-based index of the first upload to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// A 1-based index of the first upload to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementUploadListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -16185,7 +16619,7 @@ impl<'a, C, NC, A> ManagementUploadListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of uploads to include in this response. + /// The maximum number of uploads to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementUploadListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -16246,7 +16680,7 @@ impl<'a, C, NC, A> ManagementUploadListCall<'a, C, NC, A> where NC: hyper::net:: /// Lists profile-user links for a given view (profile). /// /// A builder for the *profileUserLinks.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -16318,7 +16752,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkListCall<'a, C, NC, A> where NC: hyp for &field in ["alt", "accountId", "webPropertyId", "profileId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16371,7 +16805,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkListCall<'a, C, NC, A> where NC: hyp } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16383,7 +16817,6 @@ impl<'a, C, NC, A> ManagementProfileUserLinkListCall<'a, C, NC, A> where NC: hyp dlg.pre_request(); req.send() - }; match req_result { @@ -16393,7 +16826,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkListCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16404,7 +16837,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkListCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16413,13 +16846,13 @@ impl<'a, C, NC, A> ManagementProfileUserLinkListCall<'a, C, NC, A> where NC: hyp Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16431,7 +16864,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkListCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID which the given view (profile) belongs to. + /// Account ID which the given view (profile) belongs to. pub fn account_id(mut self, new_value: &str) -> ManagementProfileUserLinkListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -16441,7 +16874,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkListCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web Property ID which the given view (profile) belongs to. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. + /// Web Property ID which the given view (profile) belongs to. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileUserLinkListCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -16451,7 +16884,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkListCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to retrieve the profile-user links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to. + /// View (Profile) ID to retrieve the profile-user links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileUserLinkListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -16459,7 +16892,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkListCall<'a, C, NC, A> where NC: hyp /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first profile-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first profile-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementProfileUserLinkListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -16467,7 +16900,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkListCall<'a, C, NC, A> where NC: hyp /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of profile-user links to include in this response. + /// The maximum number of profile-user links to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementProfileUserLinkListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -16528,7 +16961,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkListCall<'a, C, NC, A> where NC: hyp /// Lists account-user links for a given account. /// /// A builder for the *accountUserLinks.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -16596,7 +17029,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkListCall<'a, C, NC, A> where NC: hyp for &field in ["alt", "accountId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16649,7 +17082,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkListCall<'a, C, NC, A> where NC: hyp } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16661,7 +17094,6 @@ impl<'a, C, NC, A> ManagementAccountUserLinkListCall<'a, C, NC, A> where NC: hyp dlg.pre_request(); req.send() - }; match req_result { @@ -16671,7 +17103,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkListCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16682,7 +17114,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkListCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16691,13 +17123,13 @@ impl<'a, C, NC, A> ManagementAccountUserLinkListCall<'a, C, NC, A> where NC: hyp Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16709,7 +17141,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkListCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to retrieve the user links for. + /// Account ID to retrieve the user links for. pub fn account_id(mut self, new_value: &str) -> ManagementAccountUserLinkListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -16717,7 +17149,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkListCall<'a, C, NC, A> where NC: hyp /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first account-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first account-user link to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementAccountUserLinkListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -16725,7 +17157,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkListCall<'a, C, NC, A> where NC: hyp /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of account-user links to include in this response. + /// The maximum number of account-user links to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementAccountUserLinkListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -16786,7 +17218,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkListCall<'a, C, NC, A> where NC: hyp /// Updates an existing custom metric. /// /// A builder for the *customMetrics.update* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -16860,7 +17292,7 @@ impl<'a, C, NC, A> ManagementCustomMetricUpdateCall<'a, C, NC, A> where NC: hype for &field in ["alt", "accountId", "webPropertyId", "customMetricId", "ignoreCustomDataSourceLinks"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16917,7 +17349,7 @@ impl<'a, C, NC, A> ManagementCustomMetricUpdateCall<'a, C, NC, A> where NC: hype } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16933,7 +17365,6 @@ impl<'a, C, NC, A> ManagementCustomMetricUpdateCall<'a, C, NC, A> where NC: hype dlg.pre_request(); req.send() - }; match req_result { @@ -16943,7 +17374,7 @@ impl<'a, C, NC, A> ManagementCustomMetricUpdateCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16954,7 +17385,7 @@ impl<'a, C, NC, A> ManagementCustomMetricUpdateCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16963,13 +17394,13 @@ impl<'a, C, NC, A> ManagementCustomMetricUpdateCall<'a, C, NC, A> where NC: hype Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16990,7 +17421,7 @@ impl<'a, C, NC, A> ManagementCustomMetricUpdateCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID for the custom metric to update. + /// Account ID for the custom metric to update. pub fn account_id(mut self, new_value: &str) -> ManagementCustomMetricUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -17000,7 +17431,7 @@ impl<'a, C, NC, A> ManagementCustomMetricUpdateCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID for the custom metric to update. + /// Web property ID for the custom metric to update. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomMetricUpdateCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -17010,7 +17441,7 @@ impl<'a, C, NC, A> ManagementCustomMetricUpdateCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom metric ID for the custom metric to update. + /// Custom metric ID for the custom metric to update. pub fn custom_metric_id(mut self, new_value: &str) -> ManagementCustomMetricUpdateCall<'a, C, NC, A> { self._custom_metric_id = new_value.to_string(); self @@ -17018,7 +17449,7 @@ impl<'a, C, NC, A> ManagementCustomMetricUpdateCall<'a, C, NC, A> where NC: hype /// Sets the *ignore custom data source links* query property to the given value. /// /// - /// Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set. + /// Force the update and ignore any warnings related to the custom metric being linked to a custom data source / data set. pub fn ignore_custom_data_source_links(mut self, new_value: bool) -> ManagementCustomMetricUpdateCall<'a, C, NC, A> { self._ignore_custom_data_source_links = Some(new_value); self @@ -17079,7 +17510,7 @@ impl<'a, C, NC, A> ManagementCustomMetricUpdateCall<'a, C, NC, A> where NC: hype /// Delete data associated with a previous upload. /// /// A builder for the *uploads.deleteUploadData* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -17148,7 +17579,7 @@ impl<'a, C, NC, A> ManagementUploadDeleteUploadDataCall<'a, C, NC, A> where NC: for &field in ["accountId", "webPropertyId", "customDataSourceId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17204,7 +17635,7 @@ impl<'a, C, NC, A> ManagementUploadDeleteUploadDataCall<'a, C, NC, A> where NC: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17220,7 +17651,6 @@ impl<'a, C, NC, A> ManagementUploadDeleteUploadDataCall<'a, C, NC, A> where NC: dlg.pre_request(); req.send() - }; match req_result { @@ -17230,7 +17660,7 @@ impl<'a, C, NC, A> ManagementUploadDeleteUploadDataCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17241,12 +17671,12 @@ impl<'a, C, NC, A> ManagementUploadDeleteUploadDataCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -17267,7 +17697,7 @@ impl<'a, C, NC, A> ManagementUploadDeleteUploadDataCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account Id for the uploads to be deleted. + /// Account Id for the uploads to be deleted. pub fn account_id(mut self, new_value: &str) -> ManagementUploadDeleteUploadDataCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -17277,7 +17707,7 @@ impl<'a, C, NC, A> ManagementUploadDeleteUploadDataCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property Id for the uploads to be deleted. + /// Web property Id for the uploads to be deleted. pub fn web_property_id(mut self, new_value: &str) -> ManagementUploadDeleteUploadDataCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -17287,7 +17717,7 @@ impl<'a, C, NC, A> ManagementUploadDeleteUploadDataCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Custom data source Id for the uploads to be deleted. + /// Custom data source Id for the uploads to be deleted. pub fn custom_data_source_id(mut self, new_value: &str) -> ManagementUploadDeleteUploadDataCall<'a, C, NC, A> { self._custom_data_source_id = new_value.to_string(); self @@ -17348,7 +17778,7 @@ impl<'a, C, NC, A> ManagementUploadDeleteUploadDataCall<'a, C, NC, A> where NC: /// Update an existing experiment. /// /// A builder for the *experiments.update* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -17419,7 +17849,7 @@ impl<'a, C, NC, A> ManagementExperimentUpdateCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "accountId", "webPropertyId", "profileId", "experimentId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17476,7 +17906,7 @@ impl<'a, C, NC, A> ManagementExperimentUpdateCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17492,7 +17922,6 @@ impl<'a, C, NC, A> ManagementExperimentUpdateCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -17502,7 +17931,7 @@ impl<'a, C, NC, A> ManagementExperimentUpdateCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17513,7 +17942,7 @@ impl<'a, C, NC, A> ManagementExperimentUpdateCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -17522,13 +17951,13 @@ impl<'a, C, NC, A> ManagementExperimentUpdateCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -17549,7 +17978,7 @@ impl<'a, C, NC, A> ManagementExperimentUpdateCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID of the experiment to update. + /// Account ID of the experiment to update. pub fn account_id(mut self, new_value: &str) -> ManagementExperimentUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -17559,7 +17988,7 @@ impl<'a, C, NC, A> ManagementExperimentUpdateCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID of the experiment to update. + /// Web property ID of the experiment to update. pub fn web_property_id(mut self, new_value: &str) -> ManagementExperimentUpdateCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -17569,7 +17998,7 @@ impl<'a, C, NC, A> ManagementExperimentUpdateCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID of the experiment to update. + /// View (Profile) ID of the experiment to update. pub fn profile_id(mut self, new_value: &str) -> ManagementExperimentUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -17579,7 +18008,7 @@ impl<'a, C, NC, A> ManagementExperimentUpdateCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Experiment ID of the experiment to update. + /// Experiment ID of the experiment to update. pub fn experiment_id(mut self, new_value: &str) -> ManagementExperimentUpdateCall<'a, C, NC, A> { self._experiment_id = new_value.to_string(); self @@ -17640,7 +18069,7 @@ impl<'a, C, NC, A> ManagementExperimentUpdateCall<'a, C, NC, A> where NC: hyper: /// Updates an existing view (profile). /// /// A builder for the *goals.update* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -17711,7 +18140,7 @@ impl<'a, C, NC, A> ManagementGoalUpdateCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "accountId", "webPropertyId", "profileId", "goalId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17768,7 +18197,7 @@ impl<'a, C, NC, A> ManagementGoalUpdateCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17784,7 +18213,6 @@ impl<'a, C, NC, A> ManagementGoalUpdateCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -17794,7 +18222,7 @@ impl<'a, C, NC, A> ManagementGoalUpdateCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17805,7 +18233,7 @@ impl<'a, C, NC, A> ManagementGoalUpdateCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -17814,13 +18242,13 @@ impl<'a, C, NC, A> ManagementGoalUpdateCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -17841,7 +18269,7 @@ impl<'a, C, NC, A> ManagementGoalUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to update the goal. + /// Account ID to update the goal. pub fn account_id(mut self, new_value: &str) -> ManagementGoalUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -17851,7 +18279,7 @@ impl<'a, C, NC, A> ManagementGoalUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to update the goal. + /// Web property ID to update the goal. pub fn web_property_id(mut self, new_value: &str) -> ManagementGoalUpdateCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -17861,7 +18289,7 @@ impl<'a, C, NC, A> ManagementGoalUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to update the goal. + /// View (Profile) ID to update the goal. pub fn profile_id(mut self, new_value: &str) -> ManagementGoalUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -17871,7 +18299,7 @@ impl<'a, C, NC, A> ManagementGoalUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Index of the goal to be updated. + /// Index of the goal to be updated. pub fn goal_id(mut self, new_value: &str) -> ManagementGoalUpdateCall<'a, C, NC, A> { self._goal_id = new_value.to_string(); self @@ -17932,7 +18360,7 @@ impl<'a, C, NC, A> ManagementGoalUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// List custom data sources to which the user has access. /// /// A builder for the *customDataSources.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -18002,7 +18430,7 @@ impl<'a, C, NC, A> ManagementCustomDataSourceListCall<'a, C, NC, A> where NC: hy for &field in ["alt", "accountId", "webPropertyId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18055,7 +18483,7 @@ impl<'a, C, NC, A> ManagementCustomDataSourceListCall<'a, C, NC, A> where NC: hy } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18067,7 +18495,6 @@ impl<'a, C, NC, A> ManagementCustomDataSourceListCall<'a, C, NC, A> where NC: hy dlg.pre_request(); req.send() - }; match req_result { @@ -18077,7 +18504,7 @@ impl<'a, C, NC, A> ManagementCustomDataSourceListCall<'a, C, NC, A> where NC: hy continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18088,7 +18515,7 @@ impl<'a, C, NC, A> ManagementCustomDataSourceListCall<'a, C, NC, A> where NC: hy continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -18097,13 +18524,13 @@ impl<'a, C, NC, A> ManagementCustomDataSourceListCall<'a, C, NC, A> where NC: hy Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18115,7 +18542,7 @@ impl<'a, C, NC, A> ManagementCustomDataSourceListCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account Id for the custom data sources to retrieve. + /// Account Id for the custom data sources to retrieve. pub fn account_id(mut self, new_value: &str) -> ManagementCustomDataSourceListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -18125,7 +18552,7 @@ impl<'a, C, NC, A> ManagementCustomDataSourceListCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property Id for the custom data sources to retrieve. + /// Web property Id for the custom data sources to retrieve. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomDataSourceListCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -18133,7 +18560,7 @@ impl<'a, C, NC, A> ManagementCustomDataSourceListCall<'a, C, NC, A> where NC: hy /// Sets the *start-index* query property to the given value. /// /// - /// A 1-based index of the first custom data source to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// A 1-based index of the first custom data source to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementCustomDataSourceListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -18141,7 +18568,7 @@ impl<'a, C, NC, A> ManagementCustomDataSourceListCall<'a, C, NC, A> where NC: hy /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of custom data sources to include in this response. + /// The maximum number of custom data sources to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementCustomDataSourceListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -18202,7 +18629,7 @@ impl<'a, C, NC, A> ManagementCustomDataSourceListCall<'a, C, NC, A> where NC: hy /// Lists custom metrics to which the user has access. /// /// A builder for the *customMetrics.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -18272,7 +18699,7 @@ impl<'a, C, NC, A> ManagementCustomMetricListCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "accountId", "webPropertyId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18325,7 +18752,7 @@ impl<'a, C, NC, A> ManagementCustomMetricListCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18337,7 +18764,6 @@ impl<'a, C, NC, A> ManagementCustomMetricListCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -18347,7 +18773,7 @@ impl<'a, C, NC, A> ManagementCustomMetricListCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18358,7 +18784,7 @@ impl<'a, C, NC, A> ManagementCustomMetricListCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -18367,13 +18793,13 @@ impl<'a, C, NC, A> ManagementCustomMetricListCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18385,7 +18811,7 @@ impl<'a, C, NC, A> ManagementCustomMetricListCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID for the custom metrics to retrieve. + /// Account ID for the custom metrics to retrieve. pub fn account_id(mut self, new_value: &str) -> ManagementCustomMetricListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -18395,7 +18821,7 @@ impl<'a, C, NC, A> ManagementCustomMetricListCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID for the custom metrics to retrieve. + /// Web property ID for the custom metrics to retrieve. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomMetricListCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -18403,7 +18829,7 @@ impl<'a, C, NC, A> ManagementCustomMetricListCall<'a, C, NC, A> where NC: hyper: /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementCustomMetricListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -18411,7 +18837,7 @@ impl<'a, C, NC, A> ManagementCustomMetricListCall<'a, C, NC, A> where NC: hyper: /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of custom metrics to include in this response. + /// The maximum number of custom metrics to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementCustomMetricListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -18472,7 +18898,7 @@ impl<'a, C, NC, A> ManagementCustomMetricListCall<'a, C, NC, A> where NC: hyper: /// Lists unsampled reports to which the user has access. /// /// A builder for the *unsampledReports.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -18544,7 +18970,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportListCall<'a, C, NC, A> where NC: hyp for &field in ["alt", "accountId", "webPropertyId", "profileId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18597,7 +19023,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportListCall<'a, C, NC, A> where NC: hyp } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18609,7 +19035,6 @@ impl<'a, C, NC, A> ManagementUnsampledReportListCall<'a, C, NC, A> where NC: hyp dlg.pre_request(); req.send() - }; match req_result { @@ -18619,7 +19044,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportListCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18630,7 +19055,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportListCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -18639,13 +19064,13 @@ impl<'a, C, NC, A> ManagementUnsampledReportListCall<'a, C, NC, A> where NC: hyp Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18657,7 +19082,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportListCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to retrieve unsampled reports for. Must be a specific account ID, ~all is not supported. + /// Account ID to retrieve unsampled reports for. Must be a specific account ID, ~all is not supported. pub fn account_id(mut self, new_value: &str) -> ManagementUnsampledReportListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -18667,7 +19092,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportListCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to retrieve unsampled reports for. Must be a specific web property ID, ~all is not supported. + /// Web property ID to retrieve unsampled reports for. Must be a specific web property ID, ~all is not supported. pub fn web_property_id(mut self, new_value: &str) -> ManagementUnsampledReportListCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -18677,7 +19102,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportListCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to retrieve unsampled reports for. Must be a specific view (profile) ID, ~all is not supported. + /// View (Profile) ID to retrieve unsampled reports for. Must be a specific view (profile) ID, ~all is not supported. pub fn profile_id(mut self, new_value: &str) -> ManagementUnsampledReportListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -18685,7 +19110,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportListCall<'a, C, NC, A> where NC: hyp /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first unsampled report to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first unsampled report to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementUnsampledReportListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -18693,7 +19118,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportListCall<'a, C, NC, A> where NC: hyp /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of unsampled reports to include in this response. + /// The maximum number of unsampled reports to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementUnsampledReportListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -18754,7 +19179,7 @@ impl<'a, C, NC, A> ManagementUnsampledReportListCall<'a, C, NC, A> where NC: hyp /// Gets a web property to which the user has access. /// /// A builder for the *webproperties.get* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -18814,7 +19239,7 @@ impl<'a, C, NC, A> ManagementWebpropertyGetCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "accountId", "webPropertyId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18867,7 +19292,7 @@ impl<'a, C, NC, A> ManagementWebpropertyGetCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18879,7 +19304,6 @@ impl<'a, C, NC, A> ManagementWebpropertyGetCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -18889,7 +19313,7 @@ impl<'a, C, NC, A> ManagementWebpropertyGetCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18900,7 +19324,7 @@ impl<'a, C, NC, A> ManagementWebpropertyGetCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -18909,13 +19333,13 @@ impl<'a, C, NC, A> ManagementWebpropertyGetCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18927,7 +19351,7 @@ impl<'a, C, NC, A> ManagementWebpropertyGetCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to retrieve the web property for. + /// Account ID to retrieve the web property for. pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -18937,7 +19361,7 @@ impl<'a, C, NC, A> ManagementWebpropertyGetCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID to retrieve the web property for. + /// ID to retrieve the web property for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebpropertyGetCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -18998,7 +19422,7 @@ impl<'a, C, NC, A> ManagementWebpropertyGetCall<'a, C, NC, A> where NC: hyper::n /// Create a new experiment. /// /// A builder for the *experiments.insert* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -19067,7 +19491,7 @@ impl<'a, C, NC, A> ManagementExperimentInsertCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "accountId", "webPropertyId", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19124,7 +19548,7 @@ impl<'a, C, NC, A> ManagementExperimentInsertCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19140,7 +19564,6 @@ impl<'a, C, NC, A> ManagementExperimentInsertCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -19150,7 +19573,7 @@ impl<'a, C, NC, A> ManagementExperimentInsertCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19161,7 +19584,7 @@ impl<'a, C, NC, A> ManagementExperimentInsertCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19170,13 +19593,13 @@ impl<'a, C, NC, A> ManagementExperimentInsertCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19197,7 +19620,7 @@ impl<'a, C, NC, A> ManagementExperimentInsertCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to create the experiment for. + /// Account ID to create the experiment for. pub fn account_id(mut self, new_value: &str) -> ManagementExperimentInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -19207,7 +19630,7 @@ impl<'a, C, NC, A> ManagementExperimentInsertCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to create the experiment for. + /// Web property ID to create the experiment for. pub fn web_property_id(mut self, new_value: &str) -> ManagementExperimentInsertCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -19217,7 +19640,7 @@ impl<'a, C, NC, A> ManagementExperimentInsertCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to create the experiment for. + /// View (Profile) ID to create the experiment for. pub fn profile_id(mut self, new_value: &str) -> ManagementExperimentInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -19278,7 +19701,7 @@ impl<'a, C, NC, A> ManagementExperimentInsertCall<'a, C, NC, A> where NC: hyper: /// Get a custom dimension to which the user has access. /// /// A builder for the *customDimensions.get* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -19340,7 +19763,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionGetCall<'a, C, NC, A> where NC: hype for &field in ["alt", "accountId", "webPropertyId", "customDimensionId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19393,7 +19816,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionGetCall<'a, C, NC, A> where NC: hype } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19405,7 +19828,6 @@ impl<'a, C, NC, A> ManagementCustomDimensionGetCall<'a, C, NC, A> where NC: hype dlg.pre_request(); req.send() - }; match req_result { @@ -19415,7 +19837,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionGetCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19426,7 +19848,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionGetCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19435,13 +19857,13 @@ impl<'a, C, NC, A> ManagementCustomDimensionGetCall<'a, C, NC, A> where NC: hype Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19453,7 +19875,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionGetCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID for the custom dimension to retrieve. + /// Account ID for the custom dimension to retrieve. pub fn account_id(mut self, new_value: &str) -> ManagementCustomDimensionGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -19463,7 +19885,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionGetCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID for the custom dimension to retrieve. + /// Web property ID for the custom dimension to retrieve. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomDimensionGetCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -19473,7 +19895,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionGetCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the custom dimension to retrieve. + /// The ID of the custom dimension to retrieve. pub fn custom_dimension_id(mut self, new_value: &str) -> ManagementCustomDimensionGetCall<'a, C, NC, A> { self._custom_dimension_id = new_value.to_string(); self @@ -19534,7 +19956,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionGetCall<'a, C, NC, A> where NC: hype /// Lists all profile filter links for a profile. /// /// A builder for the *profileFilterLinks.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -19606,7 +20028,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkListCall<'a, C, NC, A> where NC: h for &field in ["alt", "accountId", "webPropertyId", "profileId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19659,7 +20081,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkListCall<'a, C, NC, A> where NC: h } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19671,7 +20093,6 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkListCall<'a, C, NC, A> where NC: h dlg.pre_request(); req.send() - }; match req_result { @@ -19681,7 +20102,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkListCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19692,7 +20113,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkListCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19701,13 +20122,13 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkListCall<'a, C, NC, A> where NC: h Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19719,7 +20140,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkListCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to retrieve profile filter links for. + /// Account ID to retrieve profile filter links for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileFilterLinkListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -19729,7 +20150,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkListCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property Id for profile filter links for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. + /// Web property Id for profile filter links for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileFilterLinkListCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -19739,7 +20160,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkListCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Profile ID to retrieve filter links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to. + /// Profile ID to retrieve filter links for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileFilterLinkListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -19747,7 +20168,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkListCall<'a, C, NC, A> where NC: h /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementProfileFilterLinkListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -19755,7 +20176,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkListCall<'a, C, NC, A> where NC: h /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of profile filter links to include in this response. + /// The maximum number of profile filter links to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementProfileFilterLinkListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -19816,7 +20237,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkListCall<'a, C, NC, A> where NC: h /// Updates an existing web property. This method supports patch semantics. /// /// A builder for the *webproperties.patch* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -19883,7 +20304,7 @@ impl<'a, C, NC, A> ManagementWebpropertyPatchCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "accountId", "webPropertyId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19940,7 +20361,7 @@ impl<'a, C, NC, A> ManagementWebpropertyPatchCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19956,7 +20377,6 @@ impl<'a, C, NC, A> ManagementWebpropertyPatchCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -19966,7 +20386,7 @@ impl<'a, C, NC, A> ManagementWebpropertyPatchCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19977,7 +20397,7 @@ impl<'a, C, NC, A> ManagementWebpropertyPatchCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19986,13 +20406,13 @@ impl<'a, C, NC, A> ManagementWebpropertyPatchCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -20013,7 +20433,7 @@ impl<'a, C, NC, A> ManagementWebpropertyPatchCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to which the web property belongs + /// Account ID to which the web property belongs pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyPatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -20023,7 +20443,7 @@ impl<'a, C, NC, A> ManagementWebpropertyPatchCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID + /// Web property ID pub fn web_property_id(mut self, new_value: &str) -> ManagementWebpropertyPatchCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -20084,7 +20504,7 @@ impl<'a, C, NC, A> ManagementWebpropertyPatchCall<'a, C, NC, A> where NC: hyper: /// Create a new custom dimension. /// /// A builder for the *customDimensions.insert* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -20151,7 +20571,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionInsertCall<'a, C, NC, A> where NC: h for &field in ["alt", "accountId", "webPropertyId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -20208,7 +20628,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionInsertCall<'a, C, NC, A> where NC: h } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -20224,7 +20644,6 @@ impl<'a, C, NC, A> ManagementCustomDimensionInsertCall<'a, C, NC, A> where NC: h dlg.pre_request(); req.send() - }; match req_result { @@ -20234,7 +20653,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionInsertCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -20245,7 +20664,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionInsertCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -20254,13 +20673,13 @@ impl<'a, C, NC, A> ManagementCustomDimensionInsertCall<'a, C, NC, A> where NC: h Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -20281,7 +20700,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionInsertCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID for the custom dimension to create. + /// Account ID for the custom dimension to create. pub fn account_id(mut self, new_value: &str) -> ManagementCustomDimensionInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -20291,7 +20710,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionInsertCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID for the custom dimension to create. + /// Web property ID for the custom dimension to create. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomDimensionInsertCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -20352,7 +20771,7 @@ impl<'a, C, NC, A> ManagementCustomDimensionInsertCall<'a, C, NC, A> where NC: h /// Create a new custom metric. /// /// A builder for the *customMetrics.insert* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -20419,7 +20838,7 @@ impl<'a, C, NC, A> ManagementCustomMetricInsertCall<'a, C, NC, A> where NC: hype for &field in ["alt", "accountId", "webPropertyId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -20476,7 +20895,7 @@ impl<'a, C, NC, A> ManagementCustomMetricInsertCall<'a, C, NC, A> where NC: hype } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -20492,7 +20911,6 @@ impl<'a, C, NC, A> ManagementCustomMetricInsertCall<'a, C, NC, A> where NC: hype dlg.pre_request(); req.send() - }; match req_result { @@ -20502,7 +20920,7 @@ impl<'a, C, NC, A> ManagementCustomMetricInsertCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -20513,7 +20931,7 @@ impl<'a, C, NC, A> ManagementCustomMetricInsertCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -20522,13 +20940,13 @@ impl<'a, C, NC, A> ManagementCustomMetricInsertCall<'a, C, NC, A> where NC: hype Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -20549,7 +20967,7 @@ impl<'a, C, NC, A> ManagementCustomMetricInsertCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID for the custom metric to create. + /// Account ID for the custom metric to create. pub fn account_id(mut self, new_value: &str) -> ManagementCustomMetricInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -20559,7 +20977,7 @@ impl<'a, C, NC, A> ManagementCustomMetricInsertCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID for the custom dimension to create. + /// Web property ID for the custom dimension to create. pub fn web_property_id(mut self, new_value: &str) -> ManagementCustomMetricInsertCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -20620,7 +21038,7 @@ impl<'a, C, NC, A> ManagementCustomMetricInsertCall<'a, C, NC, A> where NC: hype /// Adds a new user to the given view (profile). /// /// A builder for the *profileUserLinks.insert* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -20689,7 +21107,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkInsertCall<'a, C, NC, A> where NC: h for &field in ["alt", "accountId", "webPropertyId", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -20746,7 +21164,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkInsertCall<'a, C, NC, A> where NC: h } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -20762,7 +21180,6 @@ impl<'a, C, NC, A> ManagementProfileUserLinkInsertCall<'a, C, NC, A> where NC: h dlg.pre_request(); req.send() - }; match req_result { @@ -20772,7 +21189,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkInsertCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -20783,7 +21200,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkInsertCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -20792,13 +21209,13 @@ impl<'a, C, NC, A> ManagementProfileUserLinkInsertCall<'a, C, NC, A> where NC: h Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -20819,7 +21236,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkInsertCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to create the user link for. + /// Account ID to create the user link for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileUserLinkInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -20829,7 +21246,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkInsertCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web Property ID to create the user link for. + /// Web Property ID to create the user link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileUserLinkInsertCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -20839,7 +21256,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkInsertCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to create the user link for. + /// View (Profile) ID to create the user link for. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileUserLinkInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -20900,7 +21317,7 @@ impl<'a, C, NC, A> ManagementProfileUserLinkInsertCall<'a, C, NC, A> where NC: h /// Lists web properties to which the user has access. /// /// A builder for the *webproperties.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -20968,7 +21385,7 @@ impl<'a, C, NC, A> ManagementWebpropertyListCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt", "accountId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -21021,7 +21438,7 @@ impl<'a, C, NC, A> ManagementWebpropertyListCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -21033,7 +21450,6 @@ impl<'a, C, NC, A> ManagementWebpropertyListCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -21043,7 +21459,7 @@ impl<'a, C, NC, A> ManagementWebpropertyListCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -21054,7 +21470,7 @@ impl<'a, C, NC, A> ManagementWebpropertyListCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -21063,13 +21479,13 @@ impl<'a, C, NC, A> ManagementWebpropertyListCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -21081,7 +21497,7 @@ impl<'a, C, NC, A> ManagementWebpropertyListCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to retrieve web properties for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to. + /// Account ID to retrieve web properties for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to. pub fn account_id(mut self, new_value: &str) -> ManagementWebpropertyListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -21089,7 +21505,7 @@ impl<'a, C, NC, A> ManagementWebpropertyListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementWebpropertyListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -21097,7 +21513,7 @@ impl<'a, C, NC, A> ManagementWebpropertyListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of web properties to include in this response. + /// The maximum number of web properties to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementWebpropertyListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -21158,7 +21574,7 @@ impl<'a, C, NC, A> ManagementWebpropertyListCall<'a, C, NC, A> where NC: hyper:: /// Creates a webProperty-AdWords link. /// /// A builder for the *webPropertyAdWordsLinks.insert* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -21225,7 +21641,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, NC, A> wher for &field in ["alt", "accountId", "webPropertyId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -21282,7 +21698,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, NC, A> wher } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -21298,7 +21714,6 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, NC, A> wher dlg.pre_request(); req.send() - }; match req_result { @@ -21308,7 +21723,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, NC, A> wher continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -21319,7 +21734,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, NC, A> wher continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -21328,13 +21743,13 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, NC, A> wher Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -21355,7 +21770,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, NC, A> wher /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the Google Analytics account to create the link for. + /// ID of the Google Analytics account to create the link for. pub fn account_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -21365,7 +21780,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, NC, A> wher /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to create the link for. + /// Web property ID to create the link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -21426,7 +21841,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, NC, A> wher /// Updates an existing webProperty-AdWords link. This method supports patch semantics. /// /// A builder for the *webPropertyAdWordsLinks.patch* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -21495,7 +21910,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, NC, A> where for &field in ["alt", "accountId", "webPropertyId", "webPropertyAdWordsLinkId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -21552,7 +21967,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, NC, A> where } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -21568,7 +21983,6 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, NC, A> where dlg.pre_request(); req.send() - }; match req_result { @@ -21578,7 +21992,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, NC, A> where continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -21589,7 +22003,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, NC, A> where continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -21598,13 +22012,13 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, NC, A> where Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -21625,7 +22039,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, NC, A> where /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the account which the given web property belongs to. + /// ID of the account which the given web property belongs to. pub fn account_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -21635,7 +22049,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, NC, A> where /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to retrieve the AdWords link for. + /// Web property ID to retrieve the AdWords link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -21645,7 +22059,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, NC, A> where /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property-AdWords link ID. + /// Web property-AdWords link ID. pub fn web_property_ad_words_link_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, NC, A> { self._web_property_ad_words_link_id = new_value.to_string(); self @@ -21706,7 +22120,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, NC, A> where /// Gets a goal to which the user has access. /// /// A builder for the *goals.get* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -21770,7 +22184,7 @@ impl<'a, C, NC, A> ManagementGoalGetCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "accountId", "webPropertyId", "profileId", "goalId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -21823,7 +22237,7 @@ impl<'a, C, NC, A> ManagementGoalGetCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -21835,7 +22249,6 @@ impl<'a, C, NC, A> ManagementGoalGetCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -21845,7 +22258,7 @@ impl<'a, C, NC, A> ManagementGoalGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -21856,7 +22269,7 @@ impl<'a, C, NC, A> ManagementGoalGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -21865,13 +22278,13 @@ impl<'a, C, NC, A> ManagementGoalGetCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -21883,7 +22296,7 @@ impl<'a, C, NC, A> ManagementGoalGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to retrieve the goal for. + /// Account ID to retrieve the goal for. pub fn account_id(mut self, new_value: &str) -> ManagementGoalGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -21893,7 +22306,7 @@ impl<'a, C, NC, A> ManagementGoalGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to retrieve the goal for. + /// Web property ID to retrieve the goal for. pub fn web_property_id(mut self, new_value: &str) -> ManagementGoalGetCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -21903,7 +22316,7 @@ impl<'a, C, NC, A> ManagementGoalGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// View (Profile) ID to retrieve the goal for. + /// View (Profile) ID to retrieve the goal for. pub fn profile_id(mut self, new_value: &str) -> ManagementGoalGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -21913,7 +22326,7 @@ impl<'a, C, NC, A> ManagementGoalGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Goal ID to retrieve the goal for. + /// Goal ID to retrieve the goal for. pub fn goal_id(mut self, new_value: &str) -> ManagementGoalGetCall<'a, C, NC, A> { self._goal_id = new_value.to_string(); self @@ -21974,7 +22387,7 @@ impl<'a, C, NC, A> ManagementGoalGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Deletes a web property-AdWords link. /// /// A builder for the *webPropertyAdWordsLinks.delete* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -22036,7 +22449,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, NC, A> wher for &field in ["accountId", "webPropertyId", "webPropertyAdWordsLinkId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -22088,7 +22501,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, NC, A> wher } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -22100,7 +22513,6 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, NC, A> wher dlg.pre_request(); req.send() - }; match req_result { @@ -22110,7 +22522,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, NC, A> wher continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -22121,12 +22533,12 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, NC, A> wher continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -22138,7 +22550,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, NC, A> wher /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the account which the given web property belongs to. + /// ID of the account which the given web property belongs to. pub fn account_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -22148,7 +22560,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, NC, A> wher /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to delete the AdWords link for. + /// Web property ID to delete the AdWords link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -22158,7 +22570,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, NC, A> wher /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property AdWords link ID. + /// Web property AdWords link ID. pub fn web_property_ad_words_link_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, NC, A> { self._web_property_ad_words_link_id = new_value.to_string(); self @@ -22219,7 +22631,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, NC, A> wher /// Updates an existing webProperty-AdWords link. /// /// A builder for the *webPropertyAdWordsLinks.update* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -22288,7 +22700,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, NC, A> wher for &field in ["alt", "accountId", "webPropertyId", "webPropertyAdWordsLinkId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -22345,7 +22757,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, NC, A> wher } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -22361,7 +22773,6 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, NC, A> wher dlg.pre_request(); req.send() - }; match req_result { @@ -22371,7 +22782,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, NC, A> wher continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -22382,7 +22793,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, NC, A> wher continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -22391,13 +22802,13 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, NC, A> wher Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -22418,7 +22829,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, NC, A> wher /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the account which the given web property belongs to. + /// ID of the account which the given web property belongs to. pub fn account_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -22428,7 +22839,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, NC, A> wher /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to retrieve the AdWords link for. + /// Web property ID to retrieve the AdWords link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -22438,7 +22849,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, NC, A> wher /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property-AdWords link ID. + /// Web property-AdWords link ID. pub fn web_property_ad_words_link_id(mut self, new_value: &str) -> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, NC, A> { self._web_property_ad_words_link_id = new_value.to_string(); self @@ -22499,7 +22910,7 @@ impl<'a, C, NC, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, NC, A> wher /// Updates an existing filter. This method supports patch semantics. /// /// A builder for the *filters.patch* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -22566,7 +22977,7 @@ impl<'a, C, NC, A> ManagementFilterPatchCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "accountId", "filterId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -22623,7 +23034,7 @@ impl<'a, C, NC, A> ManagementFilterPatchCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -22639,7 +23050,6 @@ impl<'a, C, NC, A> ManagementFilterPatchCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -22649,7 +23059,7 @@ impl<'a, C, NC, A> ManagementFilterPatchCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -22660,7 +23070,7 @@ impl<'a, C, NC, A> ManagementFilterPatchCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -22669,13 +23079,13 @@ impl<'a, C, NC, A> ManagementFilterPatchCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -22696,7 +23106,7 @@ impl<'a, C, NC, A> ManagementFilterPatchCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to which the filter belongs. + /// Account ID to which the filter belongs. pub fn account_id(mut self, new_value: &str) -> ManagementFilterPatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -22706,7 +23116,7 @@ impl<'a, C, NC, A> ManagementFilterPatchCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the filter to be updated. + /// ID of the filter to be updated. pub fn filter_id(mut self, new_value: &str) -> ManagementFilterPatchCall<'a, C, NC, A> { self._filter_id = new_value.to_string(); self @@ -22767,7 +23177,7 @@ impl<'a, C, NC, A> ManagementFilterPatchCall<'a, C, NC, A> where NC: hyper::net: /// Lists all filters for an account /// /// A builder for the *filters.list* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -22835,7 +23245,7 @@ impl<'a, C, NC, A> ManagementFilterListCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "accountId", "start-index", "max-results"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -22888,7 +23298,7 @@ impl<'a, C, NC, A> ManagementFilterListCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -22900,7 +23310,6 @@ impl<'a, C, NC, A> ManagementFilterListCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -22910,7 +23319,7 @@ impl<'a, C, NC, A> ManagementFilterListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -22921,7 +23330,7 @@ impl<'a, C, NC, A> ManagementFilterListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -22930,13 +23339,13 @@ impl<'a, C, NC, A> ManagementFilterListCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -22948,7 +23357,7 @@ impl<'a, C, NC, A> ManagementFilterListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to retrieve filters for. + /// Account ID to retrieve filters for. pub fn account_id(mut self, new_value: &str) -> ManagementFilterListCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -22956,7 +23365,7 @@ impl<'a, C, NC, A> ManagementFilterListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> ManagementFilterListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -22964,7 +23373,7 @@ impl<'a, C, NC, A> ManagementFilterListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of filters to include in this response. + /// The maximum number of filters to include in this response. pub fn max_results(mut self, new_value: i32) -> ManagementFilterListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -23025,7 +23434,7 @@ impl<'a, C, NC, A> ManagementFilterListCall<'a, C, NC, A> where NC: hyper::net:: /// Delete a filter. /// /// A builder for the *filters.delete* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -23085,7 +23494,7 @@ impl<'a, C, NC, A> ManagementFilterDeleteCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "accountId", "filterId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -23138,7 +23547,7 @@ impl<'a, C, NC, A> ManagementFilterDeleteCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -23150,7 +23559,6 @@ impl<'a, C, NC, A> ManagementFilterDeleteCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -23160,7 +23568,7 @@ impl<'a, C, NC, A> ManagementFilterDeleteCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -23171,7 +23579,7 @@ impl<'a, C, NC, A> ManagementFilterDeleteCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -23180,13 +23588,13 @@ impl<'a, C, NC, A> ManagementFilterDeleteCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -23198,7 +23606,7 @@ impl<'a, C, NC, A> ManagementFilterDeleteCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to delete the filter for. + /// Account ID to delete the filter for. pub fn account_id(mut self, new_value: &str) -> ManagementFilterDeleteCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -23208,7 +23616,7 @@ impl<'a, C, NC, A> ManagementFilterDeleteCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the filter to be deleted. + /// ID of the filter to be deleted. pub fn filter_id(mut self, new_value: &str) -> ManagementFilterDeleteCall<'a, C, NC, A> { self._filter_id = new_value.to_string(); self @@ -23269,7 +23677,7 @@ impl<'a, C, NC, A> ManagementFilterDeleteCall<'a, C, NC, A> where NC: hyper::net /// Create a new view (profile). /// /// A builder for the *profiles.insert* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -23336,7 +23744,7 @@ impl<'a, C, NC, A> ManagementProfileInsertCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "accountId", "webPropertyId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -23393,7 +23801,7 @@ impl<'a, C, NC, A> ManagementProfileInsertCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -23409,7 +23817,6 @@ impl<'a, C, NC, A> ManagementProfileInsertCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -23419,7 +23826,7 @@ impl<'a, C, NC, A> ManagementProfileInsertCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -23430,7 +23837,7 @@ impl<'a, C, NC, A> ManagementProfileInsertCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -23439,13 +23846,13 @@ impl<'a, C, NC, A> ManagementProfileInsertCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -23466,7 +23873,7 @@ impl<'a, C, NC, A> ManagementProfileInsertCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to create the view (profile) for. + /// Account ID to create the view (profile) for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileInsertCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -23476,7 +23883,7 @@ impl<'a, C, NC, A> ManagementProfileInsertCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to create the view (profile) for. + /// Web property ID to create the view (profile) for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileInsertCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -23537,7 +23944,7 @@ impl<'a, C, NC, A> ManagementProfileInsertCall<'a, C, NC, A> where NC: hyper::ne /// Removes a user from the given account. /// /// A builder for the *accountUserLinks.delete* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -23597,7 +24004,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkDeleteCall<'a, C, NC, A> where NC: h for &field in ["accountId", "linkId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -23649,7 +24056,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkDeleteCall<'a, C, NC, A> where NC: h } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -23661,7 +24068,6 @@ impl<'a, C, NC, A> ManagementAccountUserLinkDeleteCall<'a, C, NC, A> where NC: h dlg.pre_request(); req.send() - }; match req_result { @@ -23671,7 +24077,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkDeleteCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -23682,12 +24088,12 @@ impl<'a, C, NC, A> ManagementAccountUserLinkDeleteCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -23699,7 +24105,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkDeleteCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to delete the user link for. + /// Account ID to delete the user link for. pub fn account_id(mut self, new_value: &str) -> ManagementAccountUserLinkDeleteCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -23709,7 +24115,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkDeleteCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Link ID to delete the user link for. + /// Link ID to delete the user link for. pub fn link_id(mut self, new_value: &str) -> ManagementAccountUserLinkDeleteCall<'a, C, NC, A> { self._link_id = new_value.to_string(); self @@ -23770,7 +24176,7 @@ impl<'a, C, NC, A> ManagementAccountUserLinkDeleteCall<'a, C, NC, A> where NC: h /// Updates an existing view (profile). /// /// A builder for the *profiles.update* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -23839,7 +24245,7 @@ impl<'a, C, NC, A> ManagementProfileUpdateCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "accountId", "webPropertyId", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -23896,7 +24302,7 @@ impl<'a, C, NC, A> ManagementProfileUpdateCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -23912,7 +24318,6 @@ impl<'a, C, NC, A> ManagementProfileUpdateCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -23922,7 +24327,7 @@ impl<'a, C, NC, A> ManagementProfileUpdateCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -23933,7 +24338,7 @@ impl<'a, C, NC, A> ManagementProfileUpdateCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -23942,13 +24347,13 @@ impl<'a, C, NC, A> ManagementProfileUpdateCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -23969,7 +24374,7 @@ impl<'a, C, NC, A> ManagementProfileUpdateCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to which the view (profile) belongs + /// Account ID to which the view (profile) belongs pub fn account_id(mut self, new_value: &str) -> ManagementProfileUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -23979,7 +24384,7 @@ impl<'a, C, NC, A> ManagementProfileUpdateCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property ID to which the view (profile) belongs + /// Web property ID to which the view (profile) belongs pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileUpdateCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -23989,7 +24394,7 @@ impl<'a, C, NC, A> ManagementProfileUpdateCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the view (profile) to be updated. + /// ID of the view (profile) to be updated. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -24050,7 +24455,7 @@ impl<'a, C, NC, A> ManagementProfileUpdateCall<'a, C, NC, A> where NC: hyper::ne /// Returns a single profile filter link. /// /// A builder for the *profileFilterLinks.get* method supported by a *management* resource. -/// It is not used directly, but through a `ManagementMethods`. +/// It is not used directly, but through a `ManagementMethods` instance. /// /// # Example /// @@ -24114,7 +24519,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkGetCall<'a, C, NC, A> where NC: hy for &field in ["alt", "accountId", "webPropertyId", "profileId", "linkId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -24167,7 +24572,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkGetCall<'a, C, NC, A> where NC: hy } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -24179,7 +24584,6 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkGetCall<'a, C, NC, A> where NC: hy dlg.pre_request(); req.send() - }; match req_result { @@ -24189,7 +24593,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkGetCall<'a, C, NC, A> where NC: hy continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -24200,7 +24604,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkGetCall<'a, C, NC, A> where NC: hy continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -24209,13 +24613,13 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkGetCall<'a, C, NC, A> where NC: hy Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -24227,7 +24631,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkGetCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID to retrieve profile filter link for. + /// Account ID to retrieve profile filter link for. pub fn account_id(mut self, new_value: &str) -> ManagementProfileFilterLinkGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -24237,7 +24641,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkGetCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Web property Id to retrieve profile filter link for. + /// Web property Id to retrieve profile filter link for. pub fn web_property_id(mut self, new_value: &str) -> ManagementProfileFilterLinkGetCall<'a, C, NC, A> { self._web_property_id = new_value.to_string(); self @@ -24247,7 +24651,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkGetCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Profile ID to retrieve filter link for. + /// Profile ID to retrieve filter link for. pub fn profile_id(mut self, new_value: &str) -> ManagementProfileFilterLinkGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -24257,7 +24661,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkGetCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the profile filter link. + /// ID of the profile filter link. pub fn link_id(mut self, new_value: &str) -> ManagementProfileFilterLinkGetCall<'a, C, NC, A> { self._link_id = new_value.to_string(); self @@ -24318,7 +24722,7 @@ impl<'a, C, NC, A> ManagementProfileFilterLinkGetCall<'a, C, NC, A> where NC: hy /// Returns Analytics Multi-Channel Funnels data for a view (profile). /// /// A builder for the *mcf.get* method supported by a *data* resource. -/// It is not used directly, but through a `DataMethods`. +/// It is not used directly, but through a `DataMethods` instance. /// /// # Example /// @@ -24412,7 +24816,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "ids", "start-date", "end-date", "metrics", "start-index", "sort", "samplingLevel", "max-results", "filters", "dimensions"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -24441,7 +24845,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -24453,7 +24857,6 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -24463,7 +24866,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -24474,7 +24877,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -24483,13 +24886,13 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -24501,7 +24904,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. + /// Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. pub fn ids(mut self, new_value: &str) -> DataMcfGetCall<'a, C, NC, A> { self._ids = new_value.to_string(); self @@ -24511,7 +24914,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. + /// Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. pub fn start_date(mut self, new_value: &str) -> DataMcfGetCall<'a, C, NC, A> { self._start_date = new_value.to_string(); self @@ -24521,7 +24924,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// End date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. + /// End date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. pub fn end_date(mut self, new_value: &str) -> DataMcfGetCall<'a, C, NC, A> { self._end_date = new_value.to_string(); self @@ -24531,7 +24934,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// A comma-separated list of Multi-Channel Funnels metrics. E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must be specified. + /// A comma-separated list of Multi-Channel Funnels metrics. E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must be specified. pub fn metrics(mut self, new_value: &str) -> DataMcfGetCall<'a, C, NC, A> { self._metrics = new_value.to_string(); self @@ -24539,7 +24942,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> DataMcfGetCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -24547,7 +24950,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *sort* query property to the given value. /// /// - /// A comma-separated list of dimensions or metrics that determine the sort order for the Analytics data. + /// A comma-separated list of dimensions or metrics that determine the sort order for the Analytics data. pub fn sort(mut self, new_value: &str) -> DataMcfGetCall<'a, C, NC, A> { self._sort = Some(new_value.to_string()); self @@ -24555,7 +24958,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *sampling level* query property to the given value. /// /// - /// The desired sampling level. + /// The desired sampling level. pub fn sampling_level(mut self, new_value: &str) -> DataMcfGetCall<'a, C, NC, A> { self._sampling_level = Some(new_value.to_string()); self @@ -24563,7 +24966,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of entries to include in this feed. + /// The maximum number of entries to include in this feed. pub fn max_results(mut self, new_value: i32) -> DataMcfGetCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -24571,7 +24974,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *filters* query property to the given value. /// /// - /// A comma-separated list of dimension or metric filters to be applied to the Analytics data. + /// A comma-separated list of dimension or metric filters to be applied to the Analytics data. pub fn filters(mut self, new_value: &str) -> DataMcfGetCall<'a, C, NC, A> { self._filters = Some(new_value.to_string()); self @@ -24579,7 +24982,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *dimensions* query property to the given value. /// /// - /// A comma-separated list of Multi-Channel Funnels dimensions. E.g., 'mcf:source,mcf:medium'. + /// A comma-separated list of Multi-Channel Funnels dimensions. E.g., 'mcf:source,mcf:medium'. pub fn dimensions(mut self, new_value: &str) -> DataMcfGetCall<'a, C, NC, A> { self._dimensions = Some(new_value.to_string()); self @@ -24640,7 +25043,7 @@ impl<'a, C, NC, A> DataMcfGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Returns Analytics data for a view (profile). /// /// A builder for the *ga.get* method supported by a *data* resource. -/// It is not used directly, but through a `DataMethods`. +/// It is not used directly, but through a `DataMethods` instance. /// /// # Example /// @@ -24744,7 +25147,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "ids", "start-date", "end-date", "metrics", "start-index", "sort", "segment", "samplingLevel", "output", "max-results", "filters", "dimensions"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -24773,7 +25176,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -24785,7 +25188,6 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -24795,7 +25197,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -24806,7 +25208,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -24815,13 +25217,13 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -24833,7 +25235,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. + /// Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. pub fn ids(mut self, new_value: &str) -> DataGaGetCall<'a, C, NC, A> { self._ids = new_value.to_string(); self @@ -24843,7 +25245,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. + /// Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo. pub fn start_date(mut self, new_value: &str) -> DataGaGetCall<'a, C, NC, A> { self._start_date = new_value.to_string(); self @@ -24853,7 +25255,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is yesterday. + /// End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is yesterday. pub fn end_date(mut self, new_value: &str) -> DataGaGetCall<'a, C, NC, A> { self._end_date = new_value.to_string(); self @@ -24863,7 +25265,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric must be specified. + /// A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric must be specified. pub fn metrics(mut self, new_value: &str) -> DataGaGetCall<'a, C, NC, A> { self._metrics = new_value.to_string(); self @@ -24871,7 +25273,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *start-index* query property to the given value. /// /// - /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. + /// An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. pub fn start_index(mut self, new_value: i32) -> DataGaGetCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -24879,7 +25281,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *sort* query property to the given value. /// /// - /// A comma-separated list of dimensions or metrics that determine the sort order for Analytics data. + /// A comma-separated list of dimensions or metrics that determine the sort order for Analytics data. pub fn sort(mut self, new_value: &str) -> DataGaGetCall<'a, C, NC, A> { self._sort = Some(new_value.to_string()); self @@ -24887,7 +25289,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *segment* query property to the given value. /// /// - /// An Analytics segment to be applied to data. + /// An Analytics segment to be applied to data. pub fn segment(mut self, new_value: &str) -> DataGaGetCall<'a, C, NC, A> { self._segment = Some(new_value.to_string()); self @@ -24895,7 +25297,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *sampling level* query property to the given value. /// /// - /// The desired sampling level. + /// The desired sampling level. pub fn sampling_level(mut self, new_value: &str) -> DataGaGetCall<'a, C, NC, A> { self._sampling_level = Some(new_value.to_string()); self @@ -24903,7 +25305,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *output* query property to the given value. /// /// - /// The selected format for the response. Default format is JSON. + /// The selected format for the response. Default format is JSON. pub fn output(mut self, new_value: &str) -> DataGaGetCall<'a, C, NC, A> { self._output = Some(new_value.to_string()); self @@ -24911,7 +25313,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of entries to include in this feed. + /// The maximum number of entries to include in this feed. pub fn max_results(mut self, new_value: i32) -> DataGaGetCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -24919,7 +25321,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *filters* query property to the given value. /// /// - /// A comma-separated list of dimension or metric filters to be applied to Analytics data. + /// A comma-separated list of dimension or metric filters to be applied to Analytics data. pub fn filters(mut self, new_value: &str) -> DataGaGetCall<'a, C, NC, A> { self._filters = Some(new_value.to_string()); self @@ -24927,7 +25329,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *dimensions* query property to the given value. /// /// - /// A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'. + /// A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'. pub fn dimensions(mut self, new_value: &str) -> DataGaGetCall<'a, C, NC, A> { self._dimensions = Some(new_value.to_string()); self @@ -24988,7 +25390,7 @@ impl<'a, C, NC, A> DataGaGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Returns real time data for a view (profile). /// /// A builder for the *realtime.get* method supported by a *data* resource. -/// It is not used directly, but through a `DataMethods`. +/// It is not used directly, but through a `DataMethods` instance. /// /// # Example /// @@ -25068,7 +25470,7 @@ impl<'a, C, NC, A> DataRealtimeGetCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "ids", "metrics", "sort", "max-results", "filters", "dimensions"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -25097,7 +25499,7 @@ impl<'a, C, NC, A> DataRealtimeGetCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -25109,7 +25511,6 @@ impl<'a, C, NC, A> DataRealtimeGetCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -25119,7 +25520,7 @@ impl<'a, C, NC, A> DataRealtimeGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -25130,7 +25531,7 @@ impl<'a, C, NC, A> DataRealtimeGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -25139,13 +25540,13 @@ impl<'a, C, NC, A> DataRealtimeGetCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -25157,7 +25558,7 @@ impl<'a, C, NC, A> DataRealtimeGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique table ID for retrieving real time data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. + /// Unique table ID for retrieving real time data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. pub fn ids(mut self, new_value: &str) -> DataRealtimeGetCall<'a, C, NC, A> { self._ids = new_value.to_string(); self @@ -25167,7 +25568,7 @@ impl<'a, C, NC, A> DataRealtimeGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// A comma-separated list of real time metrics. E.g., 'rt:activeUsers'. At least one metric must be specified. + /// A comma-separated list of real time metrics. E.g., 'rt:activeUsers'. At least one metric must be specified. pub fn metrics(mut self, new_value: &str) -> DataRealtimeGetCall<'a, C, NC, A> { self._metrics = new_value.to_string(); self @@ -25175,7 +25576,7 @@ impl<'a, C, NC, A> DataRealtimeGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *sort* query property to the given value. /// /// - /// A comma-separated list of dimensions or metrics that determine the sort order for real time data. + /// A comma-separated list of dimensions or metrics that determine the sort order for real time data. pub fn sort(mut self, new_value: &str) -> DataRealtimeGetCall<'a, C, NC, A> { self._sort = Some(new_value.to_string()); self @@ -25183,7 +25584,7 @@ impl<'a, C, NC, A> DataRealtimeGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *max-results* query property to the given value. /// /// - /// The maximum number of entries to include in this feed. + /// The maximum number of entries to include in this feed. pub fn max_results(mut self, new_value: i32) -> DataRealtimeGetCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -25191,7 +25592,7 @@ impl<'a, C, NC, A> DataRealtimeGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *filters* query property to the given value. /// /// - /// A comma-separated list of dimension or metric filters to be applied to real time data. + /// A comma-separated list of dimension or metric filters to be applied to real time data. pub fn filters(mut self, new_value: &str) -> DataRealtimeGetCall<'a, C, NC, A> { self._filters = Some(new_value.to_string()); self @@ -25199,7 +25600,7 @@ impl<'a, C, NC, A> DataRealtimeGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *dimensions* query property to the given value. /// /// - /// A comma-separated list of real time dimensions. E.g., 'rt:medium,rt:city'. + /// A comma-separated list of real time dimensions. E.g., 'rt:medium,rt:city'. pub fn dimensions(mut self, new_value: &str) -> DataRealtimeGetCall<'a, C, NC, A> { self._dimensions = Some(new_value.to_string()); self @@ -25260,7 +25661,7 @@ impl<'a, C, NC, A> DataRealtimeGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Creates an account ticket. /// /// A builder for the *createAccountTicket* method supported by a *provisioning* resource. -/// It is not used directly, but through a `ProvisioningMethods`. +/// It is not used directly, but through a `ProvisioningMethods` instance. /// /// # Example /// @@ -25323,7 +25724,7 @@ impl<'a, C, NC, A> ProvisioningCreateAccountTicketCall<'a, C, NC, A> where NC: h for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -25356,7 +25757,7 @@ impl<'a, C, NC, A> ProvisioningCreateAccountTicketCall<'a, C, NC, A> where NC: h } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -25372,7 +25773,6 @@ impl<'a, C, NC, A> ProvisioningCreateAccountTicketCall<'a, C, NC, A> where NC: h dlg.pre_request(); req.send() - }; match req_result { @@ -25382,7 +25782,7 @@ impl<'a, C, NC, A> ProvisioningCreateAccountTicketCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -25393,7 +25793,7 @@ impl<'a, C, NC, A> ProvisioningCreateAccountTicketCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -25402,13 +25802,13 @@ impl<'a, C, NC, A> ProvisioningCreateAccountTicketCall<'a, C, NC, A> where NC: h Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -25480,7 +25880,7 @@ impl<'a, C, NC, A> ProvisioningCreateAccountTicketCall<'a, C, NC, A> where NC: h /// Lists all columns for a report type /// /// A builder for the *columns.list* method supported by a *metadata* resource. -/// It is not used directly, but through a `MetadataMethods`. +/// It is not used directly, but through a `MetadataMethods` instance. /// /// # Example /// @@ -25538,7 +25938,7 @@ impl<'a, C, NC, A> MetadataColumnListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "reportType"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -25591,7 +25991,7 @@ impl<'a, C, NC, A> MetadataColumnListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -25603,7 +26003,6 @@ impl<'a, C, NC, A> MetadataColumnListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -25613,7 +26012,7 @@ impl<'a, C, NC, A> MetadataColumnListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -25624,7 +26023,7 @@ impl<'a, C, NC, A> MetadataColumnListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -25633,13 +26032,13 @@ impl<'a, C, NC, A> MetadataColumnListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -25651,7 +26050,7 @@ impl<'a, C, NC, A> MetadataColumnListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Report type. Allowed Values: 'ga'. Where 'ga' corresponds to the Core Reporting API + /// Report type. Allowed Values: 'ga'. Where 'ga' corresponds to the Core Reporting API pub fn report_type(mut self, new_value: &str) -> MetadataColumnListCall<'a, C, NC, A> { self._report_type = new_value.to_string(); self diff --git a/gen/androidenterprise1/Cargo.toml b/gen/androidenterprise1/Cargo.toml index 782cc0ecd5..03b451b7b9 100644 --- a/gen/androidenterprise1/Cargo.toml +++ b/gen/androidenterprise1/Cargo.toml @@ -4,11 +4,10 @@ [package] name = "google-androidenterprise1" -version = "0.1.1+20150218" +version = "0.1.2+20141112" authors = ["Sebastian Thiel "] description = "A complete library to interact with Android Enterprise (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/androidenterprise1" -homepage = "https://developers.google.com/play/enterprise" documentation = "http://byron.github.io/google-apis-rs/google-androidenterprise1" license = "MIT" keywords = ["androidenterprise", "google", "protocol", "web", "api"] @@ -16,7 +15,7 @@ keywords = ["androidenterprise", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/androidenterprise1/README.md b/gen/androidenterprise1/README.md index 364642b44e..22419d672e 100644 --- a/gen/androidenterprise1/README.md +++ b/gen/androidenterprise1/README.md @@ -1,14 +1,11 @@ The `google-androidenterprise1` library allows access to all features of the *Google Android Enterprise* service. -This documentation was generated from *Android Enterprise* crate version *0.1.1+20150218*, where *20150218* is the exact revision of the *androidenterprise:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. - -Everything else about the *Android Enterprise* *v1* API can be found at the -[official documentation site](https://developers.google.com/play/enterprise). +This documentation was generated from *Android Enterprise* crate version *0.1.2+20141112*, where *20141112* is the exact revision of the *androidenterprise:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. # Features Handle the following *Resources* with ease from the central [hub](http://byron.github.io/google-apis-rs/google-androidenterprise1/struct.AndroidEnterprise.html) ... @@ -45,6 +42,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-androidenterprise1/struct.AndroidEnterprise.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-androidenterprise1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-androidenterprise1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-androidenterprise1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -54,6 +53,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-androidenterprise1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -95,7 +96,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-androidenterprise1" as androidenterprise1; use androidenterprise1::Enterprise; -use androidenterprise1::Result; +use androidenterprise1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use androidenterprise1::AndroidEnterprise; @@ -124,15 +125,17 @@ let result = hub.enterprises().insert(&req, "token") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -145,7 +148,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-androidenterprise1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-androidenterprise1/trait.ResponseResult.html), it will return that by default. @@ -168,8 +171,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-androidenterpr ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-androidenterprise1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-androidenterprise1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-androidenterprise1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-androidenterprise1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-androidenterprise1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/androidenterprise1/src/cmn.rs b/gen/androidenterprise1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/androidenterprise1/src/cmn.rs +++ b/gen/androidenterprise1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/androidenterprise1/src/lib.rs b/gen/androidenterprise1/src/lib.rs index 440c644a6d..030e04f97e 100644 --- a/gen/androidenterprise1/src/lib.rs +++ b/gen/androidenterprise1/src/lib.rs @@ -1,11 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Android Enterprise* crate version *0.1.1+20150218*, where *20150218* is the exact revision of the *androidenterprise:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. -//! -//! Everything else about the *Android Enterprise* *v1* API can be found at the -//! [official documentation site](https://developers.google.com/play/enterprise). +//! This documentation was generated from *Android Enterprise* crate version *0.1.2+20141112*, where *20141112* is the exact revision of the *androidenterprise:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/androidenterprise1). //! # Features //! @@ -45,6 +42,8 @@ //! //! * **[Hub](struct.AndroidEnterprise.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -54,6 +53,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -95,7 +96,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-androidenterprise1" as androidenterprise1; //! use androidenterprise1::Enterprise; -//! use androidenterprise1::Result; +//! use androidenterprise1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -125,15 +126,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -146,7 +149,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -169,8 +172,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -219,7 +223,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -266,7 +270,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-androidenterprise1" as androidenterprise1; /// use androidenterprise1::Enterprise; -/// use androidenterprise1::Result; +/// use androidenterprise1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -296,15 +300,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -325,7 +331,7 @@ impl<'a, C, NC, A> AndroidEnterprise AndroidEnterprise { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -365,7 +371,7 @@ impl<'a, C, NC, A> AndroidEnterprise } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -390,7 +396,7 @@ impl<'a, C, NC, A> AndroidEnterprise /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AppRestrictionsSchema { - /// The set of restrictions that make up this schema. + /// The set of restrictions that make up this schema. pub restrictions: Vec, } @@ -403,21 +409,21 @@ impl ResponseResult for AppRestrictionsSchema {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AppRestrictionsSchemaRestriction { - /// The type of the restriction. + /// The type of the restriction. #[serde(alias="restrictionType")] pub restriction_type: String, - /// A longer description of the restriction, giving more detail of what it affects. + /// A longer description of the restriction, giving more detail of what it affects. pub description: String, - /// The unique key that the product uses to identify the restriction, e.g. "com.google.android.gm.fieldname". + /// The unique key that the product uses to identify the restriction, e.g. "com.google.android.gm.fieldname". pub key: String, - /// The name of the restriction. + /// The name of the restriction. pub title: String, - /// For choice or multiselect restrictions, the list of possible entries' human-readable names. + /// For choice or multiselect restrictions, the list of possible entries' human-readable names. pub entry: Vec, - /// The default value of the restriction. + /// The default value of the restriction. #[serde(alias="defaultValue")] pub default_value: AppRestrictionsSchemaRestrictionRestrictionValue, - /// For choice or multiselect restrictions, the list of possible entries' machine-readable values. + /// For choice or multiselect restrictions, the list of possible entries' machine-readable values. #[serde(alias="entryValue")] pub entry_value: Vec, } @@ -431,19 +437,19 @@ impl Part for AppRestrictionsSchemaRestriction {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AppRestrictionsSchemaRestrictionRestrictionValue { - /// The boolean value - this will only be present if type is bool. + /// The boolean value - this will only be present if type is bool. #[serde(alias="valueBool")] pub value_bool: bool, - /// The integer value - this will only be present if type is integer. + /// The integer value - this will only be present if type is integer. #[serde(alias="valueInteger")] pub value_integer: i32, - /// The type of the value being provided. + /// The type of the value being provided. #[serde(alias="type")] pub type_: String, - /// The list of string values - this will only be present if type is multiselect. + /// The list of string values - this will only be present if type is multiselect. #[serde(alias="valueMultiselect")] pub value_multiselect: Vec, - /// The string value - this will be present for types string, choice and hidden. + /// The string value - this will be present for types string, choice and hidden. #[serde(alias="valueString")] pub value_string: String, } @@ -462,9 +468,9 @@ impl Part for AppRestrictionsSchemaRestrictionRestrictionValue {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct EnterprisesListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprisesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprisesListResponse". pub kind: String, - /// An enterprise. + /// An enterprise. pub enterprise: Vec, } @@ -494,11 +500,11 @@ impl ResponseResult for EnterprisesListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Entitlement { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlement". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlement". pub kind: Option, - /// The reason for the entitlement, e.g. "free" for free apps. This is temporary, it will be replaced by the acquisition kind field of group licenses. + /// The reason for the entitlement, e.g. "free" for free apps. This is temporary, it will be replaced by the acquisition kind field of group licenses. pub reason: Option, - /// The ID of the product that the entitlement is for, e.g. "app:com.google.android.gm". + /// The ID of the product that the entitlement is for, e.g. "app:com.google.android.gm". #[serde(alias="productId")] pub product_id: Option, } @@ -519,9 +525,9 @@ impl ResponseResult for Entitlement {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InstallsListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#installsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#installsListResponse". pub kind: String, - /// An installation of an app for a user on a specific device. The existence of an install implies that the user must have an entitlement to the app. + /// An installation of an app for a user on a specific device. The existence of an install implies that the user must have an entitlement to the app. pub install: Vec, } @@ -539,9 +545,9 @@ impl ResponseResult for InstallsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CollectionViewersListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#collectionViewersListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#collectionViewersListResponse". pub kind: String, - /// A user of an enterprise. + /// A user of an enterprise. pub user: Vec, } @@ -559,9 +565,9 @@ impl ResponseResult for CollectionViewersListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DevicesListResponse { - /// A managed device. + /// A managed device. pub device: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#devicesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#devicesListResponse". pub kind: String, } @@ -593,15 +599,15 @@ impl ResponseResult for DevicesListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Install { - /// Install state. The state "installPending" means that an install request has recently been made and download to the device is in progress. The state "installed" means that the app has been installed. This field is read-only. + /// Install state. The state "installPending" means that an install request has recently been made and download to the device is in progress. The state "installed" means that the app has been installed. This field is read-only. #[serde(alias="installState")] pub install_state: Option, - /// The version of the installed product. Guaranteed to be set only if the install state is "installed". + /// The version of the installed product. Guaranteed to be set only if the install state is "installed". #[serde(alias="versionCode")] pub version_code: Option, - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#install". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#install". pub kind: Option, - /// The ID of the product that the install is for, e.g. "app:com.google.android.gm". + /// The ID of the product that the install is for, e.g. "app:com.google.android.gm". #[serde(alias="productId")] pub product_id: Option, } @@ -636,14 +642,14 @@ impl ResponseResult for Install {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Enterprise { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterprise". pub kind: Option, - /// The enterprise's primary domain, e.g. "example.com". + /// The enterprise's primary domain, e.g. "example.com". #[serde(alias="primaryDomain")] pub primary_domain: Option, - /// The unique ID for the enterprise. + /// The unique ID for the enterprise. pub id: Option, - /// The name of the enterprise, e.g. "Example Inc". + /// The name of the enterprise, e.g. "Example Inc". pub name: Option, } @@ -663,12 +669,12 @@ impl ResponseResult for Enterprise {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UserToken { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#userToken". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#userToken". pub kind: String, - /// The unique ID for the user. + /// The unique ID for the user. #[serde(alias="userId")] pub user_id: String, - /// The token (activation code) to be entered by the user. This consists of a sequence of decimal digits. Note that the leading digit may be 0. + /// The token (activation code) to be entered by the user. This consists of a sequence of decimal digits. Note that the leading digit may be 0. pub token: String, } @@ -687,11 +693,11 @@ impl ResponseResult for UserToken {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductPermissions { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#productPermissions". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#productPermissions". pub kind: Option, - /// The permissions required by the app. + /// The permissions required by the app. pub permission: Option>, - /// The ID of the app that the permissions relate to, e.g. "app:com.google.android.gm". + /// The ID of the app that the permissions relate to, e.g. "app:com.google.android.gm". #[serde(alias="productId")] pub product_id: Option, } @@ -712,9 +718,9 @@ impl ResponseResult for ProductPermissions {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DeviceState { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#deviceState". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#deviceState". pub kind: Option, - /// The state of the Google account on the device. "enabled" indicates that the Google account on the device can be used to access Google services (including Google Play), while "disabled" means that it cannot. A new device is initially in the "disabled" state. + /// The state of the Google account on the device. "enabled" indicates that the Google account on the device can be used to access Google services (including Google Play), while "disabled" means that it cannot. A new device is initially in the "disabled" state. #[serde(alias="accountState")] pub account_state: Option, } @@ -731,10 +737,10 @@ impl ResponseResult for DeviceState {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductPermission { - /// An opaque string uniquely identifying the permission. + /// An opaque string uniquely identifying the permission. #[serde(alias="permissionId")] pub permission_id: String, - /// Whether the permission has been accepted or not. + /// Whether the permission has been accepted or not. pub state: String, } @@ -757,20 +763,20 @@ impl Part for ProductPermission {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Product { - /// A link to an image that can be used as an icon for the product. + /// A link to an image that can be used as an icon for the product. #[serde(alias="iconUrl")] pub icon_url: String, - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#product". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#product". pub kind: String, - /// The name of the product. + /// The name of the product. pub title: String, - /// A link to the (consumer) Google Play details page for the product. + /// A link to the (consumer) Google Play details page for the product. #[serde(alias="detailsUrl")] pub details_url: String, - /// A link to the Google Play for Work details page for the product, for use by an Enterprise administrator. + /// A link to the Google Play for Work details page for the product, for use by an Enterprise administrator. #[serde(alias="workDetailsUrl")] pub work_details_url: String, - /// The name of the author of the product (e.g. the app developer). + /// The name of the author of the product (e.g. the app developer). #[serde(alias="authorName")] pub author_name: String, /// A string of the form "app: @@ -796,14 +802,14 @@ impl ResponseResult for Product {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Permission { - /// An opaque string uniquely identifying the permission. + /// An opaque string uniquely identifying the permission. #[serde(alias="permissionId")] pub permission_id: String, - /// A longer description of the permissions giving more details of what it affects. + /// A longer description of the permissions giving more details of what it affects. pub description: String, - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#permission". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#permission". pub kind: String, - /// The name of the permission. + /// The name of the permission. pub name: String, } @@ -822,9 +828,9 @@ impl ResponseResult for Permission {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct EntitlementsListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlementsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#entitlementsListResponse". pub kind: String, - /// An entitlement of a user to a product (e.g. an app). For example, a free app that they have installed, or a paid app that they have been allocated a license to. + /// An entitlement of a user to a product (e.g. an app). For example, a free app that they have installed, or a paid app that they have been allocated a license to. pub entitlement: Vec, } @@ -842,9 +848,9 @@ impl ResponseResult for EntitlementsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UsersListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#usersListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#usersListResponse". pub kind: String, - /// A user of an enterprise. + /// A user of an enterprise. pub user: Vec, } @@ -869,16 +875,16 @@ impl ResponseResult for UsersListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Collection { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#collection". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#collection". pub kind: Option, - /// Arbitrary unique ID, allocated by the API on creation. + /// Arbitrary unique ID, allocated by the API on creation. #[serde(alias="collectionId")] pub collection_id: Option, - /// A user-friendly name for the collection (should be unique), e.g. "Accounting apps". + /// A user-friendly name for the collection (should be unique), e.g. "Accounting apps". pub name: Option, - /// Whether this collection is visible to all users, or only to the users that have been granted access through the collection_viewers api. Even if a collection is visible to allUsers, it is possible to add and remove viewers, but this will have no effect until the collection's visibility changes to viewersOnly. + /// Whether this collection is visible to all users, or only to the users that have been granted access through the collection_viewers api. Even if a collection is visible to allUsers, it is possible to add and remove viewers, but this will have no effect until the collection's visibility changes to viewersOnly. pub visibility: Option, - /// The IDs of the products in the collection, in the order in which they should be displayed. + /// The IDs of the products in the collection, in the order in which they should be displayed. #[serde(alias="productId")] pub product_id: Option>, } @@ -899,9 +905,9 @@ impl ResponseResult for Collection {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CollectionsListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#collectionsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#collectionsListResponse". pub kind: String, - /// An ordered collection of products which can be made visible on the Google Play Store app to a selected group of users. + /// An ordered collection of products which can be made visible on the Google Play Store app to a selected group of users. pub collection: Vec, } @@ -929,12 +935,12 @@ impl ResponseResult for CollectionsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct User { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#user". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#user". pub kind: Option, - /// The user's primary email, e.g. "jsmith@example.com". + /// The user's primary email, e.g. "jsmith@example.com". #[serde(alias="primaryEmail")] pub primary_email: Option, - /// The unique ID for the user. + /// The unique ID for the user. pub id: Option, } @@ -954,9 +960,9 @@ impl ResponseResult for User {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct GroupLicenseUsersListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#groupLicenseUsersListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#groupLicenseUsersListResponse". pub kind: String, - /// A user of an enterprise. + /// A user of an enterprise. pub user: Vec, } @@ -974,9 +980,9 @@ impl ResponseResult for GroupLicenseUsersListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EnterpriseAccount { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterpriseAccount". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#enterpriseAccount". pub kind: Option, - /// The email address of the service account. + /// The email address of the service account. #[serde(alias="accountEmail")] pub account_email: Option, } @@ -1001,9 +1007,9 @@ impl ResponseResult for EnterpriseAccount {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Device { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#device". pub kind: String, - /// The Google Play Services Android ID for the device encoded as a lowercase hex string, e.g. "123456789abcdef0". + /// The Google Play Services Android ID for the device encoded as a lowercase hex string, e.g. "123456789abcdef0". #[serde(alias="androidId")] pub android_id: String, } @@ -1027,20 +1033,20 @@ impl ResponseResult for Device {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct GroupLicense { - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#groupLicense". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#groupLicense". pub kind: String, - /// The number of purchased licenses (possibly in multiple purchases). If this field is omitted then there is no limit on the number of licenses that can be provisioned (e.g. if the acquisition kind is "free"). + /// The number of purchased licenses (possibly in multiple purchases). If this field is omitted then there is no limit on the number of licenses that can be provisioned (e.g. if the acquisition kind is "free"). #[serde(alias="numPurchased")] pub num_purchased: i32, - /// The total number of provisioned licenses for this product. Returned by read operations, but ignored in write operations. + /// The total number of provisioned licenses for this product. Returned by read operations, but ignored in write operations. #[serde(alias="numProvisioned")] pub num_provisioned: i32, - /// How this group license was acquired. "bulkPurchase" means that this group license object was created because the enterprise purchased licenses for this product; this is "free" otherwise (for free products). + /// How this group license was acquired. "bulkPurchase" means that this group license object was created because the enterprise purchased licenses for this product; this is "free" otherwise (for free products). #[serde(alias="acquisitionKind")] pub acquisition_kind: String, - /// Whether the product to which this group license relates is currently approved by the enterprise, as either "approved" or "unapproved". Products are approved when a group license is first created, but this approval may be revoked by an enterprise admin via Google Play. Unapproved products will not be visible to end users in collections and new entitlements to them should not normally be created. + /// Whether the product to which this group license relates is currently approved by the enterprise, as either "approved" or "unapproved". Products are approved when a group license is first created, but this approval may be revoked by an enterprise admin via Google Play. Unapproved products will not be visible to end users in collections and new entitlements to them should not normally be created. pub approval: String, - /// The ID of the product that the license is for, e.g. "app:com.google.android.gm". + /// The ID of the product that the license is for, e.g. "app:com.google.android.gm". #[serde(alias="productId")] pub product_id: String, } @@ -1060,10 +1066,10 @@ impl ResponseResult for GroupLicense {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct GroupLicensesListResponse { - /// A group license for a product approved for use in the enterprise. + /// A group license for a product approved for use in the enterprise. #[serde(alias="groupLicense")] pub group_license: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#groupLicensesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidenterprise#groupLicensesListResponse". pub kind: String, } @@ -1109,13 +1115,19 @@ pub struct CollectionviewerMethods<'a, C, NC, A> hub: &'a AndroidEnterprise, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CollectionviewerMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CollectionviewerMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CollectionviewerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Removes the user from the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. + /// Removes the user from the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `collectionId` - The ID of the collection. + /// * `userId` - The ID of the user. pub fn delete(&self, enterprise_id: &str, collection_id: &str, user_id: &str) -> CollectionviewerDeleteCall<'a, C, NC, A> { CollectionviewerDeleteCall { hub: self.hub, @@ -1130,7 +1142,14 @@ impl<'a, C, NC, A> CollectionviewerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. This method supports patch semantics. + /// Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. + /// * `collectionId` - The ID of the collection. + /// * `userId` - The ID of the user. pub fn patch(&self, request: &User, enterprise_id: &str, collection_id: &str, user_id: &str) -> CollectionviewerPatchCall<'a, C, NC, A> { CollectionviewerPatchCall { hub: self.hub, @@ -1146,7 +1165,13 @@ impl<'a, C, NC, A> CollectionviewerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the ID of the user if they have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection. + /// Retrieves the ID of the user if they have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `collectionId` - The ID of the collection. + /// * `userId` - The ID of the user. pub fn get(&self, enterprise_id: &str, collection_id: &str, user_id: &str) -> CollectionviewerGetCall<'a, C, NC, A> { CollectionviewerGetCall { hub: self.hub, @@ -1161,7 +1186,12 @@ impl<'a, C, NC, A> CollectionviewerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the IDs of the users who have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection. + /// Retrieves the IDs of the users who have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `collectionId` - The ID of the collection. pub fn list(&self, enterprise_id: &str, collection_id: &str) -> CollectionviewerListCall<'a, C, NC, A> { CollectionviewerListCall { hub: self.hub, @@ -1175,7 +1205,14 @@ impl<'a, C, NC, A> CollectionviewerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. + /// Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. + /// * `collectionId` - The ID of the collection. + /// * `userId` - The ID of the user. pub fn update(&self, request: &User, enterprise_id: &str, collection_id: &str, user_id: &str) -> CollectionviewerUpdateCall<'a, C, NC, A> { CollectionviewerUpdateCall { hub: self.hub, @@ -1226,13 +1263,18 @@ pub struct UserMethods<'a, C, NC, A> hub: &'a AndroidEnterprise, } -impl<'a, C, NC, A> ResourceMethodsBuilder for UserMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for UserMethods<'a, C, NC, A> {} impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Revokes a previously generated token (activation code) for the user. + /// Revokes a previously generated token (activation code) for the user. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. pub fn revoke_token(&self, enterprise_id: &str, user_id: &str) -> UserRevokeTokenCall<'a, C, NC, A> { UserRevokeTokenCall { hub: self.hub, @@ -1246,7 +1288,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a user's details. + /// Retrieves a user's details. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. pub fn get(&self, enterprise_id: &str, user_id: &str) -> UserGetCall<'a, C, NC, A> { UserGetCall { hub: self.hub, @@ -1260,7 +1307,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Looks up a user by email address. + /// Looks up a user by email address. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `email` - The exact primary email address of the user to look up. pub fn list(&self, enterprise_id: &str, email: &str) -> UserListCall<'a, C, NC, A> { UserListCall { hub: self.hub, @@ -1274,7 +1326,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Generates a token (activation code) to allow this user to configure their work account in the Android Setup Wizard. Revokes any previously generated token. + /// Generates a token (activation code) to allow this user to configure their work account in the Android Setup Wizard. Revokes any previously generated token. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. pub fn generate_token(&self, enterprise_id: &str, user_id: &str) -> UserGenerateTokenCall<'a, C, NC, A> { UserGenerateTokenCall { hub: self.hub, @@ -1323,13 +1380,21 @@ pub struct InstallMethods<'a, C, NC, A> hub: &'a AndroidEnterprise, } -impl<'a, C, NC, A> ResourceMethodsBuilder for InstallMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for InstallMethods<'a, C, NC, A> {} impl<'a, C, NC, A> InstallMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. This method supports patch semantics. + /// Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `deviceId` - The Android ID of the device. + /// * `installId` - The ID of the product represented by the install, e.g. "app:com.google.android.gm". pub fn patch(&self, request: &Install, enterprise_id: &str, user_id: &str, device_id: &str, install_id: &str) -> InstallPatchCall<'a, C, NC, A> { InstallPatchCall { hub: self.hub, @@ -1346,7 +1411,14 @@ impl<'a, C, NC, A> InstallMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves details of an installation of an app on a device. + /// Retrieves details of an installation of an app on a device. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `deviceId` - The Android ID of the device. + /// * `installId` - The ID of the product represented by the install, e.g. "app:com.google.android.gm". pub fn get(&self, enterprise_id: &str, user_id: &str, device_id: &str, install_id: &str) -> InstallGetCall<'a, C, NC, A> { InstallGetCall { hub: self.hub, @@ -1362,7 +1434,13 @@ impl<'a, C, NC, A> InstallMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the details of all apps installed on the specified device. + /// Retrieves the details of all apps installed on the specified device. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `deviceId` - The Android ID of the device. pub fn list(&self, enterprise_id: &str, user_id: &str, device_id: &str) -> InstallListCall<'a, C, NC, A> { InstallListCall { hub: self.hub, @@ -1377,7 +1455,14 @@ impl<'a, C, NC, A> InstallMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Requests to remove an app from a device. A call to get or list will still show the app as installed on the device until it is actually removed. + /// Requests to remove an app from a device. A call to get or list will still show the app as installed on the device until it is actually removed. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `deviceId` - The Android ID of the device. + /// * `installId` - The ID of the product represented by the install, e.g. "app:com.google.android.gm". pub fn delete(&self, enterprise_id: &str, user_id: &str, device_id: &str, install_id: &str) -> InstallDeleteCall<'a, C, NC, A> { InstallDeleteCall { hub: self.hub, @@ -1393,7 +1478,15 @@ impl<'a, C, NC, A> InstallMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. + /// Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `deviceId` - The Android ID of the device. + /// * `installId` - The ID of the product represented by the install, e.g. "app:com.google.android.gm". pub fn update(&self, request: &Install, enterprise_id: &str, user_id: &str, device_id: &str, install_id: &str) -> InstallUpdateCall<'a, C, NC, A> { InstallUpdateCall { hub: self.hub, @@ -1445,13 +1538,20 @@ pub struct DeviceMethods<'a, C, NC, A> hub: &'a AndroidEnterprise, } -impl<'a, C, NC, A> ResourceMethodsBuilder for DeviceMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for DeviceMethods<'a, C, NC, A> {} impl<'a, C, NC, A> DeviceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Sets whether a device is enabled or disabled for access by the user to Google services. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. + /// Sets whether a device is enabled or disabled for access by the user to Google services. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `deviceId` - The ID of the device. pub fn set_state(&self, request: &DeviceState, enterprise_id: &str, user_id: &str, device_id: &str) -> DeviceSetStateCall<'a, C, NC, A> { DeviceSetStateCall { hub: self.hub, @@ -1467,7 +1567,13 @@ impl<'a, C, NC, A> DeviceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves whether a device is enabled or disabled for access by the user to Google services. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. + /// Retrieves whether a device is enabled or disabled for access by the user to Google services. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `deviceId` - The ID of the device. pub fn get_state(&self, enterprise_id: &str, user_id: &str, device_id: &str) -> DeviceGetStateCall<'a, C, NC, A> { DeviceGetStateCall { hub: self.hub, @@ -1482,7 +1588,12 @@ impl<'a, C, NC, A> DeviceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the IDs of all of a user's devices. + /// Retrieves the IDs of all of a user's devices. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. pub fn list(&self, enterprise_id: &str, user_id: &str) -> DeviceListCall<'a, C, NC, A> { DeviceListCall { hub: self.hub, @@ -1496,7 +1607,13 @@ impl<'a, C, NC, A> DeviceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the details of a device. + /// Retrieves the details of a device. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `deviceId` - The ID of the device. pub fn get(&self, enterprise_id: &str, user_id: &str, device_id: &str) -> DeviceGetCall<'a, C, NC, A> { DeviceGetCall { hub: self.hub, @@ -1546,13 +1663,17 @@ pub struct EnterpriseMethods<'a, C, NC, A> hub: &'a AndroidEnterprise, } -impl<'a, C, NC, A> ResourceMethodsBuilder for EnterpriseMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for EnterpriseMethods<'a, C, NC, A> {} impl<'a, C, NC, A> EnterpriseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Unenrolls an enterprise from the calling MDM. + /// Unenrolls an enterprise from the calling MDM. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. pub fn unenroll(&self, enterprise_id: &str) -> EnterpriseUnenrollCall<'a, C, NC, A> { EnterpriseUnenrollCall { hub: self.hub, @@ -1565,7 +1686,12 @@ impl<'a, C, NC, A> EnterpriseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Establishes the binding between the MDM and an enterprise. This is now deprecated; use enroll instead. + /// Establishes the binding between the MDM and an enterprise. This is now deprecated; use enroll instead. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `token` - The token provided by the enterprise to register the MDM. pub fn insert(&self, request: &Enterprise, token: &str) -> EnterpriseInsertCall<'a, C, NC, A> { EnterpriseInsertCall { hub: self.hub, @@ -1579,7 +1705,11 @@ impl<'a, C, NC, A> EnterpriseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Looks up an enterprise by domain name. + /// Looks up an enterprise by domain name. + /// + /// # Arguments + /// + /// * `domain` - The exact primary domain name of the enterprise to look up. pub fn list(&self, domain: &str) -> EnterpriseListCall<'a, C, NC, A> { EnterpriseListCall { hub: self.hub, @@ -1592,7 +1722,11 @@ impl<'a, C, NC, A> EnterpriseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the name and domain of an enterprise. + /// Retrieves the name and domain of an enterprise. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. pub fn get(&self, enterprise_id: &str) -> EnterpriseGetCall<'a, C, NC, A> { EnterpriseGetCall { hub: self.hub, @@ -1605,7 +1739,12 @@ impl<'a, C, NC, A> EnterpriseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Enrolls an enterprise with the calling MDM. + /// Enrolls an enterprise with the calling MDM. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `token` - The token provided by the enterprise to register the MDM. pub fn enroll(&self, request: &Enterprise, token: &str) -> EnterpriseEnrollCall<'a, C, NC, A> { EnterpriseEnrollCall { hub: self.hub, @@ -1619,7 +1758,12 @@ impl<'a, C, NC, A> EnterpriseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Set the account that will be used to authenticate to the API as the enterprise. + /// Set the account that will be used to authenticate to the API as the enterprise. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. pub fn set_account(&self, request: &EnterpriseAccount, enterprise_id: &str) -> EnterpriseSetAccountCall<'a, C, NC, A> { EnterpriseSetAccountCall { hub: self.hub, @@ -1633,7 +1777,11 @@ impl<'a, C, NC, A> EnterpriseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the binding between the MDM and enterprise. This is now deprecated; use this to unenroll customers that were previously enrolled with the 'insert' call, then enroll them again with the 'enroll' call. + /// Deletes the binding between the MDM and enterprise. This is now deprecated; use this to unenroll customers that were previously enrolled with the 'insert' call, then enroll them again with the 'enroll' call. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. pub fn delete(&self, enterprise_id: &str) -> EnterpriseDeleteCall<'a, C, NC, A> { EnterpriseDeleteCall { hub: self.hub, @@ -1681,13 +1829,18 @@ pub struct CollectionMethods<'a, C, NC, A> hub: &'a AndroidEnterprise, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CollectionMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CollectionMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CollectionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a new collection. + /// Creates a new collection. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. pub fn insert(&self, request: &Collection, enterprise_id: &str) -> CollectionInsertCall<'a, C, NC, A> { CollectionInsertCall { hub: self.hub, @@ -1701,7 +1854,13 @@ impl<'a, C, NC, A> CollectionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a collection. This method supports patch semantics. + /// Updates a collection. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. + /// * `collectionId` - The ID of the collection. pub fn patch(&self, request: &Collection, enterprise_id: &str, collection_id: &str) -> CollectionPatchCall<'a, C, NC, A> { CollectionPatchCall { hub: self.hub, @@ -1716,7 +1875,13 @@ impl<'a, C, NC, A> CollectionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a collection. + /// Updates a collection. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. + /// * `collectionId` - The ID of the collection. pub fn update(&self, request: &Collection, enterprise_id: &str, collection_id: &str) -> CollectionUpdateCall<'a, C, NC, A> { CollectionUpdateCall { hub: self.hub, @@ -1731,7 +1896,11 @@ impl<'a, C, NC, A> CollectionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the IDs of all the collections for an enterprise. + /// Retrieves the IDs of all the collections for an enterprise. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. pub fn list(&self, enterprise_id: &str) -> CollectionListCall<'a, C, NC, A> { CollectionListCall { hub: self.hub, @@ -1744,7 +1913,12 @@ impl<'a, C, NC, A> CollectionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the details of a collection. + /// Retrieves the details of a collection. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `collectionId` - The ID of the collection. pub fn get(&self, enterprise_id: &str, collection_id: &str) -> CollectionGetCall<'a, C, NC, A> { CollectionGetCall { hub: self.hub, @@ -1758,7 +1932,12 @@ impl<'a, C, NC, A> CollectionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a collection. + /// Deletes a collection. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `collectionId` - The ID of the collection. pub fn delete(&self, enterprise_id: &str, collection_id: &str) -> CollectionDeleteCall<'a, C, NC, A> { CollectionDeleteCall { hub: self.hub, @@ -1807,13 +1986,18 @@ pub struct GrouplicenseuserMethods<'a, C, NC, A> hub: &'a AndroidEnterprise, } -impl<'a, C, NC, A> ResourceMethodsBuilder for GrouplicenseuserMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for GrouplicenseuserMethods<'a, C, NC, A> {} impl<'a, C, NC, A> GrouplicenseuserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the IDs of the users who have been granted entitlements under the license. + /// Retrieves the IDs of the users who have been granted entitlements under the license. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `groupLicenseId` - The ID of the product the group license is for, e.g. "app:com.google.android.gm". pub fn list(&self, enterprise_id: &str, group_license_id: &str) -> GrouplicenseuserListCall<'a, C, NC, A> { GrouplicenseuserListCall { hub: self.hub, @@ -1862,13 +2046,20 @@ pub struct EntitlementMethods<'a, C, NC, A> hub: &'a AndroidEnterprise, } -impl<'a, C, NC, A> ResourceMethodsBuilder for EntitlementMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for EntitlementMethods<'a, C, NC, A> {} impl<'a, C, NC, A> EntitlementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Adds or updates an entitlement to an app for a user. + /// Adds or updates an entitlement to an app for a user. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `entitlementId` - The ID of the entitlement, e.g. "app:com.google.android.gm". pub fn update(&self, request: &Entitlement, enterprise_id: &str, user_id: &str, entitlement_id: &str) -> EntitlementUpdateCall<'a, C, NC, A> { EntitlementUpdateCall { hub: self.hub, @@ -1885,7 +2076,12 @@ impl<'a, C, NC, A> EntitlementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List of all entitlements for the specified user. Only the ID is set. + /// List of all entitlements for the specified user. Only the ID is set. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. pub fn list(&self, enterprise_id: &str, user_id: &str) -> EntitlementListCall<'a, C, NC, A> { EntitlementListCall { hub: self.hub, @@ -1899,7 +2095,13 @@ impl<'a, C, NC, A> EntitlementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves details of an entitlement. + /// Retrieves details of an entitlement. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `entitlementId` - The ID of the entitlement, e.g. "app:com.google.android.gm". pub fn get(&self, enterprise_id: &str, user_id: &str, entitlement_id: &str) -> EntitlementGetCall<'a, C, NC, A> { EntitlementGetCall { hub: self.hub, @@ -1914,7 +2116,14 @@ impl<'a, C, NC, A> EntitlementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Adds or updates an entitlement to an app for a user. This method supports patch semantics. + /// Adds or updates an entitlement to an app for a user. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `entitlementId` - The ID of the entitlement, e.g. "app:com.google.android.gm". pub fn patch(&self, request: &Entitlement, enterprise_id: &str, user_id: &str, entitlement_id: &str) -> EntitlementPatchCall<'a, C, NC, A> { EntitlementPatchCall { hub: self.hub, @@ -1931,7 +2140,13 @@ impl<'a, C, NC, A> EntitlementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Removes an entitlement to an app for a user and uninstalls it. + /// Removes an entitlement to an app for a user and uninstalls it. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `userId` - The ID of the user. + /// * `entitlementId` - The ID of the entitlement, e.g. "app:com.google.android.gm". pub fn delete(&self, enterprise_id: &str, user_id: &str, entitlement_id: &str) -> EntitlementDeleteCall<'a, C, NC, A> { EntitlementDeleteCall { hub: self.hub, @@ -1981,13 +2196,18 @@ pub struct ProductMethods<'a, C, NC, A> hub: &'a AndroidEnterprise, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ProductMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ProductMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ProductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the Android app permissions required by this app. + /// Retrieves the Android app permissions required by this app. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `productId` - The ID of the product. pub fn get_permissions(&self, enterprise_id: &str, product_id: &str) -> ProductGetPermissionCall<'a, C, NC, A> { ProductGetPermissionCall { hub: self.hub, @@ -2001,7 +2221,12 @@ impl<'a, C, NC, A> ProductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves details of a product for display to an enterprise admin. + /// Retrieves details of a product for display to an enterprise admin. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `productId` - The ID of the product, e.g. "app:com.google.android.gm". pub fn get(&self, enterprise_id: &str, product_id: &str) -> ProductGetCall<'a, C, NC, A> { ProductGetCall { hub: self.hub, @@ -2016,7 +2241,12 @@ impl<'a, C, NC, A> ProductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the schema defining app restrictions configurable for this product. All products have a schema, but this may be empty if no app restrictions are defined. + /// Retrieves the schema defining app restrictions configurable for this product. All products have a schema, but this may be empty if no app restrictions are defined. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `productId` - The ID of the product. pub fn get_app_restrictions_schema(&self, enterprise_id: &str, product_id: &str) -> ProductGetAppRestrictionsSchemaCall<'a, C, NC, A> { ProductGetAppRestrictionsSchemaCall { hub: self.hub, @@ -2031,7 +2261,13 @@ impl<'a, C, NC, A> ProductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the set of Android app permissions for this app that have been accepted by the enterprise. + /// Updates the set of Android app permissions for this app that have been accepted by the enterprise. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `enterpriseId` - The ID of the enterprise. + /// * `productId` - The ID of the product. pub fn update_permissions(&self, request: &ProductPermissions, enterprise_id: &str, product_id: &str) -> ProductUpdatePermissionCall<'a, C, NC, A> { ProductUpdatePermissionCall { hub: self.hub, @@ -2081,13 +2317,18 @@ pub struct GrouplicenseMethods<'a, C, NC, A> hub: &'a AndroidEnterprise, } -impl<'a, C, NC, A> ResourceMethodsBuilder for GrouplicenseMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for GrouplicenseMethods<'a, C, NC, A> {} impl<'a, C, NC, A> GrouplicenseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves details of an enterprise's group license for a product. + /// Retrieves details of an enterprise's group license for a product. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. + /// * `groupLicenseId` - The ID of the product the group license is for, e.g. "app:com.google.android.gm". pub fn get(&self, enterprise_id: &str, group_license_id: &str) -> GrouplicenseGetCall<'a, C, NC, A> { GrouplicenseGetCall { hub: self.hub, @@ -2101,7 +2342,11 @@ impl<'a, C, NC, A> GrouplicenseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves IDs of all products for which the enterprise has a group license. + /// Retrieves IDs of all products for which the enterprise has a group license. + /// + /// # Arguments + /// + /// * `enterpriseId` - The ID of the enterprise. pub fn list(&self, enterprise_id: &str) -> GrouplicenseListCall<'a, C, NC, A> { GrouplicenseListCall { hub: self.hub, @@ -2149,13 +2394,17 @@ pub struct PermissionMethods<'a, C, NC, A> hub: &'a AndroidEnterprise, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PermissionMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PermissionMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PermissionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves details of an Android app permission for display to an enterprise admin. + /// Retrieves details of an Android app permission for display to an enterprise admin. + /// + /// # Arguments + /// + /// * `permissionId` - The ID of the permission. pub fn get(&self, permission_id: &str) -> PermissionGetCall<'a, C, NC, A> { PermissionGetCall { hub: self.hub, @@ -2179,7 +2428,7 @@ impl<'a, C, NC, A> PermissionMethods<'a, C, NC, A> { /// Removes the user from the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. /// /// A builder for the *delete* method supported by a *collectionviewer* resource. -/// It is not used directly, but through a `CollectionviewerMethods`. +/// It is not used directly, but through a `CollectionviewerMethods` instance. /// /// # Example /// @@ -2241,7 +2490,7 @@ impl<'a, C, NC, A> CollectionviewerDeleteCall<'a, C, NC, A> where NC: hyper::net for &field in ["enterpriseId", "collectionId", "userId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2293,7 +2542,7 @@ impl<'a, C, NC, A> CollectionviewerDeleteCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2305,7 +2554,6 @@ impl<'a, C, NC, A> CollectionviewerDeleteCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -2315,7 +2563,7 @@ impl<'a, C, NC, A> CollectionviewerDeleteCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2326,12 +2574,12 @@ impl<'a, C, NC, A> CollectionviewerDeleteCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2343,7 +2591,7 @@ impl<'a, C, NC, A> CollectionviewerDeleteCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionviewerDeleteCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -2353,7 +2601,7 @@ impl<'a, C, NC, A> CollectionviewerDeleteCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the collection. + /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionviewerDeleteCall<'a, C, NC, A> { self._collection_id = new_value.to_string(); self @@ -2363,7 +2611,7 @@ impl<'a, C, NC, A> CollectionviewerDeleteCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> CollectionviewerDeleteCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -2424,7 +2672,7 @@ impl<'a, C, NC, A> CollectionviewerDeleteCall<'a, C, NC, A> where NC: hyper::net /// Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *collectionviewer* resource. -/// It is not used directly, but through a `CollectionviewerMethods`. +/// It is not used directly, but through a `CollectionviewerMethods` instance. /// /// # Example /// @@ -2493,7 +2741,7 @@ impl<'a, C, NC, A> CollectionviewerPatchCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "enterpriseId", "collectionId", "userId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2550,7 +2798,7 @@ impl<'a, C, NC, A> CollectionviewerPatchCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2566,7 +2814,6 @@ impl<'a, C, NC, A> CollectionviewerPatchCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -2576,7 +2823,7 @@ impl<'a, C, NC, A> CollectionviewerPatchCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2587,7 +2834,7 @@ impl<'a, C, NC, A> CollectionviewerPatchCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2596,13 +2843,13 @@ impl<'a, C, NC, A> CollectionviewerPatchCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2623,7 +2870,7 @@ impl<'a, C, NC, A> CollectionviewerPatchCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionviewerPatchCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -2633,7 +2880,7 @@ impl<'a, C, NC, A> CollectionviewerPatchCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the collection. + /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionviewerPatchCall<'a, C, NC, A> { self._collection_id = new_value.to_string(); self @@ -2643,7 +2890,7 @@ impl<'a, C, NC, A> CollectionviewerPatchCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> CollectionviewerPatchCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -2704,7 +2951,7 @@ impl<'a, C, NC, A> CollectionviewerPatchCall<'a, C, NC, A> where NC: hyper::net: /// Retrieves the ID of the user if they have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection. /// /// A builder for the *get* method supported by a *collectionviewer* resource. -/// It is not used directly, but through a `CollectionviewerMethods`. +/// It is not used directly, but through a `CollectionviewerMethods` instance. /// /// # Example /// @@ -2766,7 +3013,7 @@ impl<'a, C, NC, A> CollectionviewerGetCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "enterpriseId", "collectionId", "userId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2819,7 +3066,7 @@ impl<'a, C, NC, A> CollectionviewerGetCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2831,7 +3078,6 @@ impl<'a, C, NC, A> CollectionviewerGetCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -2841,7 +3087,7 @@ impl<'a, C, NC, A> CollectionviewerGetCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2852,7 +3098,7 @@ impl<'a, C, NC, A> CollectionviewerGetCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2861,13 +3107,13 @@ impl<'a, C, NC, A> CollectionviewerGetCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2879,7 +3125,7 @@ impl<'a, C, NC, A> CollectionviewerGetCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionviewerGetCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -2889,7 +3135,7 @@ impl<'a, C, NC, A> CollectionviewerGetCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the collection. + /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionviewerGetCall<'a, C, NC, A> { self._collection_id = new_value.to_string(); self @@ -2899,7 +3145,7 @@ impl<'a, C, NC, A> CollectionviewerGetCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> CollectionviewerGetCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -2960,7 +3206,7 @@ impl<'a, C, NC, A> CollectionviewerGetCall<'a, C, NC, A> where NC: hyper::net::N /// Retrieves the IDs of the users who have been specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only these users will see the collection. /// /// A builder for the *list* method supported by a *collectionviewer* resource. -/// It is not used directly, but through a `CollectionviewerMethods`. +/// It is not used directly, but through a `CollectionviewerMethods` instance. /// /// # Example /// @@ -3020,7 +3266,7 @@ impl<'a, C, NC, A> CollectionviewerListCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "enterpriseId", "collectionId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3073,7 +3319,7 @@ impl<'a, C, NC, A> CollectionviewerListCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3085,7 +3331,6 @@ impl<'a, C, NC, A> CollectionviewerListCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -3095,7 +3340,7 @@ impl<'a, C, NC, A> CollectionviewerListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3106,7 +3351,7 @@ impl<'a, C, NC, A> CollectionviewerListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3115,13 +3360,13 @@ impl<'a, C, NC, A> CollectionviewerListCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3133,7 +3378,7 @@ impl<'a, C, NC, A> CollectionviewerListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionviewerListCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -3143,7 +3388,7 @@ impl<'a, C, NC, A> CollectionviewerListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the collection. + /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionviewerListCall<'a, C, NC, A> { self._collection_id = new_value.to_string(); self @@ -3204,7 +3449,7 @@ impl<'a, C, NC, A> CollectionviewerListCall<'a, C, NC, A> where NC: hyper::net:: /// Adds the user to the list of those specifically allowed to see the collection. If the collection's visibility is set to viewersOnly then only such users will see the collection. /// /// A builder for the *update* method supported by a *collectionviewer* resource. -/// It is not used directly, but through a `CollectionviewerMethods`. +/// It is not used directly, but through a `CollectionviewerMethods` instance. /// /// # Example /// @@ -3273,7 +3518,7 @@ impl<'a, C, NC, A> CollectionviewerUpdateCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "enterpriseId", "collectionId", "userId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3330,7 +3575,7 @@ impl<'a, C, NC, A> CollectionviewerUpdateCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3346,7 +3591,6 @@ impl<'a, C, NC, A> CollectionviewerUpdateCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -3356,7 +3600,7 @@ impl<'a, C, NC, A> CollectionviewerUpdateCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3367,7 +3611,7 @@ impl<'a, C, NC, A> CollectionviewerUpdateCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3376,13 +3620,13 @@ impl<'a, C, NC, A> CollectionviewerUpdateCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3403,7 +3647,7 @@ impl<'a, C, NC, A> CollectionviewerUpdateCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionviewerUpdateCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -3413,7 +3657,7 @@ impl<'a, C, NC, A> CollectionviewerUpdateCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the collection. + /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionviewerUpdateCall<'a, C, NC, A> { self._collection_id = new_value.to_string(); self @@ -3423,7 +3667,7 @@ impl<'a, C, NC, A> CollectionviewerUpdateCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> CollectionviewerUpdateCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -3484,7 +3728,7 @@ impl<'a, C, NC, A> CollectionviewerUpdateCall<'a, C, NC, A> where NC: hyper::net /// Revokes a previously generated token (activation code) for the user. /// /// A builder for the *revokeToken* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -3544,7 +3788,7 @@ impl<'a, C, NC, A> UserRevokeTokenCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["enterpriseId", "userId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3596,7 +3840,7 @@ impl<'a, C, NC, A> UserRevokeTokenCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3608,7 +3852,6 @@ impl<'a, C, NC, A> UserRevokeTokenCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -3618,7 +3861,7 @@ impl<'a, C, NC, A> UserRevokeTokenCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3629,12 +3872,12 @@ impl<'a, C, NC, A> UserRevokeTokenCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3646,7 +3889,7 @@ impl<'a, C, NC, A> UserRevokeTokenCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> UserRevokeTokenCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -3656,7 +3899,7 @@ impl<'a, C, NC, A> UserRevokeTokenCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> UserRevokeTokenCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -3717,7 +3960,7 @@ impl<'a, C, NC, A> UserRevokeTokenCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Retrieves a user's details. /// /// A builder for the *get* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -3777,7 +4020,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "enterpriseId", "userId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3830,7 +4073,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3842,7 +4085,6 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -3852,7 +4094,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3863,7 +4105,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3872,13 +4114,13 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3890,7 +4132,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> UserGetCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -3900,7 +4142,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> UserGetCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -3961,7 +4203,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Looks up a user by email address. /// /// A builder for the *list* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -4021,7 +4263,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "enterpriseId", "email"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4074,7 +4316,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4086,7 +4328,6 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -4096,7 +4337,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4107,7 +4348,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4116,13 +4357,13 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4134,7 +4375,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> UserListCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -4144,7 +4385,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The exact primary email address of the user to look up. + /// The exact primary email address of the user to look up. pub fn email(mut self, new_value: &str) -> UserListCall<'a, C, NC, A> { self._email = new_value.to_string(); self @@ -4205,7 +4446,7 @@ impl<'a, C, NC, A> UserListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Generates a token (activation code) to allow this user to configure their work account in the Android Setup Wizard. Revokes any previously generated token. /// /// A builder for the *generateToken* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -4265,7 +4506,7 @@ impl<'a, C, NC, A> UserGenerateTokenCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "enterpriseId", "userId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4318,7 +4559,7 @@ impl<'a, C, NC, A> UserGenerateTokenCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4330,7 +4571,6 @@ impl<'a, C, NC, A> UserGenerateTokenCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -4340,7 +4580,7 @@ impl<'a, C, NC, A> UserGenerateTokenCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4351,7 +4591,7 @@ impl<'a, C, NC, A> UserGenerateTokenCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4360,13 +4600,13 @@ impl<'a, C, NC, A> UserGenerateTokenCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4378,7 +4618,7 @@ impl<'a, C, NC, A> UserGenerateTokenCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> UserGenerateTokenCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -4388,7 +4628,7 @@ impl<'a, C, NC, A> UserGenerateTokenCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> UserGenerateTokenCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -4449,7 +4689,7 @@ impl<'a, C, NC, A> UserGenerateTokenCall<'a, C, NC, A> where NC: hyper::net::Net /// Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *install* resource. -/// It is not used directly, but through a `InstallMethods`. +/// It is not used directly, but through a `InstallMethods` instance. /// /// # Example /// @@ -4520,7 +4760,7 @@ impl<'a, C, NC, A> InstallPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "enterpriseId", "userId", "deviceId", "installId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4577,7 +4817,7 @@ impl<'a, C, NC, A> InstallPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4593,7 +4833,6 @@ impl<'a, C, NC, A> InstallPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -4603,7 +4842,7 @@ impl<'a, C, NC, A> InstallPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4614,7 +4853,7 @@ impl<'a, C, NC, A> InstallPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4623,13 +4862,13 @@ impl<'a, C, NC, A> InstallPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4650,7 +4889,7 @@ impl<'a, C, NC, A> InstallPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> InstallPatchCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -4660,7 +4899,7 @@ impl<'a, C, NC, A> InstallPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> InstallPatchCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -4670,7 +4909,7 @@ impl<'a, C, NC, A> InstallPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Android ID of the device. + /// The Android ID of the device. pub fn device_id(mut self, new_value: &str) -> InstallPatchCall<'a, C, NC, A> { self._device_id = new_value.to_string(); self @@ -4680,7 +4919,7 @@ impl<'a, C, NC, A> InstallPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". + /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". pub fn install_id(mut self, new_value: &str) -> InstallPatchCall<'a, C, NC, A> { self._install_id = new_value.to_string(); self @@ -4741,7 +4980,7 @@ impl<'a, C, NC, A> InstallPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Retrieves details of an installation of an app on a device. /// /// A builder for the *get* method supported by a *install* resource. -/// It is not used directly, but through a `InstallMethods`. +/// It is not used directly, but through a `InstallMethods` instance. /// /// # Example /// @@ -4805,7 +5044,7 @@ impl<'a, C, NC, A> InstallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "enterpriseId", "userId", "deviceId", "installId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4858,7 +5097,7 @@ impl<'a, C, NC, A> InstallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4870,7 +5109,6 @@ impl<'a, C, NC, A> InstallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -4880,7 +5118,7 @@ impl<'a, C, NC, A> InstallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4891,7 +5129,7 @@ impl<'a, C, NC, A> InstallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4900,13 +5138,13 @@ impl<'a, C, NC, A> InstallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4918,7 +5156,7 @@ impl<'a, C, NC, A> InstallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> InstallGetCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -4928,7 +5166,7 @@ impl<'a, C, NC, A> InstallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> InstallGetCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -4938,7 +5176,7 @@ impl<'a, C, NC, A> InstallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Android ID of the device. + /// The Android ID of the device. pub fn device_id(mut self, new_value: &str) -> InstallGetCall<'a, C, NC, A> { self._device_id = new_value.to_string(); self @@ -4948,7 +5186,7 @@ impl<'a, C, NC, A> InstallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". + /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". pub fn install_id(mut self, new_value: &str) -> InstallGetCall<'a, C, NC, A> { self._install_id = new_value.to_string(); self @@ -5009,7 +5247,7 @@ impl<'a, C, NC, A> InstallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Retrieves the details of all apps installed on the specified device. /// /// A builder for the *list* method supported by a *install* resource. -/// It is not used directly, but through a `InstallMethods`. +/// It is not used directly, but through a `InstallMethods` instance. /// /// # Example /// @@ -5071,7 +5309,7 @@ impl<'a, C, NC, A> InstallListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "enterpriseId", "userId", "deviceId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5124,7 +5362,7 @@ impl<'a, C, NC, A> InstallListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5136,7 +5374,6 @@ impl<'a, C, NC, A> InstallListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -5146,7 +5383,7 @@ impl<'a, C, NC, A> InstallListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5157,7 +5394,7 @@ impl<'a, C, NC, A> InstallListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5166,13 +5403,13 @@ impl<'a, C, NC, A> InstallListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5184,7 +5421,7 @@ impl<'a, C, NC, A> InstallListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> InstallListCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -5194,7 +5431,7 @@ impl<'a, C, NC, A> InstallListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> InstallListCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -5204,7 +5441,7 @@ impl<'a, C, NC, A> InstallListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Android ID of the device. + /// The Android ID of the device. pub fn device_id(mut self, new_value: &str) -> InstallListCall<'a, C, NC, A> { self._device_id = new_value.to_string(); self @@ -5265,7 +5502,7 @@ impl<'a, C, NC, A> InstallListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Requests to remove an app from a device. A call to get or list will still show the app as installed on the device until it is actually removed. /// /// A builder for the *delete* method supported by a *install* resource. -/// It is not used directly, but through a `InstallMethods`. +/// It is not used directly, but through a `InstallMethods` instance. /// /// # Example /// @@ -5329,7 +5566,7 @@ impl<'a, C, NC, A> InstallDeleteCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["enterpriseId", "userId", "deviceId", "installId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5381,7 +5618,7 @@ impl<'a, C, NC, A> InstallDeleteCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5393,7 +5630,6 @@ impl<'a, C, NC, A> InstallDeleteCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -5403,7 +5639,7 @@ impl<'a, C, NC, A> InstallDeleteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5414,12 +5650,12 @@ impl<'a, C, NC, A> InstallDeleteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5431,7 +5667,7 @@ impl<'a, C, NC, A> InstallDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -5441,7 +5677,7 @@ impl<'a, C, NC, A> InstallDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -5451,7 +5687,7 @@ impl<'a, C, NC, A> InstallDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Android ID of the device. + /// The Android ID of the device. pub fn device_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, NC, A> { self._device_id = new_value.to_string(); self @@ -5461,7 +5697,7 @@ impl<'a, C, NC, A> InstallDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". + /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". pub fn install_id(mut self, new_value: &str) -> InstallDeleteCall<'a, C, NC, A> { self._install_id = new_value.to_string(); self @@ -5522,7 +5758,7 @@ impl<'a, C, NC, A> InstallDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. /// /// A builder for the *update* method supported by a *install* resource. -/// It is not used directly, but through a `InstallMethods`. +/// It is not used directly, but through a `InstallMethods` instance. /// /// # Example /// @@ -5593,7 +5829,7 @@ impl<'a, C, NC, A> InstallUpdateCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "enterpriseId", "userId", "deviceId", "installId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5650,7 +5886,7 @@ impl<'a, C, NC, A> InstallUpdateCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5666,7 +5902,6 @@ impl<'a, C, NC, A> InstallUpdateCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -5676,7 +5911,7 @@ impl<'a, C, NC, A> InstallUpdateCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5687,7 +5922,7 @@ impl<'a, C, NC, A> InstallUpdateCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5696,13 +5931,13 @@ impl<'a, C, NC, A> InstallUpdateCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5723,7 +5958,7 @@ impl<'a, C, NC, A> InstallUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> InstallUpdateCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -5733,7 +5968,7 @@ impl<'a, C, NC, A> InstallUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> InstallUpdateCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -5743,7 +5978,7 @@ impl<'a, C, NC, A> InstallUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Android ID of the device. + /// The Android ID of the device. pub fn device_id(mut self, new_value: &str) -> InstallUpdateCall<'a, C, NC, A> { self._device_id = new_value.to_string(); self @@ -5753,7 +5988,7 @@ impl<'a, C, NC, A> InstallUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". + /// The ID of the product represented by the install, e.g. "app:com.google.android.gm". pub fn install_id(mut self, new_value: &str) -> InstallUpdateCall<'a, C, NC, A> { self._install_id = new_value.to_string(); self @@ -5814,7 +6049,7 @@ impl<'a, C, NC, A> InstallUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets whether a device is enabled or disabled for access by the user to Google services. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. /// /// A builder for the *setState* method supported by a *device* resource. -/// It is not used directly, but through a `DeviceMethods`. +/// It is not used directly, but through a `DeviceMethods` instance. /// /// # Example /// @@ -5883,7 +6118,7 @@ impl<'a, C, NC, A> DeviceSetStateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "enterpriseId", "userId", "deviceId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5940,7 +6175,7 @@ impl<'a, C, NC, A> DeviceSetStateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5956,7 +6191,6 @@ impl<'a, C, NC, A> DeviceSetStateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -5966,7 +6200,7 @@ impl<'a, C, NC, A> DeviceSetStateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5977,7 +6211,7 @@ impl<'a, C, NC, A> DeviceSetStateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5986,13 +6220,13 @@ impl<'a, C, NC, A> DeviceSetStateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6013,7 +6247,7 @@ impl<'a, C, NC, A> DeviceSetStateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> DeviceSetStateCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -6023,7 +6257,7 @@ impl<'a, C, NC, A> DeviceSetStateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> DeviceSetStateCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -6033,7 +6267,7 @@ impl<'a, C, NC, A> DeviceSetStateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the device. + /// The ID of the device. pub fn device_id(mut self, new_value: &str) -> DeviceSetStateCall<'a, C, NC, A> { self._device_id = new_value.to_string(); self @@ -6094,7 +6328,7 @@ impl<'a, C, NC, A> DeviceSetStateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieves whether a device is enabled or disabled for access by the user to Google services. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. /// /// A builder for the *getState* method supported by a *device* resource. -/// It is not used directly, but through a `DeviceMethods`. +/// It is not used directly, but through a `DeviceMethods` instance. /// /// # Example /// @@ -6156,7 +6390,7 @@ impl<'a, C, NC, A> DeviceGetStateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "enterpriseId", "userId", "deviceId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6209,7 +6443,7 @@ impl<'a, C, NC, A> DeviceGetStateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6221,7 +6455,6 @@ impl<'a, C, NC, A> DeviceGetStateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -6231,7 +6464,7 @@ impl<'a, C, NC, A> DeviceGetStateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6242,7 +6475,7 @@ impl<'a, C, NC, A> DeviceGetStateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6251,13 +6484,13 @@ impl<'a, C, NC, A> DeviceGetStateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6269,7 +6502,7 @@ impl<'a, C, NC, A> DeviceGetStateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> DeviceGetStateCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -6279,7 +6512,7 @@ impl<'a, C, NC, A> DeviceGetStateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> DeviceGetStateCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -6289,7 +6522,7 @@ impl<'a, C, NC, A> DeviceGetStateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the device. + /// The ID of the device. pub fn device_id(mut self, new_value: &str) -> DeviceGetStateCall<'a, C, NC, A> { self._device_id = new_value.to_string(); self @@ -6350,7 +6583,7 @@ impl<'a, C, NC, A> DeviceGetStateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieves the IDs of all of a user's devices. /// /// A builder for the *list* method supported by a *device* resource. -/// It is not used directly, but through a `DeviceMethods`. +/// It is not used directly, but through a `DeviceMethods` instance. /// /// # Example /// @@ -6410,7 +6643,7 @@ impl<'a, C, NC, A> DeviceListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "enterpriseId", "userId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6463,7 +6696,7 @@ impl<'a, C, NC, A> DeviceListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6475,7 +6708,6 @@ impl<'a, C, NC, A> DeviceListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -6485,7 +6717,7 @@ impl<'a, C, NC, A> DeviceListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6496,7 +6728,7 @@ impl<'a, C, NC, A> DeviceListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6505,13 +6737,13 @@ impl<'a, C, NC, A> DeviceListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6523,7 +6755,7 @@ impl<'a, C, NC, A> DeviceListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> DeviceListCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -6533,7 +6765,7 @@ impl<'a, C, NC, A> DeviceListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> DeviceListCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -6594,7 +6826,7 @@ impl<'a, C, NC, A> DeviceListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Retrieves the details of a device. /// /// A builder for the *get* method supported by a *device* resource. -/// It is not used directly, but through a `DeviceMethods`. +/// It is not used directly, but through a `DeviceMethods` instance. /// /// # Example /// @@ -6656,7 +6888,7 @@ impl<'a, C, NC, A> DeviceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "enterpriseId", "userId", "deviceId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6709,7 +6941,7 @@ impl<'a, C, NC, A> DeviceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6721,7 +6953,6 @@ impl<'a, C, NC, A> DeviceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -6731,7 +6962,7 @@ impl<'a, C, NC, A> DeviceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6742,7 +6973,7 @@ impl<'a, C, NC, A> DeviceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6751,13 +6982,13 @@ impl<'a, C, NC, A> DeviceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6769,7 +7000,7 @@ impl<'a, C, NC, A> DeviceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> DeviceGetCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -6779,7 +7010,7 @@ impl<'a, C, NC, A> DeviceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> DeviceGetCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -6789,7 +7020,7 @@ impl<'a, C, NC, A> DeviceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the device. + /// The ID of the device. pub fn device_id(mut self, new_value: &str) -> DeviceGetCall<'a, C, NC, A> { self._device_id = new_value.to_string(); self @@ -6850,7 +7081,7 @@ impl<'a, C, NC, A> DeviceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Unenrolls an enterprise from the calling MDM. /// /// A builder for the *unenroll* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods`. +/// It is not used directly, but through a `EnterpriseMethods` instance. /// /// # Example /// @@ -6908,7 +7139,7 @@ impl<'a, C, NC, A> EnterpriseUnenrollCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["enterpriseId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6960,7 +7191,7 @@ impl<'a, C, NC, A> EnterpriseUnenrollCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6972,7 +7203,6 @@ impl<'a, C, NC, A> EnterpriseUnenrollCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -6982,7 +7212,7 @@ impl<'a, C, NC, A> EnterpriseUnenrollCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6993,12 +7223,12 @@ impl<'a, C, NC, A> EnterpriseUnenrollCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7010,7 +7240,7 @@ impl<'a, C, NC, A> EnterpriseUnenrollCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EnterpriseUnenrollCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -7071,7 +7301,7 @@ impl<'a, C, NC, A> EnterpriseUnenrollCall<'a, C, NC, A> where NC: hyper::net::Ne /// Establishes the binding between the MDM and an enterprise. This is now deprecated; use enroll instead. /// /// A builder for the *insert* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods`. +/// It is not used directly, but through a `EnterpriseMethods` instance. /// /// # Example /// @@ -7136,7 +7366,7 @@ impl<'a, C, NC, A> EnterpriseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "token"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7169,7 +7399,7 @@ impl<'a, C, NC, A> EnterpriseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7185,7 +7415,6 @@ impl<'a, C, NC, A> EnterpriseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -7195,7 +7424,7 @@ impl<'a, C, NC, A> EnterpriseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7206,7 +7435,7 @@ impl<'a, C, NC, A> EnterpriseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7215,13 +7444,13 @@ impl<'a, C, NC, A> EnterpriseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7242,7 +7471,7 @@ impl<'a, C, NC, A> EnterpriseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The token provided by the enterprise to register the MDM. + /// The token provided by the enterprise to register the MDM. pub fn token(mut self, new_value: &str) -> EnterpriseInsertCall<'a, C, NC, A> { self._token = new_value.to_string(); self @@ -7303,7 +7532,7 @@ impl<'a, C, NC, A> EnterpriseInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Looks up an enterprise by domain name. /// /// A builder for the *list* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods`. +/// It is not used directly, but through a `EnterpriseMethods` instance. /// /// # Example /// @@ -7361,7 +7590,7 @@ impl<'a, C, NC, A> EnterpriseListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "domain"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7390,7 +7619,7 @@ impl<'a, C, NC, A> EnterpriseListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7402,7 +7631,6 @@ impl<'a, C, NC, A> EnterpriseListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -7412,7 +7640,7 @@ impl<'a, C, NC, A> EnterpriseListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7423,7 +7651,7 @@ impl<'a, C, NC, A> EnterpriseListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7432,13 +7660,13 @@ impl<'a, C, NC, A> EnterpriseListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7450,7 +7678,7 @@ impl<'a, C, NC, A> EnterpriseListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The exact primary domain name of the enterprise to look up. + /// The exact primary domain name of the enterprise to look up. pub fn domain(mut self, new_value: &str) -> EnterpriseListCall<'a, C, NC, A> { self._domain = new_value.to_string(); self @@ -7511,7 +7739,7 @@ impl<'a, C, NC, A> EnterpriseListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieves the name and domain of an enterprise. /// /// A builder for the *get* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods`. +/// It is not used directly, but through a `EnterpriseMethods` instance. /// /// # Example /// @@ -7569,7 +7797,7 @@ impl<'a, C, NC, A> EnterpriseGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "enterpriseId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7622,7 +7850,7 @@ impl<'a, C, NC, A> EnterpriseGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7634,7 +7862,6 @@ impl<'a, C, NC, A> EnterpriseGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -7644,7 +7871,7 @@ impl<'a, C, NC, A> EnterpriseGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7655,7 +7882,7 @@ impl<'a, C, NC, A> EnterpriseGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7664,13 +7891,13 @@ impl<'a, C, NC, A> EnterpriseGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7682,7 +7909,7 @@ impl<'a, C, NC, A> EnterpriseGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EnterpriseGetCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -7743,7 +7970,7 @@ impl<'a, C, NC, A> EnterpriseGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Enrolls an enterprise with the calling MDM. /// /// A builder for the *enroll* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods`. +/// It is not used directly, but through a `EnterpriseMethods` instance. /// /// # Example /// @@ -7808,7 +8035,7 @@ impl<'a, C, NC, A> EnterpriseEnrollCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "token"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7841,7 +8068,7 @@ impl<'a, C, NC, A> EnterpriseEnrollCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7857,7 +8084,6 @@ impl<'a, C, NC, A> EnterpriseEnrollCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -7867,7 +8093,7 @@ impl<'a, C, NC, A> EnterpriseEnrollCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7878,7 +8104,7 @@ impl<'a, C, NC, A> EnterpriseEnrollCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7887,13 +8113,13 @@ impl<'a, C, NC, A> EnterpriseEnrollCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7914,7 +8140,7 @@ impl<'a, C, NC, A> EnterpriseEnrollCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The token provided by the enterprise to register the MDM. + /// The token provided by the enterprise to register the MDM. pub fn token(mut self, new_value: &str) -> EnterpriseEnrollCall<'a, C, NC, A> { self._token = new_value.to_string(); self @@ -7975,7 +8201,7 @@ impl<'a, C, NC, A> EnterpriseEnrollCall<'a, C, NC, A> where NC: hyper::net::Netw /// Set the account that will be used to authenticate to the API as the enterprise. /// /// A builder for the *setAccount* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods`. +/// It is not used directly, but through a `EnterpriseMethods` instance. /// /// # Example /// @@ -8040,7 +8266,7 @@ impl<'a, C, NC, A> EnterpriseSetAccountCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "enterpriseId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8097,7 +8323,7 @@ impl<'a, C, NC, A> EnterpriseSetAccountCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8113,7 +8339,6 @@ impl<'a, C, NC, A> EnterpriseSetAccountCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -8123,7 +8348,7 @@ impl<'a, C, NC, A> EnterpriseSetAccountCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8134,7 +8359,7 @@ impl<'a, C, NC, A> EnterpriseSetAccountCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8143,13 +8368,13 @@ impl<'a, C, NC, A> EnterpriseSetAccountCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8170,7 +8395,7 @@ impl<'a, C, NC, A> EnterpriseSetAccountCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EnterpriseSetAccountCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -8231,7 +8456,7 @@ impl<'a, C, NC, A> EnterpriseSetAccountCall<'a, C, NC, A> where NC: hyper::net:: /// Deletes the binding between the MDM and enterprise. This is now deprecated; use this to unenroll customers that were previously enrolled with the 'insert' call, then enroll them again with the 'enroll' call. /// /// A builder for the *delete* method supported by a *enterprise* resource. -/// It is not used directly, but through a `EnterpriseMethods`. +/// It is not used directly, but through a `EnterpriseMethods` instance. /// /// # Example /// @@ -8289,7 +8514,7 @@ impl<'a, C, NC, A> EnterpriseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["enterpriseId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8341,7 +8566,7 @@ impl<'a, C, NC, A> EnterpriseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8353,7 +8578,6 @@ impl<'a, C, NC, A> EnterpriseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -8363,7 +8587,7 @@ impl<'a, C, NC, A> EnterpriseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8374,12 +8598,12 @@ impl<'a, C, NC, A> EnterpriseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8391,7 +8615,7 @@ impl<'a, C, NC, A> EnterpriseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EnterpriseDeleteCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -8452,7 +8676,7 @@ impl<'a, C, NC, A> EnterpriseDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Creates a new collection. /// /// A builder for the *insert* method supported by a *collection* resource. -/// It is not used directly, but through a `CollectionMethods`. +/// It is not used directly, but through a `CollectionMethods` instance. /// /// # Example /// @@ -8517,7 +8741,7 @@ impl<'a, C, NC, A> CollectionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "enterpriseId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8574,7 +8798,7 @@ impl<'a, C, NC, A> CollectionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8590,7 +8814,6 @@ impl<'a, C, NC, A> CollectionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -8600,7 +8823,7 @@ impl<'a, C, NC, A> CollectionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8611,7 +8834,7 @@ impl<'a, C, NC, A> CollectionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8620,13 +8843,13 @@ impl<'a, C, NC, A> CollectionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8647,7 +8870,7 @@ impl<'a, C, NC, A> CollectionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionInsertCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -8708,7 +8931,7 @@ impl<'a, C, NC, A> CollectionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Updates a collection. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *collection* resource. -/// It is not used directly, but through a `CollectionMethods`. +/// It is not used directly, but through a `CollectionMethods` instance. /// /// # Example /// @@ -8775,7 +8998,7 @@ impl<'a, C, NC, A> CollectionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "enterpriseId", "collectionId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8832,7 +9055,7 @@ impl<'a, C, NC, A> CollectionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8848,7 +9071,6 @@ impl<'a, C, NC, A> CollectionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -8858,7 +9080,7 @@ impl<'a, C, NC, A> CollectionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8869,7 +9091,7 @@ impl<'a, C, NC, A> CollectionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8878,13 +9100,13 @@ impl<'a, C, NC, A> CollectionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8905,7 +9127,7 @@ impl<'a, C, NC, A> CollectionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionPatchCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -8915,7 +9137,7 @@ impl<'a, C, NC, A> CollectionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the collection. + /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionPatchCall<'a, C, NC, A> { self._collection_id = new_value.to_string(); self @@ -8976,7 +9198,7 @@ impl<'a, C, NC, A> CollectionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Updates a collection. /// /// A builder for the *update* method supported by a *collection* resource. -/// It is not used directly, but through a `CollectionMethods`. +/// It is not used directly, but through a `CollectionMethods` instance. /// /// # Example /// @@ -9043,7 +9265,7 @@ impl<'a, C, NC, A> CollectionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "enterpriseId", "collectionId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9100,7 +9322,7 @@ impl<'a, C, NC, A> CollectionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9116,7 +9338,6 @@ impl<'a, C, NC, A> CollectionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -9126,7 +9347,7 @@ impl<'a, C, NC, A> CollectionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9137,7 +9358,7 @@ impl<'a, C, NC, A> CollectionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9146,13 +9367,13 @@ impl<'a, C, NC, A> CollectionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9173,7 +9394,7 @@ impl<'a, C, NC, A> CollectionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionUpdateCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -9183,7 +9404,7 @@ impl<'a, C, NC, A> CollectionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the collection. + /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionUpdateCall<'a, C, NC, A> { self._collection_id = new_value.to_string(); self @@ -9244,7 +9465,7 @@ impl<'a, C, NC, A> CollectionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Retrieves the IDs of all the collections for an enterprise. /// /// A builder for the *list* method supported by a *collection* resource. -/// It is not used directly, but through a `CollectionMethods`. +/// It is not used directly, but through a `CollectionMethods` instance. /// /// # Example /// @@ -9302,7 +9523,7 @@ impl<'a, C, NC, A> CollectionListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "enterpriseId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9355,7 +9576,7 @@ impl<'a, C, NC, A> CollectionListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9367,7 +9588,6 @@ impl<'a, C, NC, A> CollectionListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -9377,7 +9597,7 @@ impl<'a, C, NC, A> CollectionListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9388,7 +9608,7 @@ impl<'a, C, NC, A> CollectionListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9397,13 +9617,13 @@ impl<'a, C, NC, A> CollectionListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9415,7 +9635,7 @@ impl<'a, C, NC, A> CollectionListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionListCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -9476,7 +9696,7 @@ impl<'a, C, NC, A> CollectionListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieves the details of a collection. /// /// A builder for the *get* method supported by a *collection* resource. -/// It is not used directly, but through a `CollectionMethods`. +/// It is not used directly, but through a `CollectionMethods` instance. /// /// # Example /// @@ -9536,7 +9756,7 @@ impl<'a, C, NC, A> CollectionGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "enterpriseId", "collectionId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9589,7 +9809,7 @@ impl<'a, C, NC, A> CollectionGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9601,7 +9821,6 @@ impl<'a, C, NC, A> CollectionGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -9611,7 +9830,7 @@ impl<'a, C, NC, A> CollectionGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9622,7 +9841,7 @@ impl<'a, C, NC, A> CollectionGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9631,13 +9850,13 @@ impl<'a, C, NC, A> CollectionGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9649,7 +9868,7 @@ impl<'a, C, NC, A> CollectionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionGetCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -9659,7 +9878,7 @@ impl<'a, C, NC, A> CollectionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the collection. + /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionGetCall<'a, C, NC, A> { self._collection_id = new_value.to_string(); self @@ -9720,7 +9939,7 @@ impl<'a, C, NC, A> CollectionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Deletes a collection. /// /// A builder for the *delete* method supported by a *collection* resource. -/// It is not used directly, but through a `CollectionMethods`. +/// It is not used directly, but through a `CollectionMethods` instance. /// /// # Example /// @@ -9780,7 +9999,7 @@ impl<'a, C, NC, A> CollectionDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["enterpriseId", "collectionId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9832,7 +10051,7 @@ impl<'a, C, NC, A> CollectionDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9844,7 +10063,6 @@ impl<'a, C, NC, A> CollectionDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -9854,7 +10072,7 @@ impl<'a, C, NC, A> CollectionDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9865,12 +10083,12 @@ impl<'a, C, NC, A> CollectionDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9882,7 +10100,7 @@ impl<'a, C, NC, A> CollectionDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> CollectionDeleteCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -9892,7 +10110,7 @@ impl<'a, C, NC, A> CollectionDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the collection. + /// The ID of the collection. pub fn collection_id(mut self, new_value: &str) -> CollectionDeleteCall<'a, C, NC, A> { self._collection_id = new_value.to_string(); self @@ -9953,7 +10171,7 @@ impl<'a, C, NC, A> CollectionDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Retrieves the IDs of the users who have been granted entitlements under the license. /// /// A builder for the *list* method supported by a *grouplicenseuser* resource. -/// It is not used directly, but through a `GrouplicenseuserMethods`. +/// It is not used directly, but through a `GrouplicenseuserMethods` instance. /// /// # Example /// @@ -10013,7 +10231,7 @@ impl<'a, C, NC, A> GrouplicenseuserListCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "enterpriseId", "groupLicenseId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10066,7 +10284,7 @@ impl<'a, C, NC, A> GrouplicenseuserListCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10078,7 +10296,6 @@ impl<'a, C, NC, A> GrouplicenseuserListCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -10088,7 +10305,7 @@ impl<'a, C, NC, A> GrouplicenseuserListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10099,7 +10316,7 @@ impl<'a, C, NC, A> GrouplicenseuserListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10108,13 +10325,13 @@ impl<'a, C, NC, A> GrouplicenseuserListCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10126,7 +10343,7 @@ impl<'a, C, NC, A> GrouplicenseuserListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> GrouplicenseuserListCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -10136,7 +10353,7 @@ impl<'a, C, NC, A> GrouplicenseuserListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the product the group license is for, e.g. "app:com.google.android.gm". + /// The ID of the product the group license is for, e.g. "app:com.google.android.gm". pub fn group_license_id(mut self, new_value: &str) -> GrouplicenseuserListCall<'a, C, NC, A> { self._group_license_id = new_value.to_string(); self @@ -10197,7 +10414,7 @@ impl<'a, C, NC, A> GrouplicenseuserListCall<'a, C, NC, A> where NC: hyper::net:: /// Adds or updates an entitlement to an app for a user. /// /// A builder for the *update* method supported by a *entitlement* resource. -/// It is not used directly, but through a `EntitlementMethods`. +/// It is not used directly, but through a `EntitlementMethods` instance. /// /// # Example /// @@ -10271,7 +10488,7 @@ impl<'a, C, NC, A> EntitlementUpdateCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "enterpriseId", "userId", "entitlementId", "install"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10328,7 +10545,7 @@ impl<'a, C, NC, A> EntitlementUpdateCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10344,7 +10561,6 @@ impl<'a, C, NC, A> EntitlementUpdateCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -10354,7 +10570,7 @@ impl<'a, C, NC, A> EntitlementUpdateCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10365,7 +10581,7 @@ impl<'a, C, NC, A> EntitlementUpdateCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10374,13 +10590,13 @@ impl<'a, C, NC, A> EntitlementUpdateCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10401,7 +10617,7 @@ impl<'a, C, NC, A> EntitlementUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EntitlementUpdateCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -10411,7 +10627,7 @@ impl<'a, C, NC, A> EntitlementUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> EntitlementUpdateCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -10421,7 +10637,7 @@ impl<'a, C, NC, A> EntitlementUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the entitlement, e.g. "app:com.google.android.gm". + /// The ID of the entitlement, e.g. "app:com.google.android.gm". pub fn entitlement_id(mut self, new_value: &str) -> EntitlementUpdateCall<'a, C, NC, A> { self._entitlement_id = new_value.to_string(); self @@ -10429,7 +10645,7 @@ impl<'a, C, NC, A> EntitlementUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *install* query property to the given value. /// /// - /// Set to true to also install the product on all the user's devices where possible. Failure to install on one or more devices will not prevent this operation from returning successfully, as long as the entitlement was successfully assigned to the user. + /// Set to true to also install the product on all the user's devices where possible. Failure to install on one or more devices will not prevent this operation from returning successfully, as long as the entitlement was successfully assigned to the user. pub fn install(mut self, new_value: bool) -> EntitlementUpdateCall<'a, C, NC, A> { self._install = Some(new_value); self @@ -10490,7 +10706,7 @@ impl<'a, C, NC, A> EntitlementUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// List of all entitlements for the specified user. Only the ID is set. /// /// A builder for the *list* method supported by a *entitlement* resource. -/// It is not used directly, but through a `EntitlementMethods`. +/// It is not used directly, but through a `EntitlementMethods` instance. /// /// # Example /// @@ -10550,7 +10766,7 @@ impl<'a, C, NC, A> EntitlementListCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "enterpriseId", "userId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10603,7 +10819,7 @@ impl<'a, C, NC, A> EntitlementListCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10615,7 +10831,6 @@ impl<'a, C, NC, A> EntitlementListCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -10625,7 +10840,7 @@ impl<'a, C, NC, A> EntitlementListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10636,7 +10851,7 @@ impl<'a, C, NC, A> EntitlementListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10645,13 +10860,13 @@ impl<'a, C, NC, A> EntitlementListCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10663,7 +10878,7 @@ impl<'a, C, NC, A> EntitlementListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EntitlementListCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -10673,7 +10888,7 @@ impl<'a, C, NC, A> EntitlementListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> EntitlementListCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -10734,7 +10949,7 @@ impl<'a, C, NC, A> EntitlementListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Retrieves details of an entitlement. /// /// A builder for the *get* method supported by a *entitlement* resource. -/// It is not used directly, but through a `EntitlementMethods`. +/// It is not used directly, but through a `EntitlementMethods` instance. /// /// # Example /// @@ -10796,7 +11011,7 @@ impl<'a, C, NC, A> EntitlementGetCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "enterpriseId", "userId", "entitlementId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10849,7 +11064,7 @@ impl<'a, C, NC, A> EntitlementGetCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10861,7 +11076,6 @@ impl<'a, C, NC, A> EntitlementGetCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -10871,7 +11085,7 @@ impl<'a, C, NC, A> EntitlementGetCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10882,7 +11096,7 @@ impl<'a, C, NC, A> EntitlementGetCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10891,13 +11105,13 @@ impl<'a, C, NC, A> EntitlementGetCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10909,7 +11123,7 @@ impl<'a, C, NC, A> EntitlementGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EntitlementGetCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -10919,7 +11133,7 @@ impl<'a, C, NC, A> EntitlementGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> EntitlementGetCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -10929,7 +11143,7 @@ impl<'a, C, NC, A> EntitlementGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the entitlement, e.g. "app:com.google.android.gm". + /// The ID of the entitlement, e.g. "app:com.google.android.gm". pub fn entitlement_id(mut self, new_value: &str) -> EntitlementGetCall<'a, C, NC, A> { self._entitlement_id = new_value.to_string(); self @@ -10990,7 +11204,7 @@ impl<'a, C, NC, A> EntitlementGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Adds or updates an entitlement to an app for a user. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *entitlement* resource. -/// It is not used directly, but through a `EntitlementMethods`. +/// It is not used directly, but through a `EntitlementMethods` instance. /// /// # Example /// @@ -11064,7 +11278,7 @@ impl<'a, C, NC, A> EntitlementPatchCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "enterpriseId", "userId", "entitlementId", "install"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11121,7 +11335,7 @@ impl<'a, C, NC, A> EntitlementPatchCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11137,7 +11351,6 @@ impl<'a, C, NC, A> EntitlementPatchCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -11147,7 +11360,7 @@ impl<'a, C, NC, A> EntitlementPatchCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11158,7 +11371,7 @@ impl<'a, C, NC, A> EntitlementPatchCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11167,13 +11380,13 @@ impl<'a, C, NC, A> EntitlementPatchCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11194,7 +11407,7 @@ impl<'a, C, NC, A> EntitlementPatchCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EntitlementPatchCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -11204,7 +11417,7 @@ impl<'a, C, NC, A> EntitlementPatchCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> EntitlementPatchCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -11214,7 +11427,7 @@ impl<'a, C, NC, A> EntitlementPatchCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the entitlement, e.g. "app:com.google.android.gm". + /// The ID of the entitlement, e.g. "app:com.google.android.gm". pub fn entitlement_id(mut self, new_value: &str) -> EntitlementPatchCall<'a, C, NC, A> { self._entitlement_id = new_value.to_string(); self @@ -11222,7 +11435,7 @@ impl<'a, C, NC, A> EntitlementPatchCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *install* query property to the given value. /// /// - /// Set to true to also install the product on all the user's devices where possible. Failure to install on one or more devices will not prevent this operation from returning successfully, as long as the entitlement was successfully assigned to the user. + /// Set to true to also install the product on all the user's devices where possible. Failure to install on one or more devices will not prevent this operation from returning successfully, as long as the entitlement was successfully assigned to the user. pub fn install(mut self, new_value: bool) -> EntitlementPatchCall<'a, C, NC, A> { self._install = Some(new_value); self @@ -11283,7 +11496,7 @@ impl<'a, C, NC, A> EntitlementPatchCall<'a, C, NC, A> where NC: hyper::net::Netw /// Removes an entitlement to an app for a user and uninstalls it. /// /// A builder for the *delete* method supported by a *entitlement* resource. -/// It is not used directly, but through a `EntitlementMethods`. +/// It is not used directly, but through a `EntitlementMethods` instance. /// /// # Example /// @@ -11345,7 +11558,7 @@ impl<'a, C, NC, A> EntitlementDeleteCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["enterpriseId", "userId", "entitlementId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11397,7 +11610,7 @@ impl<'a, C, NC, A> EntitlementDeleteCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11409,7 +11622,6 @@ impl<'a, C, NC, A> EntitlementDeleteCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -11419,7 +11631,7 @@ impl<'a, C, NC, A> EntitlementDeleteCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11430,12 +11642,12 @@ impl<'a, C, NC, A> EntitlementDeleteCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11447,7 +11659,7 @@ impl<'a, C, NC, A> EntitlementDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> EntitlementDeleteCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -11457,7 +11669,7 @@ impl<'a, C, NC, A> EntitlementDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user. + /// The ID of the user. pub fn user_id(mut self, new_value: &str) -> EntitlementDeleteCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -11467,7 +11679,7 @@ impl<'a, C, NC, A> EntitlementDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the entitlement, e.g. "app:com.google.android.gm". + /// The ID of the entitlement, e.g. "app:com.google.android.gm". pub fn entitlement_id(mut self, new_value: &str) -> EntitlementDeleteCall<'a, C, NC, A> { self._entitlement_id = new_value.to_string(); self @@ -11528,7 +11740,7 @@ impl<'a, C, NC, A> EntitlementDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Retrieves the Android app permissions required by this app. /// /// A builder for the *getPermissions* method supported by a *product* resource. -/// It is not used directly, but through a `ProductMethods`. +/// It is not used directly, but through a `ProductMethods` instance. /// /// # Example /// @@ -11588,7 +11800,7 @@ impl<'a, C, NC, A> ProductGetPermissionCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "enterpriseId", "productId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11641,7 +11853,7 @@ impl<'a, C, NC, A> ProductGetPermissionCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11653,7 +11865,6 @@ impl<'a, C, NC, A> ProductGetPermissionCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -11663,7 +11874,7 @@ impl<'a, C, NC, A> ProductGetPermissionCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11674,7 +11885,7 @@ impl<'a, C, NC, A> ProductGetPermissionCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11683,13 +11894,13 @@ impl<'a, C, NC, A> ProductGetPermissionCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11701,7 +11912,7 @@ impl<'a, C, NC, A> ProductGetPermissionCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> ProductGetPermissionCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -11711,7 +11922,7 @@ impl<'a, C, NC, A> ProductGetPermissionCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the product. + /// The ID of the product. pub fn product_id(mut self, new_value: &str) -> ProductGetPermissionCall<'a, C, NC, A> { self._product_id = new_value.to_string(); self @@ -11772,7 +11983,7 @@ impl<'a, C, NC, A> ProductGetPermissionCall<'a, C, NC, A> where NC: hyper::net:: /// Retrieves details of a product for display to an enterprise admin. /// /// A builder for the *get* method supported by a *product* resource. -/// It is not used directly, but through a `ProductMethods`. +/// It is not used directly, but through a `ProductMethods` instance. /// /// # Example /// @@ -11837,7 +12048,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "enterpriseId", "productId", "language"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11890,7 +12101,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11902,7 +12113,6 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -11912,7 +12122,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11923,7 +12133,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11932,13 +12142,13 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11950,7 +12160,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> ProductGetCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -11960,7 +12170,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the product, e.g. "app:com.google.android.gm". + /// The ID of the product, e.g. "app:com.google.android.gm". pub fn product_id(mut self, new_value: &str) -> ProductGetCall<'a, C, NC, A> { self._product_id = new_value.to_string(); self @@ -11968,7 +12178,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *language* query property to the given value. /// /// - /// The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). + /// The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). pub fn language(mut self, new_value: &str) -> ProductGetCall<'a, C, NC, A> { self._language = Some(new_value.to_string()); self @@ -12029,7 +12239,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Retrieves the schema defining app restrictions configurable for this product. All products have a schema, but this may be empty if no app restrictions are defined. /// /// A builder for the *getAppRestrictionsSchema* method supported by a *product* resource. -/// It is not used directly, but through a `ProductMethods`. +/// It is not used directly, but through a `ProductMethods` instance. /// /// # Example /// @@ -12094,7 +12304,7 @@ impl<'a, C, NC, A> ProductGetAppRestrictionsSchemaCall<'a, C, NC, A> where NC: h for &field in ["alt", "enterpriseId", "productId", "language"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12147,7 +12357,7 @@ impl<'a, C, NC, A> ProductGetAppRestrictionsSchemaCall<'a, C, NC, A> where NC: h } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12159,7 +12369,6 @@ impl<'a, C, NC, A> ProductGetAppRestrictionsSchemaCall<'a, C, NC, A> where NC: h dlg.pre_request(); req.send() - }; match req_result { @@ -12169,7 +12378,7 @@ impl<'a, C, NC, A> ProductGetAppRestrictionsSchemaCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12180,7 +12389,7 @@ impl<'a, C, NC, A> ProductGetAppRestrictionsSchemaCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12189,13 +12398,13 @@ impl<'a, C, NC, A> ProductGetAppRestrictionsSchemaCall<'a, C, NC, A> where NC: h Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12207,7 +12416,7 @@ impl<'a, C, NC, A> ProductGetAppRestrictionsSchemaCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> ProductGetAppRestrictionsSchemaCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -12217,7 +12426,7 @@ impl<'a, C, NC, A> ProductGetAppRestrictionsSchemaCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the product. + /// The ID of the product. pub fn product_id(mut self, new_value: &str) -> ProductGetAppRestrictionsSchemaCall<'a, C, NC, A> { self._product_id = new_value.to_string(); self @@ -12225,7 +12434,7 @@ impl<'a, C, NC, A> ProductGetAppRestrictionsSchemaCall<'a, C, NC, A> where NC: h /// Sets the *language* query property to the given value. /// /// - /// The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). + /// The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). pub fn language(mut self, new_value: &str) -> ProductGetAppRestrictionsSchemaCall<'a, C, NC, A> { self._language = Some(new_value.to_string()); self @@ -12286,7 +12495,7 @@ impl<'a, C, NC, A> ProductGetAppRestrictionsSchemaCall<'a, C, NC, A> where NC: h /// Updates the set of Android app permissions for this app that have been accepted by the enterprise. /// /// A builder for the *updatePermissions* method supported by a *product* resource. -/// It is not used directly, but through a `ProductMethods`. +/// It is not used directly, but through a `ProductMethods` instance. /// /// # Example /// @@ -12353,7 +12562,7 @@ impl<'a, C, NC, A> ProductUpdatePermissionCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "enterpriseId", "productId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12410,7 +12619,7 @@ impl<'a, C, NC, A> ProductUpdatePermissionCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12426,7 +12635,6 @@ impl<'a, C, NC, A> ProductUpdatePermissionCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -12436,7 +12644,7 @@ impl<'a, C, NC, A> ProductUpdatePermissionCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12447,7 +12655,7 @@ impl<'a, C, NC, A> ProductUpdatePermissionCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12456,13 +12664,13 @@ impl<'a, C, NC, A> ProductUpdatePermissionCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12483,7 +12691,7 @@ impl<'a, C, NC, A> ProductUpdatePermissionCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> ProductUpdatePermissionCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -12493,7 +12701,7 @@ impl<'a, C, NC, A> ProductUpdatePermissionCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the product. + /// The ID of the product. pub fn product_id(mut self, new_value: &str) -> ProductUpdatePermissionCall<'a, C, NC, A> { self._product_id = new_value.to_string(); self @@ -12554,7 +12762,7 @@ impl<'a, C, NC, A> ProductUpdatePermissionCall<'a, C, NC, A> where NC: hyper::ne /// Retrieves details of an enterprise's group license for a product. /// /// A builder for the *get* method supported by a *grouplicense* resource. -/// It is not used directly, but through a `GrouplicenseMethods`. +/// It is not used directly, but through a `GrouplicenseMethods` instance. /// /// # Example /// @@ -12614,7 +12822,7 @@ impl<'a, C, NC, A> GrouplicenseGetCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "enterpriseId", "groupLicenseId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12667,7 +12875,7 @@ impl<'a, C, NC, A> GrouplicenseGetCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12679,7 +12887,6 @@ impl<'a, C, NC, A> GrouplicenseGetCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -12689,7 +12896,7 @@ impl<'a, C, NC, A> GrouplicenseGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12700,7 +12907,7 @@ impl<'a, C, NC, A> GrouplicenseGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12709,13 +12916,13 @@ impl<'a, C, NC, A> GrouplicenseGetCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12727,7 +12934,7 @@ impl<'a, C, NC, A> GrouplicenseGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> GrouplicenseGetCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -12737,7 +12944,7 @@ impl<'a, C, NC, A> GrouplicenseGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the product the group license is for, e.g. "app:com.google.android.gm". + /// The ID of the product the group license is for, e.g. "app:com.google.android.gm". pub fn group_license_id(mut self, new_value: &str) -> GrouplicenseGetCall<'a, C, NC, A> { self._group_license_id = new_value.to_string(); self @@ -12798,7 +13005,7 @@ impl<'a, C, NC, A> GrouplicenseGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Retrieves IDs of all products for which the enterprise has a group license. /// /// A builder for the *list* method supported by a *grouplicense* resource. -/// It is not used directly, but through a `GrouplicenseMethods`. +/// It is not used directly, but through a `GrouplicenseMethods` instance. /// /// # Example /// @@ -12856,7 +13063,7 @@ impl<'a, C, NC, A> GrouplicenseListCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "enterpriseId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12909,7 +13116,7 @@ impl<'a, C, NC, A> GrouplicenseListCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12921,7 +13128,6 @@ impl<'a, C, NC, A> GrouplicenseListCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -12931,7 +13137,7 @@ impl<'a, C, NC, A> GrouplicenseListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12942,7 +13148,7 @@ impl<'a, C, NC, A> GrouplicenseListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12951,13 +13157,13 @@ impl<'a, C, NC, A> GrouplicenseListCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12969,7 +13175,7 @@ impl<'a, C, NC, A> GrouplicenseListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the enterprise. + /// The ID of the enterprise. pub fn enterprise_id(mut self, new_value: &str) -> GrouplicenseListCall<'a, C, NC, A> { self._enterprise_id = new_value.to_string(); self @@ -13030,7 +13236,7 @@ impl<'a, C, NC, A> GrouplicenseListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Retrieves details of an Android app permission for display to an enterprise admin. /// /// A builder for the *get* method supported by a *permission* resource. -/// It is not used directly, but through a `PermissionMethods`. +/// It is not used directly, but through a `PermissionMethods` instance. /// /// # Example /// @@ -13093,7 +13299,7 @@ impl<'a, C, NC, A> PermissionGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "permissionId", "language"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13146,7 +13352,7 @@ impl<'a, C, NC, A> PermissionGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13158,7 +13364,6 @@ impl<'a, C, NC, A> PermissionGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -13168,7 +13373,7 @@ impl<'a, C, NC, A> PermissionGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13179,7 +13384,7 @@ impl<'a, C, NC, A> PermissionGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13188,13 +13393,13 @@ impl<'a, C, NC, A> PermissionGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13206,7 +13411,7 @@ impl<'a, C, NC, A> PermissionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the permission. + /// The ID of the permission. pub fn permission_id(mut self, new_value: &str) -> PermissionGetCall<'a, C, NC, A> { self._permission_id = new_value.to_string(); self @@ -13214,7 +13419,7 @@ impl<'a, C, NC, A> PermissionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *language* query property to the given value. /// /// - /// The BCP47 tag for the user's preferred language (e.g. "en-US", "de") + /// The BCP47 tag for the user's preferred language (e.g. "en-US", "de") pub fn language(mut self, new_value: &str) -> PermissionGetCall<'a, C, NC, A> { self._language = Some(new_value.to_string()); self diff --git a/gen/androidpublisher2/Cargo.toml b/gen/androidpublisher2/Cargo.toml index a7693f7e4a..7c628a95d6 100644 --- a/gen/androidpublisher2/Cargo.toml +++ b/gen/androidpublisher2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-androidpublisher2" -version = "0.1.1+20150128" +version = "0.1.2+20150128" authors = ["Sebastian Thiel "] description = "A complete library to interact with Android Publisher (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/androidpublisher2" @@ -16,7 +16,7 @@ keywords = ["androidpublisher", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/androidpublisher2/README.md b/gen/androidpublisher2/README.md index 603d6db6a6..96979dfbb4 100644 --- a/gen/androidpublisher2/README.md +++ b/gen/androidpublisher2/README.md @@ -1,11 +1,11 @@ The `google-androidpublisher2` library allows access to all features of the *Google Android Publisher* service. -This documentation was generated from *Android Publisher* crate version *0.1.1+20150128*, where *20150128* is the exact revision of the *androidpublisher:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *Android Publisher* crate version *0.1.2+20150128*, where *20150128* is the exact revision of the *androidpublisher:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *Android Publisher* *v2* API can be found at the [official documentation site](https://developers.google.com/android-publisher). @@ -35,6 +35,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-androidpublisher2/struct.AndroidPublisher.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-androidpublisher2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-androidpublisher2/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-androidpublisher2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -44,6 +46,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-androidpublisher2/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -82,7 +86,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-androidpublisher2" as androidpublisher2; use androidpublisher2::InAppProduct; -use androidpublisher2::Result; +use androidpublisher2::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use androidpublisher2::AndroidPublisher; @@ -112,15 +116,17 @@ let result = hub.inappproducts().patch(&req, "packageName", "sku") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -133,7 +139,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-androidpublisher2/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-androidpublisher2/trait.ResponseResult.html), it will return that by default. @@ -156,8 +162,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-androidpublish ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-androidpublisher2/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-androidpublisher2/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-androidpublisher2/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-androidpublisher2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-androidpublisher2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/androidpublisher2/src/cmn.rs b/gen/androidpublisher2/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/androidpublisher2/src/cmn.rs +++ b/gen/androidpublisher2/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/androidpublisher2/src/lib.rs b/gen/androidpublisher2/src/lib.rs index 699da213d6..1a55cec65f 100644 --- a/gen/androidpublisher2/src/lib.rs +++ b/gen/androidpublisher2/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Android Publisher* crate version *0.1.1+20150128*, where *20150128* is the exact revision of the *androidpublisher:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *Android Publisher* crate version *0.1.2+20150128*, where *20150128* is the exact revision of the *androidpublisher:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *Android Publisher* *v2* API can be found at the //! [official documentation site](https://developers.google.com/android-publisher). @@ -35,6 +35,8 @@ //! //! * **[Hub](struct.AndroidPublisher.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -44,6 +46,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -82,7 +86,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-androidpublisher2" as androidpublisher2; //! use androidpublisher2::InAppProduct; -//! use androidpublisher2::Result; +//! use androidpublisher2::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -113,15 +117,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -134,7 +140,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -157,8 +163,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -207,7 +214,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -254,7 +261,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-androidpublisher2" as androidpublisher2; /// use androidpublisher2::InAppProduct; -/// use androidpublisher2::Result; +/// use androidpublisher2::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -285,15 +292,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -314,7 +323,7 @@ impl<'a, C, NC, A> AndroidPublisher AndroidPublisher { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -330,7 +339,7 @@ impl<'a, C, NC, A> AndroidPublisher } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -350,7 +359,7 @@ impl<'a, C, NC, A> AndroidPublisher /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InappproductsUpdateResponse { - /// no description provided + /// no description provided pub inappproduct: InAppProduct, } @@ -371,32 +380,32 @@ impl Part for InappproductsUpdateResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InAppProduct { - /// The stock-keeping-unit (SKU) of the product, unique within an app. + /// The stock-keeping-unit (SKU) of the product, unique within an app. pub sku: Option, - /// no description provided + /// no description provided pub status: Option, - /// The period of the subscription (if any), i.e. period at which payments must happen. Defined as ISO 8601 duration, i.e. "P1M" for 1 month period. + /// The period of the subscription (if any), i.e. period at which payments must happen. Defined as ISO 8601 duration, i.e. "P1M" for 1 month period. #[serde(alias="subscriptionPeriod")] pub subscription_period: Option, - /// Definition of a season for a seasonal subscription. Can be defined only for yearly subscriptions. + /// Definition of a season for a seasonal subscription. Can be defined only for yearly subscriptions. pub season: Option, - /// The package name of the parent app. + /// The package name of the parent app. #[serde(alias="packageName")] pub package_name: Option, - /// List of localized title and description data. + /// List of localized title and description data. pub listings: Option>, - /// Trial period, specified in ISO 8601 format. Acceptable values are anything between "P7D" (seven days) and "P999D" (999 days). Seasonal subscriptions cannot have a trial period. + /// Trial period, specified in ISO 8601 format. Acceptable values are anything between "P7D" (seven days) and "P999D" (999 days). Seasonal subscriptions cannot have a trial period. #[serde(alias="trialPeriod")] pub trial_period: Option, - /// Purchase type enum value. Unmodifiable after creation. + /// Purchase type enum value. Unmodifiable after creation. #[serde(alias="purchaseType")] pub purchase_type: Option, - /// The default language of the localized data, as defined by BCP 47. e.g. "en-US", "en-GB". + /// The default language of the localized data, as defined by BCP 47. e.g. "en-US", "en-GB". #[serde(alias="defaultLanguage")] pub default_language: Option, - /// Prices per buyer region. None of these prices should be zero. In-app products can never be free. + /// Prices per buyer region. None of these prices should be zero. In-app products can never be free. pub prices: Option>, - /// Default price cannot be zero. In-app products can never be free. Default price is always in the developer's Checkout merchant currency. + /// Default price cannot be zero. In-app products can never be free. Default price is always in the developer's Checkout merchant currency. #[serde(alias="defaultPrice")] pub default_price: Option, } @@ -417,7 +426,7 @@ impl ResponseResult for InAppProduct {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ImagesListResponse { - /// no description provided + /// no description provided pub images: Vec, } @@ -435,7 +444,7 @@ impl ResponseResult for ImagesListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ExpansionFilesUploadResponse { - /// no description provided + /// no description provided #[serde(alias="expansionFile")] pub expansion_file: ExpansionFile, } @@ -449,10 +458,10 @@ impl ResponseResult for ExpansionFilesUploadResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct SubscriptionDeferralInfo { - /// The expected expiry time for the subscription. If the current expiry time for the subscription is not the value specified here, the deferral will not occur. + /// The expected expiry time for the subscription. If the current expiry time for the subscription is not the value specified here, the deferral will not occur. #[serde(alias="expectedExpiryTimeMillis")] pub expected_expiry_time_millis: String, - /// The desired next expiry time for the subscription in milliseconds since Epoch. The given time must be after the current expiry time for the subscription. + /// The desired next expiry time for the subscription in milliseconds since Epoch. The given time must be after the current expiry time for the subscription. #[serde(alias="desiredExpiryTimeMillis")] pub desired_expiry_time_millis: String, } @@ -473,17 +482,17 @@ impl Part for SubscriptionDeferralInfo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Listing { - /// URL of a promotional YouTube video for the app. + /// URL of a promotional YouTube video for the app. pub video: Option, - /// Short description of the app (previously known as promo text); this may be up to 80 characters in length. + /// Short description of the app (previously known as promo text); this may be up to 80 characters in length. #[serde(alias="shortDescription")] pub short_description: Option, - /// Full description of the app; this may be up to 4000 characters in length. + /// Full description of the app; this may be up to 4000 characters in length. #[serde(alias="fullDescription")] pub full_description: Option, - /// Language localization code (for example, "de-AT" for Austrian German). + /// Language localization code (for example, "de-AT" for Austrian German). pub language: Option, - /// App's localized title. + /// App's localized title. pub title: Option, } @@ -502,7 +511,7 @@ impl ResponseResult for Listing {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct InappproductsBatchRequest { - /// no description provided + /// no description provided pub entrys: Option>, } @@ -515,9 +524,9 @@ impl RequestValue for InappproductsBatchRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MonthDay { - /// Day of a month, value in [1, 31] range. Valid range depends on the specified month. + /// Day of a month, value in [1, 31] range. Valid range depends on the specified month. pub day: u32, - /// Month of a year. e.g. 1 = JAN, 2 = FEB etc. + /// Month of a year. e.g. 1 = JAN, 2 = FEB etc. pub month: u32, } @@ -540,12 +549,12 @@ pub struct ProductPurchase { /// - Consumed #[serde(alias="consumptionState")] pub consumption_state: i32, - /// A developer-specified string that contains supplemental information about an order. + /// A developer-specified string that contains supplemental information about an order. #[serde(alias="developerPayload")] pub developer_payload: String, - /// This kind represents an inappPurchase object in the androidpublisher service. + /// This kind represents an inappPurchase object in the androidpublisher service. pub kind: String, - /// The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970). + /// The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970). #[serde(alias="purchaseTimeMillis")] pub purchase_time_millis: String, /// The purchase state of the order. Possible values are: @@ -569,9 +578,9 @@ impl ResponseResult for ProductPurchase {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ApkListingsListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#apkListingsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#apkListingsListResponse". pub kind: String, - /// no description provided + /// no description provided pub listings: Vec, } @@ -589,7 +598,7 @@ impl ResponseResult for ApkListingsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ImagesDeleteAllResponse { - /// no description provided + /// no description provided pub deleted: Vec, } @@ -609,12 +618,12 @@ impl ResponseResult for ImagesDeleteAllResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Track { - /// no description provided + /// no description provided pub track: Option, - /// no description provided + /// no description provided #[serde(alias="userFraction")] pub user_fraction: Option, - /// no description provided + /// no description provided #[serde(alias="versionCodes")] pub version_codes: Option>, } @@ -629,9 +638,9 @@ impl ResponseResult for Track {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Season { - /// Inclusive start date of the recurrence period. + /// Inclusive start date of the recurrence period. pub start: MonthDay, - /// Inclusive end date of the recurrence period. + /// Inclusive end date of the recurrence period. pub end: MonthDay, } @@ -644,9 +653,9 @@ impl Part for Season {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InAppProductListing { - /// no description provided + /// no description provided pub description: String, - /// no description provided + /// no description provided pub title: String, } @@ -664,7 +673,7 @@ impl Part for InAppProductListing {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct SubscriptionPurchasesDeferRequest { - /// The information about the new desired expiry time for the subscription. + /// The information about the new desired expiry time for the subscription. #[serde(alias="deferralInfo")] pub deferral_info: Option, } @@ -678,7 +687,7 @@ impl RequestValue for SubscriptionPurchasesDeferRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InappproductsInsertResponse { - /// no description provided + /// no description provided pub inappproduct: InAppProduct, } @@ -691,49 +700,49 @@ impl Part for InappproductsInsertResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ExternallyHostedApk { - /// The icon image from the APK, as a base64 encoded byte array. + /// The icon image from the APK, as a base64 encoded byte array. #[serde(alias="iconBase64")] pub icon_base64: String, - /// A certificate (or array of certificates if a certificate-chain is used) used to signed this APK, represented as a base64 encoded byte array. + /// A certificate (or array of certificates if a certificate-chain is used) used to signed this APK, represented as a base64 encoded byte array. #[serde(alias="certificateBase64s")] pub certificate_base64s: Vec, - /// The URL at which the APK is hosted. This must be an https URL. + /// The URL at which the APK is hosted. This must be an https URL. #[serde(alias="externallyHostedUrl")] pub externally_hosted_url: String, - /// The maximum SDK supported by this APK (optional). + /// The maximum SDK supported by this APK (optional). #[serde(alias="maximumSdk")] pub maximum_sdk: i32, - /// The SHA256 checksum of this APK, represented as a base64 encoded byte array. + /// The SHA256 checksum of this APK, represented as a base64 encoded byte array. #[serde(alias="fileSha256Base64")] pub file_sha256_base64: String, - /// The permissions requested by this APK. + /// The permissions requested by this APK. #[serde(alias="usesPermissions")] pub uses_permissions: Vec, - /// The SHA1 checksum of this APK, represented as a base64 encoded byte array. + /// The SHA1 checksum of this APK, represented as a base64 encoded byte array. #[serde(alias="fileSha1Base64")] pub file_sha1_base64: String, - /// The features required by this APK (optional). + /// The features required by this APK (optional). #[serde(alias="usesFeatures")] pub uses_features: Vec, - /// The native code environments supported by this APK (optional). + /// The native code environments supported by this APK (optional). #[serde(alias="nativeCodes")] pub native_codes: Vec, - /// The file size in bytes of this APK. + /// The file size in bytes of this APK. #[serde(alias="fileSize")] pub file_size: String, - /// The version name of this APK. + /// The version name of this APK. #[serde(alias="versionName")] pub version_name: String, - /// The version code of this APK. + /// The version code of this APK. #[serde(alias="versionCode")] pub version_code: i32, - /// The minimum SDK targeted by this APK. + /// The minimum SDK targeted by this APK. #[serde(alias="minimumSdk")] pub minimum_sdk: i32, - /// The application label. + /// The application label. #[serde(alias="applicationLabel")] pub application_label: String, - /// The package name. + /// The package name. #[serde(alias="packageName")] pub package_name: String, } @@ -754,16 +763,16 @@ impl Part for ExternallyHostedApk {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AppDetails { - /// The user-visible support email for this app. + /// The user-visible support email for this app. #[serde(alias="contactEmail")] pub contact_email: Option, - /// The user-visible support telephone number for this app. + /// The user-visible support telephone number for this app. #[serde(alias="contactPhone")] pub contact_phone: Option, - /// The user-visible website for this app. + /// The user-visible website for this app. #[serde(alias="contactWebsite")] pub contact_website: Option, - /// Default language code, in BCP 47 format (eg "en-US"). + /// Default language code, in BCP 47 format (eg "en-US"). #[serde(alias="defaultLanguage")] pub default_language: Option, } @@ -778,12 +787,12 @@ impl ResponseResult for AppDetails {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InappproductsBatchResponseEntry { - /// no description provided + /// no description provided #[serde(alias="batchId")] pub batch_id: u32, - /// no description provided + /// no description provided pub inappproductsinsertresponse: InappproductsInsertResponse, - /// no description provided + /// no description provided pub inappproductsupdateresponse: InappproductsUpdateResponse, } @@ -796,7 +805,7 @@ impl Part for InappproductsBatchResponseEntry {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct InappproductsInsertRequest { - /// no description provided + /// no description provided pub inappproduct: InAppProduct, } @@ -809,10 +818,10 @@ impl Part for InappproductsInsertRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ExternallyHostedApkUsesPermission { - /// Optionally, the maximum SDK version for which the permission is required. + /// Optionally, the maximum SDK version for which the permission is required. #[serde(alias="maxSdkVersion")] pub max_sdk_version: i32, - /// The name of the permission requested. + /// The name of the permission requested. pub name: String, } @@ -825,15 +834,15 @@ impl Part for ExternallyHostedApkUsesPermission {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct InappproductsBatchRequestEntry { - /// no description provided + /// no description provided #[serde(alias="batchId")] pub batch_id: u32, - /// no description provided + /// no description provided pub inappproductsinsertrequest: InappproductsInsertRequest, - /// no description provided + /// no description provided #[serde(alias="methodName")] pub method_name: String, - /// no description provided + /// no description provided pub inappproductsupdaterequest: InappproductsUpdateRequest, } @@ -851,9 +860,9 @@ impl Part for InappproductsBatchRequestEntry {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TracksListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#tracksListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#tracksListResponse". pub kind: String, - /// no description provided + /// no description provided pub tracks: Vec, } @@ -871,7 +880,7 @@ impl ResponseResult for TracksListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SubscriptionPurchasesDeferResponse { - /// The new expiry time for the subscription in milliseconds since the Epoch. + /// The new expiry time for the subscription in milliseconds since the Epoch. #[serde(alias="newExpiryTimeMillis")] pub new_expiry_time_millis: String, } @@ -890,15 +899,15 @@ impl ResponseResult for SubscriptionPurchasesDeferResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InappproductsListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#inappproductsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#inappproductsListResponse". pub kind: String, - /// no description provided + /// no description provided #[serde(alias="tokenPagination")] pub token_pagination: TokenPagination, - /// no description provided + /// no description provided #[serde(alias="pageInfo")] pub page_info: PageInfo, - /// no description provided + /// no description provided pub inappproduct: Vec, } @@ -911,10 +920,10 @@ impl ResponseResult for InappproductsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TokenPagination { - /// no description provided + /// no description provided #[serde(alias="nextPageToken")] pub next_page_token: String, - /// no description provided + /// no description provided #[serde(alias="previousPageToken")] pub previous_page_token: String, } @@ -935,10 +944,10 @@ impl Part for TokenPagination {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ApkListing { - /// Describe what's new in your APK. + /// Describe what's new in your APK. #[serde(alias="recentChanges")] pub recent_changes: Option, - /// The language code, in BCP 47 format (eg "en-US"). + /// The language code, in BCP 47 format (eg "en-US"). pub language: Option, } @@ -959,10 +968,10 @@ impl ResponseResult for ApkListing {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Testers { - /// no description provided + /// no description provided #[serde(alias="googleGroups")] pub google_groups: Option>, - /// no description provided + /// no description provided #[serde(alias="googlePlusCommunities")] pub google_plus_communities: Option>, } @@ -984,10 +993,10 @@ impl ResponseResult for Testers {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ExpansionFile { - /// If set this APK's Expansion File references another APK's Expansion File. The file_size field will not be set. + /// If set this APK's Expansion File references another APK's Expansion File. The file_size field will not be set. #[serde(alias="referencesVersion")] pub references_version: Option, - /// If set this field indicates that this APK has an Expansion File uploaded to it: this APK does not reference another APK's Expansion File. The field's value is the size of the uploaded Expansion File in bytes. + /// If set this field indicates that this APK has an Expansion File uploaded to it: this APK does not reference another APK's Expansion File. The field's value is the size of the uploaded Expansion File in bytes. #[serde(alias="fileSize")] pub file_size: Option, } @@ -1007,7 +1016,7 @@ impl ResponseResult for ExpansionFile {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ApksAddExternallyHostedResponse { - /// The definition of the externally-hosted APK and where it is located. + /// The definition of the externally-hosted APK and where it is located. #[serde(alias="externallyHostedApk")] pub externally_hosted_apk: ExternallyHostedApk, } @@ -1026,15 +1035,15 @@ impl ResponseResult for ApksAddExternallyHostedResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SubscriptionPurchase { - /// Whether the subscription will automatically be renewed when it reaches its current expiry time. + /// Whether the subscription will automatically be renewed when it reaches its current expiry time. #[serde(alias="autoRenewing")] pub auto_renewing: bool, - /// This kind represents a subscriptionPurchase object in the androidpublisher service. + /// This kind represents a subscriptionPurchase object in the androidpublisher service. pub kind: String, - /// Time at which the subscription will expire, in milliseconds since Epoch. + /// Time at which the subscription will expire, in milliseconds since Epoch. #[serde(alias="expiryTimeMillis")] pub expiry_time_millis: String, - /// Time at which the subscription was granted, in milliseconds since Epoch. + /// Time at which the subscription was granted, in milliseconds since Epoch. #[serde(alias="startTimeMillis")] pub start_time_millis: String, } @@ -1056,10 +1065,10 @@ impl ResponseResult for SubscriptionPurchase {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AppEdit { - /// The time at which the edit will expire and will be no longer valid for use in any subsequent API calls (encoded as seconds since the Epoch). + /// The time at which the edit will expire and will be no longer valid for use in any subsequent API calls (encoded as seconds since the Epoch). #[serde(alias="expiryTimeSeconds")] pub expiry_time_seconds: Option, - /// The ID of the edit that can be used in subsequent API calls. + /// The ID of the edit that can be used in subsequent API calls. pub id: Option, } @@ -1078,9 +1087,9 @@ impl ResponseResult for AppEdit {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ApksListResponse { - /// no description provided + /// no description provided pub apks: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#apksListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#apksListResponse". pub kind: String, } @@ -1093,7 +1102,7 @@ impl ResponseResult for ApksListResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct InappproductsUpdateRequest { - /// no description provided + /// no description provided pub inappproduct: InAppProduct, } @@ -1106,13 +1115,13 @@ impl Part for InappproductsUpdateRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PageInfo { - /// no description provided + /// no description provided #[serde(alias="resultPerPage")] pub result_per_page: i32, - /// no description provided + /// no description provided #[serde(alias="startIndex")] pub start_index: i32, - /// no description provided + /// no description provided #[serde(alias="totalResults")] pub total_results: i32, } @@ -1131,7 +1140,7 @@ impl Part for PageInfo {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ImagesUploadResponse { - /// no description provided + /// no description provided pub image: Image, } @@ -1149,10 +1158,10 @@ impl ResponseResult for ImagesUploadResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Apk { - /// The version code of the APK, as specified in the APK's manifest file. + /// The version code of the APK, as specified in the APK's manifest file. #[serde(alias="versionCode")] pub version_code: i32, - /// Information about the binary payload of this APK. + /// Information about the binary payload of this APK. pub binary: ApkBinary, } @@ -1170,9 +1179,9 @@ impl ResponseResult for Apk {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InappproductsBatchResponse { - /// no description provided + /// no description provided pub entrys: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#inappproductsBatchResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#inappproductsBatchResponse". pub kind: String, } @@ -1185,11 +1194,11 @@ impl ResponseResult for InappproductsBatchResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Image { - /// A URL that will serve a preview of the image. + /// A URL that will serve a preview of the image. pub url: String, - /// A sha1 hash of the image that was uploaded. + /// A sha1 hash of the image that was uploaded. pub sha1: String, - /// A unique id representing this image. + /// A unique id representing this image. pub id: String, } @@ -1207,7 +1216,7 @@ impl Part for Image {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct ApksAddExternallyHostedRequest { - /// The definition of the externally-hosted APK and where it is located. + /// The definition of the externally-hosted APK and where it is located. #[serde(alias="externallyHostedApk")] pub externally_hosted_apk: Option, } @@ -1221,7 +1230,7 @@ impl RequestValue for ApksAddExternallyHostedRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ApkBinary { - /// A sha1 hash of the APK payload, encoded as a hex string and matching the output of the sha1sum command. + /// A sha1 hash of the APK payload, encoded as a hex string and matching the output of the sha1sum command. pub sha1: String, } @@ -1234,9 +1243,9 @@ impl Part for ApkBinary {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Price { - /// 3 letter Currency code, as defined by ISO 4217. + /// 3 letter Currency code, as defined by ISO 4217. pub currency: String, - /// The price in millionths of the currency base unit represented as a string. + /// The price in millionths of the currency base unit represented as a string. #[serde(alias="priceMicros")] pub price_micros: String, } @@ -1255,9 +1264,9 @@ impl Part for Price {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ListingsListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#listingsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "androidpublisher#listingsListResponse". pub kind: String, - /// no description provided + /// no description provided pub listings: Vec, } @@ -1303,13 +1312,19 @@ pub struct PurchaseMethods<'a, C, NC, A> hub: &'a AndroidPublisher, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PurchaseMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PurchaseMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PurchaseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Refunds and immediately revokes a user's subscription purchase. Access to the subscription will be terminated immediately and it will stop recurring. + /// Refunds and immediately revokes a user's subscription purchase. Access to the subscription will be terminated immediately and it will stop recurring. + /// + /// # Arguments + /// + /// * `packageName` - The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + /// * `subscriptionId` - The purchased subscription ID (for example, 'monthly001'). + /// * `token` - The token provided to the user's device when the subscription was purchased. pub fn subscriptions_revoke(&self, package_name: &str, subscription_id: &str, token: &str) -> PurchaseSubscriptionRevokeCall<'a, C, NC, A> { PurchaseSubscriptionRevokeCall { hub: self.hub, @@ -1324,7 +1339,13 @@ impl<'a, C, NC, A> PurchaseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Checks the purchase and consumption status of an inapp item. + /// Checks the purchase and consumption status of an inapp item. + /// + /// # Arguments + /// + /// * `packageName` - The package name of the application the inapp product was sold in (for example, 'com.some.thing'). + /// * `productId` - The inapp product SKU (for example, 'com.some.thing.inapp1'). + /// * `token` - The token provided to the user's device when the inapp product was purchased. pub fn products_get(&self, package_name: &str, product_id: &str, token: &str) -> PurchaseProductGetCall<'a, C, NC, A> { PurchaseProductGetCall { hub: self.hub, @@ -1339,7 +1360,13 @@ impl<'a, C, NC, A> PurchaseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Checks whether a user's subscription purchase is valid and returns its expiry time. + /// Checks whether a user's subscription purchase is valid and returns its expiry time. + /// + /// # Arguments + /// + /// * `packageName` - The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + /// * `subscriptionId` - The purchased subscription ID (for example, 'monthly001'). + /// * `token` - The token provided to the user's device when the subscription was purchased. pub fn subscriptions_get(&self, package_name: &str, subscription_id: &str, token: &str) -> PurchaseSubscriptionGetCall<'a, C, NC, A> { PurchaseSubscriptionGetCall { hub: self.hub, @@ -1354,7 +1381,13 @@ impl<'a, C, NC, A> PurchaseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Cancels a user's subscription purchase. The subscription remains valid until its expiration time. + /// Cancels a user's subscription purchase. The subscription remains valid until its expiration time. + /// + /// # Arguments + /// + /// * `packageName` - The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + /// * `subscriptionId` - The purchased subscription ID (for example, 'monthly001'). + /// * `token` - The token provided to the user's device when the subscription was purchased. pub fn subscriptions_cancel(&self, package_name: &str, subscription_id: &str, token: &str) -> PurchaseSubscriptionCancelCall<'a, C, NC, A> { PurchaseSubscriptionCancelCall { hub: self.hub, @@ -1369,7 +1402,13 @@ impl<'a, C, NC, A> PurchaseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Refunds a user's subscription purchase, but the subscription remains valid until its expiration time and it will continue to recur. + /// Refunds a user's subscription purchase, but the subscription remains valid until its expiration time and it will continue to recur. + /// + /// # Arguments + /// + /// * `packageName` - The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + /// * `subscriptionId` - The purchased subscription ID (for example, 'monthly001'). + /// * `token` - The token provided to the user's device when the subscription was purchased. pub fn subscriptions_refund(&self, package_name: &str, subscription_id: &str, token: &str) -> PurchaseSubscriptionRefundCall<'a, C, NC, A> { PurchaseSubscriptionRefundCall { hub: self.hub, @@ -1384,7 +1423,14 @@ impl<'a, C, NC, A> PurchaseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Defers a user's subscription purchase until a specified future expiration time. + /// Defers a user's subscription purchase until a specified future expiration time. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + /// * `subscriptionId` - The purchased subscription ID (for example, 'monthly001'). + /// * `token` - The token provided to the user's device when the subscription was purchased. pub fn subscriptions_defer(&self, request: &SubscriptionPurchasesDeferRequest, package_name: &str, subscription_id: &str, token: &str) -> PurchaseSubscriptionDeferCall<'a, C, NC, A> { PurchaseSubscriptionDeferCall { hub: self.hub, @@ -1435,13 +1481,20 @@ pub struct EditMethods<'a, C, NC, A> hub: &'a AndroidPublisher, } -impl<'a, C, NC, A> ResourceMethodsBuilder for EditMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for EditMethods<'a, C, NC, A> {} impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Uploads a new image and adds it to the list of images for the specified language and image type. + /// Uploads a new image and adds it to the list of images for the specified language and image type. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `language` - The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + /// * `imageType` - No description provided. pub fn images_upload(&self, package_name: &str, edit_id: &str, language: &str, image_type: &str) -> EditImageUploadCall<'a, C, NC, A> { EditImageUploadCall { hub: self.hub, @@ -1457,7 +1510,15 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the APK's Expansion File configuration to reference another APK's Expansion Files. To add a new Expansion File use the Upload method. + /// Updates the APK's Expansion File configuration to reference another APK's Expansion Files. To add a new Expansion File use the Upload method. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `apkVersionCode` - The version code of the APK whose Expansion File configuration is being read or modified. + /// * `expansionFileType` - No description provided. pub fn expansionfiles_update(&self, request: &ExpansionFile, package_name: &str, edit_id: &str, apk_version_code: i32, expansion_file_type: &str) -> EditExpansionfileUpdateCall<'a, C, NC, A> { EditExpansionfileUpdateCall { hub: self.hub, @@ -1474,7 +1535,12 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Fetches app details for this edit. This includes the default language and developer support contact information. + /// Fetches app details for this edit. This includes the default language and developer support contact information. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. pub fn details_get(&self, package_name: &str, edit_id: &str) -> EditDetailGetCall<'a, C, NC, A> { EditDetailGetCall { hub: self.hub, @@ -1488,7 +1554,14 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the APK-specific localized listing for a specified APK and language code. + /// Deletes the APK-specific localized listing for a specified APK and language code. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `apkVersionCode` - The APK version code whose APK-specific listings should be read or modified. + /// * `language` - The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn apklistings_delete(&self, package_name: &str, edit_id: &str, apk_version_code: i32, language: &str) -> EditApklistingDeleteCall<'a, C, NC, A> { EditApklistingDeleteCall { hub: self.hub, @@ -1504,7 +1577,12 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes all localized listings from an edit. + /// Deletes all localized listings from an edit. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. pub fn listings_deleteall(&self, package_name: &str, edit_id: &str) -> EditListingDeleteallCall<'a, C, NC, A> { EditListingDeleteallCall { hub: self.hub, @@ -1518,7 +1596,13 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a new APK without uploading the APK itself to Google Play, instead hosting the APK at a specified URL. This function is only available to enterprises using Google Play for work whose application is configured to restrict distribution to the enterprise domain. + /// Creates a new APK without uploading the APK itself to Google Play, instead hosting the APK at a specified URL. This function is only available to enterprises using Google Play for work whose application is configured to restrict distribution to the enterprise domain. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. pub fn apks_addexternallyhosted(&self, request: &ApksAddExternallyHostedRequest, package_name: &str, edit_id: &str) -> EditApkAddexternallyhostedCall<'a, C, NC, A> { EditApkAddexternallyhostedCall { hub: self.hub, @@ -1533,7 +1617,13 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes all the APK-specific localized listings for a specified APK. + /// Deletes all the APK-specific localized listings for a specified APK. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `apkVersionCode` - The APK version code whose APK-specific listings should be read or modified. pub fn apklistings_deleteall(&self, package_name: &str, edit_id: &str, apk_version_code: i32) -> EditApklistingDeleteallCall<'a, C, NC, A> { EditApklistingDeleteallCall { hub: self.hub, @@ -1548,7 +1638,13 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates app details for this edit. + /// Updates app details for this edit. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. pub fn details_update(&self, request: &AppDetails, package_name: &str, edit_id: &str) -> EditDetailUpdateCall<'a, C, NC, A> { EditDetailUpdateCall { hub: self.hub, @@ -1563,7 +1659,13 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Fetches the track configuration for the specified track type. Includes the APK version codes that are in this track. + /// Fetches the track configuration for the specified track type. Includes the APK version codes that are in this track. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `track` - The track type to read or modify. pub fn tracks_get(&self, package_name: &str, edit_id: &str, track: &str) -> EditTrackGetCall<'a, C, NC, A> { EditTrackGetCall { hub: self.hub, @@ -1578,7 +1680,15 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the APK's Expansion File configuration to reference another APK's Expansion Files. To add a new Expansion File use the Upload method. This method supports patch semantics. + /// Updates the APK's Expansion File configuration to reference another APK's Expansion Files. To add a new Expansion File use the Upload method. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `apkVersionCode` - The version code of the APK whose Expansion File configuration is being read or modified. + /// * `expansionFileType` - No description provided. pub fn expansionfiles_patch(&self, request: &ExpansionFile, package_name: &str, edit_id: &str, apk_version_code: i32, expansion_file_type: &str) -> EditExpansionfilePatchCall<'a, C, NC, A> { EditExpansionfilePatchCall { hub: self.hub, @@ -1595,7 +1705,14 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all images for the specified language and image type. + /// Lists all images for the specified language and image type. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `language` - The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + /// * `imageType` - No description provided. pub fn images_list(&self, package_name: &str, edit_id: &str, language: &str, image_type: &str) -> EditImageListCall<'a, C, NC, A> { EditImageListCall { hub: self.hub, @@ -1611,7 +1728,14 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the track configuration for the specified track type. When halted, the rollout track cannot be updated without adding new APKs, and adding new APKs will cause it to resume. + /// Updates the track configuration for the specified track type. When halted, the rollout track cannot be updated without adding new APKs, and adding new APKs will cause it to resume. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `track` - The track type to read or modify. pub fn tracks_update(&self, request: &Track, package_name: &str, edit_id: &str, track: &str) -> EditTrackUpdateCall<'a, C, NC, A> { EditTrackUpdateCall { hub: self.hub, @@ -1627,7 +1751,14 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates or updates a localized store listing. This method supports patch semantics. + /// Creates or updates a localized store listing. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `language` - The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn listings_patch(&self, request: &Listing, package_name: &str, edit_id: &str, language: &str) -> EditListingPatchCall<'a, C, NC, A> { EditListingPatchCall { hub: self.hub, @@ -1643,7 +1774,12 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns information about the edit specified. Calls will fail if the edit is no long active (e.g. has been deleted, superseded or expired). + /// Returns information about the edit specified. Calls will fail if the edit is no long active (e.g. has been deleted, superseded or expired). + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. pub fn get(&self, package_name: &str, edit_id: &str) -> EditGetCall<'a, C, NC, A> { EditGetCall { hub: self.hub, @@ -1657,7 +1793,15 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the image (specified by id) from the edit. + /// Deletes the image (specified by id) from the edit. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `language` - The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + /// * `imageType` - No description provided. + /// * `imageId` - Unique identifier an image within the set of images attached to this edit. pub fn images_delete(&self, package_name: &str, edit_id: &str, language: &str, image_type: &str, image_id: &str) -> EditImageDeleteCall<'a, C, NC, A> { EditImageDeleteCall { hub: self.hub, @@ -1672,6 +1816,11 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { } } + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. pub fn apks_upload(&self, package_name: &str, edit_id: &str) -> EditApkUploadCall<'a, C, NC, A> { EditApkUploadCall { hub: self.hub, @@ -1685,7 +1834,15 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates or creates the APK-specific localized listing for a specified APK and language code. + /// Updates or creates the APK-specific localized listing for a specified APK and language code. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `apkVersionCode` - The APK version code whose APK-specific listings should be read or modified. + /// * `language` - The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn apklistings_update(&self, request: &ApkListing, package_name: &str, edit_id: &str, apk_version_code: i32, language: &str) -> EditApklistingUpdateCall<'a, C, NC, A> { EditApklistingUpdateCall { hub: self.hub, @@ -1700,6 +1857,11 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { } } + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. pub fn apks_list(&self, package_name: &str, edit_id: &str) -> EditApkListCall<'a, C, NC, A> { EditApkListCall { hub: self.hub, @@ -1713,7 +1875,15 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates or creates the APK-specific localized listing for a specified APK and language code. This method supports patch semantics. + /// Updates or creates the APK-specific localized listing for a specified APK and language code. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `apkVersionCode` - The APK version code whose APK-specific listings should be read or modified. + /// * `language` - The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn apklistings_patch(&self, request: &ApkListing, package_name: &str, edit_id: &str, apk_version_code: i32, language: &str) -> EditApklistingPatchCall<'a, C, NC, A> { EditApklistingPatchCall { hub: self.hub, @@ -1730,7 +1900,13 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Fetches information about a localized store listing. + /// Fetches information about a localized store listing. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `language` - The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn listings_get(&self, package_name: &str, edit_id: &str, language: &str) -> EditListingGetCall<'a, C, NC, A> { EditListingGetCall { hub: self.hub, @@ -1743,6 +1919,12 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { } } + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `track` - No description provided. pub fn testers_get(&self, package_name: &str, edit_id: &str, track: &str) -> EditTesterGetCall<'a, C, NC, A> { EditTesterGetCall { hub: self.hub, @@ -1757,7 +1939,12 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an edit for an app. Creating a new edit will automatically delete any of your previous edits so this method need only be called if you want to preemptively abandon an edit. + /// Deletes an edit for an app. Creating a new edit will automatically delete any of your previous edits so this method need only be called if you want to preemptively abandon an edit. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. pub fn delete(&self, package_name: &str, edit_id: &str) -> EditDeleteCall<'a, C, NC, A> { EditDeleteCall { hub: self.hub, @@ -1771,7 +1958,14 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Uploads and attaches a new Expansion File to the APK specified. + /// Uploads and attaches a new Expansion File to the APK specified. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `apkVersionCode` - The version code of the APK whose Expansion File configuration is being read or modified. + /// * `expansionFileType` - No description provided. pub fn expansionfiles_upload(&self, package_name: &str, edit_id: &str, apk_version_code: i32, expansion_file_type: &str) -> EditExpansionfileUploadCall<'a, C, NC, A> { EditExpansionfileUploadCall { hub: self.hub, @@ -1787,7 +1981,12 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a new edit for an app, populated with the app's current state. + /// Creates a new edit for an app, populated with the app's current state. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn insert(&self, request: &AppEdit, package_name: &str) -> EditInsertCall<'a, C, NC, A> { EditInsertCall { hub: self.hub, @@ -1801,7 +2000,12 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns all of the localized store listings attached to this edit. + /// Returns all of the localized store listings attached to this edit. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. pub fn listings_list(&self, package_name: &str, edit_id: &str) -> EditListingListCall<'a, C, NC, A> { EditListingListCall { hub: self.hub, @@ -1813,6 +2017,13 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { } } + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `track` - No description provided. pub fn testers_patch(&self, request: &Testers, package_name: &str, edit_id: &str, track: &str) -> EditTesterPatchCall<'a, C, NC, A> { EditTesterPatchCall { hub: self.hub, @@ -1828,7 +2039,12 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Commits/applies the changes made in this edit back to the app. + /// Commits/applies the changes made in this edit back to the app. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. pub fn commit(&self, package_name: &str, edit_id: &str) -> EditCommitCall<'a, C, NC, A> { EditCommitCall { hub: self.hub, @@ -1842,7 +2058,12 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all the track configurations for this edit. + /// Lists all the track configurations for this edit. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. pub fn tracks_list(&self, package_name: &str, edit_id: &str) -> EditTrackListCall<'a, C, NC, A> { EditTrackListCall { hub: self.hub, @@ -1856,7 +2077,12 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Checks that the edit can be successfully committed. The edit's changes are not applied to the live app. + /// Checks that the edit can be successfully committed. The edit's changes are not applied to the live app. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. pub fn validate(&self, package_name: &str, edit_id: &str) -> EditValidateCall<'a, C, NC, A> { EditValidateCall { hub: self.hub, @@ -1870,7 +2096,14 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates or updates a localized store listing. + /// Creates or updates a localized store listing. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `language` - The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn listings_update(&self, request: &Listing, package_name: &str, edit_id: &str, language: &str) -> EditListingUpdateCall<'a, C, NC, A> { EditListingUpdateCall { hub: self.hub, @@ -1886,7 +2119,14 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Fetches the Expansion File configuration for the APK specified. + /// Fetches the Expansion File configuration for the APK specified. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `apkVersionCode` - The version code of the APK whose Expansion File configuration is being read or modified. + /// * `expansionFileType` - No description provided. pub fn expansionfiles_get(&self, package_name: &str, edit_id: &str, apk_version_code: i32, expansion_file_type: &str) -> EditExpansionfileGetCall<'a, C, NC, A> { EditExpansionfileGetCall { hub: self.hub, @@ -1902,7 +2142,14 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes all images for the specified language and image type. + /// Deletes all images for the specified language and image type. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `language` - The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + /// * `imageType` - No description provided. pub fn images_deleteall(&self, package_name: &str, edit_id: &str, language: &str, image_type: &str) -> EditImageDeleteallCall<'a, C, NC, A> { EditImageDeleteallCall { hub: self.hub, @@ -1918,7 +2165,13 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates app details for this edit. This method supports patch semantics. + /// Updates app details for this edit. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. pub fn details_patch(&self, request: &AppDetails, package_name: &str, edit_id: &str) -> EditDetailPatchCall<'a, C, NC, A> { EditDetailPatchCall { hub: self.hub, @@ -1933,7 +2186,14 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the track configuration for the specified track type. When halted, the rollout track cannot be updated without adding new APKs, and adding new APKs will cause it to resume. This method supports patch semantics. + /// Updates the track configuration for the specified track type. When halted, the rollout track cannot be updated without adding new APKs, and adding new APKs will cause it to resume. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `track` - The track type to read or modify. pub fn tracks_patch(&self, request: &Track, package_name: &str, edit_id: &str, track: &str) -> EditTrackPatchCall<'a, C, NC, A> { EditTrackPatchCall { hub: self.hub, @@ -1949,7 +2209,13 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified localized store listing from an edit. + /// Deletes the specified localized store listing from an edit. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `language` - The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn listings_delete(&self, package_name: &str, edit_id: &str, language: &str) -> EditListingDeleteCall<'a, C, NC, A> { EditListingDeleteCall { hub: self.hub, @@ -1964,7 +2230,14 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Fetches the APK-specific localized listing for a specified APK and language code. + /// Fetches the APK-specific localized listing for a specified APK and language code. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `apkVersionCode` - The APK version code whose APK-specific listings should be read or modified. + /// * `language` - The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn apklistings_get(&self, package_name: &str, edit_id: &str, apk_version_code: i32, language: &str) -> EditApklistingGetCall<'a, C, NC, A> { EditApklistingGetCall { hub: self.hub, @@ -1978,6 +2251,13 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { } } + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `track` - No description provided. pub fn testers_update(&self, request: &Testers, package_name: &str, edit_id: &str, track: &str) -> EditTesterUpdateCall<'a, C, NC, A> { EditTesterUpdateCall { hub: self.hub, @@ -1993,7 +2273,13 @@ impl<'a, C, NC, A> EditMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all the APK-specific localized listings for a specified APK. + /// Lists all the APK-specific localized listings for a specified APK. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// * `editId` - Unique identifier for this edit. + /// * `apkVersionCode` - The APK version code whose APK-specific listings should be read or modified. pub fn apklistings_list(&self, package_name: &str, edit_id: &str, apk_version_code: i32) -> EditApklistingListCall<'a, C, NC, A> { EditApklistingListCall { hub: self.hub, @@ -2043,10 +2329,14 @@ pub struct InappproductMethods<'a, C, NC, A> hub: &'a AndroidPublisher, } -impl<'a, C, NC, A> ResourceMethodsBuilder for InappproductMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for InappproductMethods<'a, C, NC, A> {} impl<'a, C, NC, A> InappproductMethods<'a, C, NC, A> { + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn batch(&self, request: &InappproductsBatchRequest) -> InappproductBatchCall<'a, C, NC, A> { InappproductBatchCall { hub: self.hub, @@ -2059,7 +2349,11 @@ impl<'a, C, NC, A> InappproductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List all the in-app products for an Android app, both subscriptions and managed in-app products.. + /// List all the in-app products for an Android app, both subscriptions and managed in-app products.. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app with in-app products; for example, "com.spiffygame". pub fn list(&self, package_name: &str) -> InappproductListCall<'a, C, NC, A> { InappproductListCall { hub: self.hub, @@ -2075,7 +2369,12 @@ impl<'a, C, NC, A> InappproductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a new in-app product for an app. + /// Creates a new in-app product for an app. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app; for example, "com.spiffygame". pub fn insert(&self, request: &InAppProduct, package_name: &str) -> InappproductInsertCall<'a, C, NC, A> { InappproductInsertCall { hub: self.hub, @@ -2090,7 +2389,12 @@ impl<'a, C, NC, A> InappproductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete an in-app product for an app. + /// Delete an in-app product for an app. + /// + /// # Arguments + /// + /// * `packageName` - Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". + /// * `sku` - Unique identifier for the in-app product. pub fn delete(&self, package_name: &str, sku: &str) -> InappproductDeleteCall<'a, C, NC, A> { InappproductDeleteCall { hub: self.hub, @@ -2104,7 +2408,12 @@ impl<'a, C, NC, A> InappproductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns information about the in-app product specified. + /// Returns information about the in-app product specified. + /// + /// # Arguments + /// + /// * `packageName` - No description provided. + /// * `sku` - Unique identifier for the in-app product. pub fn get(&self, package_name: &str, sku: &str) -> InappproductGetCall<'a, C, NC, A> { InappproductGetCall { hub: self.hub, @@ -2118,7 +2427,13 @@ impl<'a, C, NC, A> InappproductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the details of an in-app product. + /// Updates the details of an in-app product. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". + /// * `sku` - Unique identifier for the in-app product. pub fn update(&self, request: &InAppProduct, package_name: &str, sku: &str) -> InappproductUpdateCall<'a, C, NC, A> { InappproductUpdateCall { hub: self.hub, @@ -2134,7 +2449,13 @@ impl<'a, C, NC, A> InappproductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the details of an in-app product. This method supports patch semantics. + /// Updates the details of an in-app product. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `packageName` - Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". + /// * `sku` - Unique identifier for the in-app product. pub fn patch(&self, request: &InAppProduct, package_name: &str, sku: &str) -> InappproductPatchCall<'a, C, NC, A> { InappproductPatchCall { hub: self.hub, @@ -2160,7 +2481,7 @@ impl<'a, C, NC, A> InappproductMethods<'a, C, NC, A> { /// Refunds and immediately revokes a user's subscription purchase. Access to the subscription will be terminated immediately and it will stop recurring. /// /// A builder for the *subscriptions.revoke* method supported by a *purchase* resource. -/// It is not used directly, but through a `PurchaseMethods`. +/// It is not used directly, but through a `PurchaseMethods` instance. /// /// # Example /// @@ -2222,7 +2543,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionRevokeCall<'a, C, NC, A> where NC: hyper: for &field in ["packageName", "subscriptionId", "token"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2274,7 +2595,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionRevokeCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2286,7 +2607,6 @@ impl<'a, C, NC, A> PurchaseSubscriptionRevokeCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -2296,7 +2616,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionRevokeCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2307,12 +2627,12 @@ impl<'a, C, NC, A> PurchaseSubscriptionRevokeCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2324,7 +2644,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionRevokeCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + /// The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). pub fn package_name(mut self, new_value: &str) -> PurchaseSubscriptionRevokeCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -2334,7 +2654,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionRevokeCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The purchased subscription ID (for example, 'monthly001'). + /// The purchased subscription ID (for example, 'monthly001'). pub fn subscription_id(mut self, new_value: &str) -> PurchaseSubscriptionRevokeCall<'a, C, NC, A> { self._subscription_id = new_value.to_string(); self @@ -2344,7 +2664,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionRevokeCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The token provided to the user's device when the subscription was purchased. + /// The token provided to the user's device when the subscription was purchased. pub fn token(mut self, new_value: &str) -> PurchaseSubscriptionRevokeCall<'a, C, NC, A> { self._token = new_value.to_string(); self @@ -2405,7 +2725,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionRevokeCall<'a, C, NC, A> where NC: hyper: /// Checks the purchase and consumption status of an inapp item. /// /// A builder for the *products.get* method supported by a *purchase* resource. -/// It is not used directly, but through a `PurchaseMethods`. +/// It is not used directly, but through a `PurchaseMethods` instance. /// /// # Example /// @@ -2467,7 +2787,7 @@ impl<'a, C, NC, A> PurchaseProductGetCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "packageName", "productId", "token"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2520,7 +2840,7 @@ impl<'a, C, NC, A> PurchaseProductGetCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2532,7 +2852,6 @@ impl<'a, C, NC, A> PurchaseProductGetCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -2542,7 +2861,7 @@ impl<'a, C, NC, A> PurchaseProductGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2553,7 +2872,7 @@ impl<'a, C, NC, A> PurchaseProductGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2562,13 +2881,13 @@ impl<'a, C, NC, A> PurchaseProductGetCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2580,7 +2899,7 @@ impl<'a, C, NC, A> PurchaseProductGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The package name of the application the inapp product was sold in (for example, 'com.some.thing'). + /// The package name of the application the inapp product was sold in (for example, 'com.some.thing'). pub fn package_name(mut self, new_value: &str) -> PurchaseProductGetCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -2590,7 +2909,7 @@ impl<'a, C, NC, A> PurchaseProductGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The inapp product SKU (for example, 'com.some.thing.inapp1'). + /// The inapp product SKU (for example, 'com.some.thing.inapp1'). pub fn product_id(mut self, new_value: &str) -> PurchaseProductGetCall<'a, C, NC, A> { self._product_id = new_value.to_string(); self @@ -2600,7 +2919,7 @@ impl<'a, C, NC, A> PurchaseProductGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The token provided to the user's device when the inapp product was purchased. + /// The token provided to the user's device when the inapp product was purchased. pub fn token(mut self, new_value: &str) -> PurchaseProductGetCall<'a, C, NC, A> { self._token = new_value.to_string(); self @@ -2661,7 +2980,7 @@ impl<'a, C, NC, A> PurchaseProductGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Checks whether a user's subscription purchase is valid and returns its expiry time. /// /// A builder for the *subscriptions.get* method supported by a *purchase* resource. -/// It is not used directly, but through a `PurchaseMethods`. +/// It is not used directly, but through a `PurchaseMethods` instance. /// /// # Example /// @@ -2723,7 +3042,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionGetCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "packageName", "subscriptionId", "token"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2776,7 +3095,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionGetCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2788,7 +3107,6 @@ impl<'a, C, NC, A> PurchaseSubscriptionGetCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -2798,7 +3116,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2809,7 +3127,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2818,13 +3136,13 @@ impl<'a, C, NC, A> PurchaseSubscriptionGetCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2836,7 +3154,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + /// The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). pub fn package_name(mut self, new_value: &str) -> PurchaseSubscriptionGetCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -2846,7 +3164,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The purchased subscription ID (for example, 'monthly001'). + /// The purchased subscription ID (for example, 'monthly001'). pub fn subscription_id(mut self, new_value: &str) -> PurchaseSubscriptionGetCall<'a, C, NC, A> { self._subscription_id = new_value.to_string(); self @@ -2856,7 +3174,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The token provided to the user's device when the subscription was purchased. + /// The token provided to the user's device when the subscription was purchased. pub fn token(mut self, new_value: &str) -> PurchaseSubscriptionGetCall<'a, C, NC, A> { self._token = new_value.to_string(); self @@ -2917,7 +3235,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionGetCall<'a, C, NC, A> where NC: hyper::ne /// Cancels a user's subscription purchase. The subscription remains valid until its expiration time. /// /// A builder for the *subscriptions.cancel* method supported by a *purchase* resource. -/// It is not used directly, but through a `PurchaseMethods`. +/// It is not used directly, but through a `PurchaseMethods` instance. /// /// # Example /// @@ -2979,7 +3297,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionCancelCall<'a, C, NC, A> where NC: hyper: for &field in ["packageName", "subscriptionId", "token"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3031,7 +3349,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionCancelCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3043,7 +3361,6 @@ impl<'a, C, NC, A> PurchaseSubscriptionCancelCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -3053,7 +3370,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionCancelCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3064,12 +3381,12 @@ impl<'a, C, NC, A> PurchaseSubscriptionCancelCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3081,7 +3398,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionCancelCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + /// The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). pub fn package_name(mut self, new_value: &str) -> PurchaseSubscriptionCancelCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -3091,7 +3408,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionCancelCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The purchased subscription ID (for example, 'monthly001'). + /// The purchased subscription ID (for example, 'monthly001'). pub fn subscription_id(mut self, new_value: &str) -> PurchaseSubscriptionCancelCall<'a, C, NC, A> { self._subscription_id = new_value.to_string(); self @@ -3101,7 +3418,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionCancelCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The token provided to the user's device when the subscription was purchased. + /// The token provided to the user's device when the subscription was purchased. pub fn token(mut self, new_value: &str) -> PurchaseSubscriptionCancelCall<'a, C, NC, A> { self._token = new_value.to_string(); self @@ -3162,7 +3479,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionCancelCall<'a, C, NC, A> where NC: hyper: /// Refunds a user's subscription purchase, but the subscription remains valid until its expiration time and it will continue to recur. /// /// A builder for the *subscriptions.refund* method supported by a *purchase* resource. -/// It is not used directly, but through a `PurchaseMethods`. +/// It is not used directly, but through a `PurchaseMethods` instance. /// /// # Example /// @@ -3224,7 +3541,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionRefundCall<'a, C, NC, A> where NC: hyper: for &field in ["packageName", "subscriptionId", "token"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3276,7 +3593,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionRefundCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3288,7 +3605,6 @@ impl<'a, C, NC, A> PurchaseSubscriptionRefundCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -3298,7 +3614,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionRefundCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3309,12 +3625,12 @@ impl<'a, C, NC, A> PurchaseSubscriptionRefundCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3326,7 +3642,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionRefundCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + /// The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). pub fn package_name(mut self, new_value: &str) -> PurchaseSubscriptionRefundCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -3336,7 +3652,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionRefundCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The purchased subscription ID (for example, 'monthly001'). + /// The purchased subscription ID (for example, 'monthly001'). pub fn subscription_id(mut self, new_value: &str) -> PurchaseSubscriptionRefundCall<'a, C, NC, A> { self._subscription_id = new_value.to_string(); self @@ -3346,7 +3662,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionRefundCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The token provided to the user's device when the subscription was purchased. + /// The token provided to the user's device when the subscription was purchased. pub fn token(mut self, new_value: &str) -> PurchaseSubscriptionRefundCall<'a, C, NC, A> { self._token = new_value.to_string(); self @@ -3407,7 +3723,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionRefundCall<'a, C, NC, A> where NC: hyper: /// Defers a user's subscription purchase until a specified future expiration time. /// /// A builder for the *subscriptions.defer* method supported by a *purchase* resource. -/// It is not used directly, but through a `PurchaseMethods`. +/// It is not used directly, but through a `PurchaseMethods` instance. /// /// # Example /// @@ -3476,7 +3792,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionDeferCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt", "packageName", "subscriptionId", "token"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3533,7 +3849,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionDeferCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3549,7 +3865,6 @@ impl<'a, C, NC, A> PurchaseSubscriptionDeferCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -3559,7 +3874,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionDeferCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3570,7 +3885,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionDeferCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3579,13 +3894,13 @@ impl<'a, C, NC, A> PurchaseSubscriptionDeferCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3606,7 +3921,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionDeferCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). + /// The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). pub fn package_name(mut self, new_value: &str) -> PurchaseSubscriptionDeferCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -3616,7 +3931,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionDeferCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The purchased subscription ID (for example, 'monthly001'). + /// The purchased subscription ID (for example, 'monthly001'). pub fn subscription_id(mut self, new_value: &str) -> PurchaseSubscriptionDeferCall<'a, C, NC, A> { self._subscription_id = new_value.to_string(); self @@ -3626,7 +3941,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionDeferCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The token provided to the user's device when the subscription was purchased. + /// The token provided to the user's device when the subscription was purchased. pub fn token(mut self, new_value: &str) -> PurchaseSubscriptionDeferCall<'a, C, NC, A> { self._token = new_value.to_string(); self @@ -3687,7 +4002,7 @@ impl<'a, C, NC, A> PurchaseSubscriptionDeferCall<'a, C, NC, A> where NC: hyper:: /// Uploads a new image and adds it to the list of images for the specified language and image type. /// /// A builder for the *images.upload* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -3753,7 +4068,7 @@ impl<'a, C, NC, A> EditImageUploadCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "packageName", "editId", "language", "imageType"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3816,7 +4131,7 @@ impl<'a, C, NC, A> EditImageUploadCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3842,7 +4157,7 @@ impl<'a, C, NC, A> EditImageUploadCall<'a, C, NC, A> where NC: hyper::net::Netwo let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); if size > 15728640 { - return Result::UploadSizeLimitExceeded(size, 15728640) + return Err(Error::UploadSizeLimitExceeded(size, 15728640)) } req = req.header(ContentType(reader_mime_type.clone())) .header(ContentLength(size)) @@ -3855,7 +4170,6 @@ impl<'a, C, NC, A> EditImageUploadCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - } }; @@ -3866,7 +4180,7 @@ impl<'a, C, NC, A> EditImageUploadCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3877,13 +4191,13 @@ impl<'a, C, NC, A> EditImageUploadCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } if protocol == "resumable" { let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); if size > 15728640 { - return Result::UploadSizeLimitExceeded(size, 15728640) + return Err(Error::UploadSizeLimitExceeded(size, 15728640)) } let mut client = &mut *self.hub.client.borrow_mut(); let upload_result = { @@ -3908,17 +4222,17 @@ impl<'a, C, NC, A> EditImageUploadCall<'a, C, NC, A> where NC: hyper::net::Netwo match upload_result { None => { dlg.finished(false); - return Result::Cancelled + return Err(Error::Cancelled) } Some(Err(err)) => { dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Some(Ok(upload_result)) => { res = upload_result; if !res.status.is_success() { dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } } } @@ -3930,13 +4244,13 @@ impl<'a, C, NC, A> EditImageUploadCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3952,11 +4266,14 @@ impl<'a, C, NC, A> EditImageUploadCall<'a, C, NC, A> where NC: hyper::net::Netwo where RS: ReadSeek { self.doit(stream, mime_type, "simple") } - /// Upload media in a resumeable fashion. + /// Upload media in a resumable fashion. /// Even if the upload fails or is interrupted, it can be resumed for a /// certain amount of time as the server maintains state temporarily. /// - /// TODO: Write more about how delegation works in this particular case. + /// The delegate will be asked for an `upload_url()`, and if not provided, will be asked to store an upload URL + /// that was provided by the server, using `store_upload_url(...)`. The upload will be done in chunks, the delegate + /// may specify the `chunk_size()` and may cancel the operation before each chunk is uploaded, using + /// `cancel_chunk_upload(...)`. /// /// * *max size*: 15MB /// * *multipart*: yes @@ -3971,7 +4288,7 @@ impl<'a, C, NC, A> EditImageUploadCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditImageUploadCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -3981,7 +4298,7 @@ impl<'a, C, NC, A> EditImageUploadCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditImageUploadCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -3991,7 +4308,7 @@ impl<'a, C, NC, A> EditImageUploadCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditImageUploadCall<'a, C, NC, A> { self._language = new_value.to_string(); self @@ -4061,7 +4378,7 @@ impl<'a, C, NC, A> EditImageUploadCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Updates the APK's Expansion File configuration to reference another APK's Expansion Files. To add a new Expansion File use the Upload method. /// /// A builder for the *expansionfiles.update* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -4132,7 +4449,7 @@ impl<'a, C, NC, A> EditExpansionfileUpdateCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "packageName", "editId", "apkVersionCode", "expansionFileType"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4189,7 +4506,7 @@ impl<'a, C, NC, A> EditExpansionfileUpdateCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4205,7 +4522,6 @@ impl<'a, C, NC, A> EditExpansionfileUpdateCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -4215,7 +4531,7 @@ impl<'a, C, NC, A> EditExpansionfileUpdateCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4226,7 +4542,7 @@ impl<'a, C, NC, A> EditExpansionfileUpdateCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4235,13 +4551,13 @@ impl<'a, C, NC, A> EditExpansionfileUpdateCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4262,7 +4578,7 @@ impl<'a, C, NC, A> EditExpansionfileUpdateCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditExpansionfileUpdateCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -4272,7 +4588,7 @@ impl<'a, C, NC, A> EditExpansionfileUpdateCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditExpansionfileUpdateCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -4282,7 +4598,7 @@ impl<'a, C, NC, A> EditExpansionfileUpdateCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The version code of the APK whose Expansion File configuration is being read or modified. + /// The version code of the APK whose Expansion File configuration is being read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditExpansionfileUpdateCall<'a, C, NC, A> { self._apk_version_code = new_value; self @@ -4352,7 +4668,7 @@ impl<'a, C, NC, A> EditExpansionfileUpdateCall<'a, C, NC, A> where NC: hyper::ne /// Fetches app details for this edit. This includes the default language and developer support contact information. /// /// A builder for the *details.get* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -4412,7 +4728,7 @@ impl<'a, C, NC, A> EditDetailGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "packageName", "editId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4465,7 +4781,7 @@ impl<'a, C, NC, A> EditDetailGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4477,7 +4793,6 @@ impl<'a, C, NC, A> EditDetailGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -4487,7 +4802,7 @@ impl<'a, C, NC, A> EditDetailGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4498,7 +4813,7 @@ impl<'a, C, NC, A> EditDetailGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4507,13 +4822,13 @@ impl<'a, C, NC, A> EditDetailGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4525,7 +4840,7 @@ impl<'a, C, NC, A> EditDetailGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditDetailGetCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -4535,7 +4850,7 @@ impl<'a, C, NC, A> EditDetailGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditDetailGetCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -4596,7 +4911,7 @@ impl<'a, C, NC, A> EditDetailGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Deletes the APK-specific localized listing for a specified APK and language code. /// /// A builder for the *apklistings.delete* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -4660,7 +4975,7 @@ impl<'a, C, NC, A> EditApklistingDeleteCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["packageName", "editId", "apkVersionCode", "language"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4712,7 +5027,7 @@ impl<'a, C, NC, A> EditApklistingDeleteCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4724,7 +5039,6 @@ impl<'a, C, NC, A> EditApklistingDeleteCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -4734,7 +5048,7 @@ impl<'a, C, NC, A> EditApklistingDeleteCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4745,12 +5059,12 @@ impl<'a, C, NC, A> EditApklistingDeleteCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4762,7 +5076,7 @@ impl<'a, C, NC, A> EditApklistingDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApklistingDeleteCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -4772,7 +5086,7 @@ impl<'a, C, NC, A> EditApklistingDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApklistingDeleteCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -4782,7 +5096,7 @@ impl<'a, C, NC, A> EditApklistingDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The APK version code whose APK-specific listings should be read or modified. + /// The APK version code whose APK-specific listings should be read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditApklistingDeleteCall<'a, C, NC, A> { self._apk_version_code = new_value; self @@ -4792,7 +5106,7 @@ impl<'a, C, NC, A> EditApklistingDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditApklistingDeleteCall<'a, C, NC, A> { self._language = new_value.to_string(); self @@ -4853,7 +5167,7 @@ impl<'a, C, NC, A> EditApklistingDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Deletes all localized listings from an edit. /// /// A builder for the *listings.deleteall* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -4913,7 +5227,7 @@ impl<'a, C, NC, A> EditListingDeleteallCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["packageName", "editId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4965,7 +5279,7 @@ impl<'a, C, NC, A> EditListingDeleteallCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4977,7 +5291,6 @@ impl<'a, C, NC, A> EditListingDeleteallCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -4987,7 +5300,7 @@ impl<'a, C, NC, A> EditListingDeleteallCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4998,12 +5311,12 @@ impl<'a, C, NC, A> EditListingDeleteallCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5015,7 +5328,7 @@ impl<'a, C, NC, A> EditListingDeleteallCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditListingDeleteallCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -5025,7 +5338,7 @@ impl<'a, C, NC, A> EditListingDeleteallCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditListingDeleteallCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -5086,7 +5399,7 @@ impl<'a, C, NC, A> EditListingDeleteallCall<'a, C, NC, A> where NC: hyper::net:: /// Creates a new APK without uploading the APK itself to Google Play, instead hosting the APK at a specified URL. This function is only available to enterprises using Google Play for work whose application is configured to restrict distribution to the enterprise domain. /// /// A builder for the *apks.addexternallyhosted* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -5153,7 +5466,7 @@ impl<'a, C, NC, A> EditApkAddexternallyhostedCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "packageName", "editId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5210,7 +5523,7 @@ impl<'a, C, NC, A> EditApkAddexternallyhostedCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5226,7 +5539,6 @@ impl<'a, C, NC, A> EditApkAddexternallyhostedCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -5236,7 +5548,7 @@ impl<'a, C, NC, A> EditApkAddexternallyhostedCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5247,7 +5559,7 @@ impl<'a, C, NC, A> EditApkAddexternallyhostedCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5256,13 +5568,13 @@ impl<'a, C, NC, A> EditApkAddexternallyhostedCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5283,7 +5595,7 @@ impl<'a, C, NC, A> EditApkAddexternallyhostedCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApkAddexternallyhostedCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -5293,7 +5605,7 @@ impl<'a, C, NC, A> EditApkAddexternallyhostedCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApkAddexternallyhostedCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -5354,7 +5666,7 @@ impl<'a, C, NC, A> EditApkAddexternallyhostedCall<'a, C, NC, A> where NC: hyper: /// Deletes all the APK-specific localized listings for a specified APK. /// /// A builder for the *apklistings.deleteall* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -5416,7 +5728,7 @@ impl<'a, C, NC, A> EditApklistingDeleteallCall<'a, C, NC, A> where NC: hyper::ne for &field in ["packageName", "editId", "apkVersionCode"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5468,7 +5780,7 @@ impl<'a, C, NC, A> EditApklistingDeleteallCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5480,7 +5792,6 @@ impl<'a, C, NC, A> EditApklistingDeleteallCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -5490,7 +5801,7 @@ impl<'a, C, NC, A> EditApklistingDeleteallCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5501,12 +5812,12 @@ impl<'a, C, NC, A> EditApklistingDeleteallCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5518,7 +5829,7 @@ impl<'a, C, NC, A> EditApklistingDeleteallCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApklistingDeleteallCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -5528,7 +5839,7 @@ impl<'a, C, NC, A> EditApklistingDeleteallCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApklistingDeleteallCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -5538,7 +5849,7 @@ impl<'a, C, NC, A> EditApklistingDeleteallCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The APK version code whose APK-specific listings should be read or modified. + /// The APK version code whose APK-specific listings should be read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditApklistingDeleteallCall<'a, C, NC, A> { self._apk_version_code = new_value; self @@ -5599,7 +5910,7 @@ impl<'a, C, NC, A> EditApklistingDeleteallCall<'a, C, NC, A> where NC: hyper::ne /// Updates app details for this edit. /// /// A builder for the *details.update* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -5666,7 +5977,7 @@ impl<'a, C, NC, A> EditDetailUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "packageName", "editId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5723,7 +6034,7 @@ impl<'a, C, NC, A> EditDetailUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5739,7 +6050,6 @@ impl<'a, C, NC, A> EditDetailUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -5749,7 +6059,7 @@ impl<'a, C, NC, A> EditDetailUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5760,7 +6070,7 @@ impl<'a, C, NC, A> EditDetailUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5769,13 +6079,13 @@ impl<'a, C, NC, A> EditDetailUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5796,7 +6106,7 @@ impl<'a, C, NC, A> EditDetailUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditDetailUpdateCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -5806,7 +6116,7 @@ impl<'a, C, NC, A> EditDetailUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditDetailUpdateCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -5867,7 +6177,7 @@ impl<'a, C, NC, A> EditDetailUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Fetches the track configuration for the specified track type. Includes the APK version codes that are in this track. /// /// A builder for the *tracks.get* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -5929,7 +6239,7 @@ impl<'a, C, NC, A> EditTrackGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "packageName", "editId", "track"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5982,7 +6292,7 @@ impl<'a, C, NC, A> EditTrackGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5994,7 +6304,6 @@ impl<'a, C, NC, A> EditTrackGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -6004,7 +6313,7 @@ impl<'a, C, NC, A> EditTrackGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6015,7 +6324,7 @@ impl<'a, C, NC, A> EditTrackGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6024,13 +6333,13 @@ impl<'a, C, NC, A> EditTrackGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6042,7 +6351,7 @@ impl<'a, C, NC, A> EditTrackGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditTrackGetCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -6052,7 +6361,7 @@ impl<'a, C, NC, A> EditTrackGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditTrackGetCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -6062,7 +6371,7 @@ impl<'a, C, NC, A> EditTrackGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The track type to read or modify. + /// The track type to read or modify. pub fn track(mut self, new_value: &str) -> EditTrackGetCall<'a, C, NC, A> { self._track = new_value.to_string(); self @@ -6123,7 +6432,7 @@ impl<'a, C, NC, A> EditTrackGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Updates the APK's Expansion File configuration to reference another APK's Expansion Files. To add a new Expansion File use the Upload method. This method supports patch semantics. /// /// A builder for the *expansionfiles.patch* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -6194,7 +6503,7 @@ impl<'a, C, NC, A> EditExpansionfilePatchCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "packageName", "editId", "apkVersionCode", "expansionFileType"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6251,7 +6560,7 @@ impl<'a, C, NC, A> EditExpansionfilePatchCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6267,7 +6576,6 @@ impl<'a, C, NC, A> EditExpansionfilePatchCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -6277,7 +6585,7 @@ impl<'a, C, NC, A> EditExpansionfilePatchCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6288,7 +6596,7 @@ impl<'a, C, NC, A> EditExpansionfilePatchCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6297,13 +6605,13 @@ impl<'a, C, NC, A> EditExpansionfilePatchCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6324,7 +6632,7 @@ impl<'a, C, NC, A> EditExpansionfilePatchCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditExpansionfilePatchCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -6334,7 +6642,7 @@ impl<'a, C, NC, A> EditExpansionfilePatchCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditExpansionfilePatchCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -6344,7 +6652,7 @@ impl<'a, C, NC, A> EditExpansionfilePatchCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The version code of the APK whose Expansion File configuration is being read or modified. + /// The version code of the APK whose Expansion File configuration is being read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditExpansionfilePatchCall<'a, C, NC, A> { self._apk_version_code = new_value; self @@ -6414,7 +6722,7 @@ impl<'a, C, NC, A> EditExpansionfilePatchCall<'a, C, NC, A> where NC: hyper::net /// Lists all images for the specified language and image type. /// /// A builder for the *images.list* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -6478,7 +6786,7 @@ impl<'a, C, NC, A> EditImageListCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "packageName", "editId", "language", "imageType"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6531,7 +6839,7 @@ impl<'a, C, NC, A> EditImageListCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6543,7 +6851,6 @@ impl<'a, C, NC, A> EditImageListCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -6553,7 +6860,7 @@ impl<'a, C, NC, A> EditImageListCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6564,7 +6871,7 @@ impl<'a, C, NC, A> EditImageListCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6573,13 +6880,13 @@ impl<'a, C, NC, A> EditImageListCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6591,7 +6898,7 @@ impl<'a, C, NC, A> EditImageListCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditImageListCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -6601,7 +6908,7 @@ impl<'a, C, NC, A> EditImageListCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditImageListCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -6611,7 +6918,7 @@ impl<'a, C, NC, A> EditImageListCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditImageListCall<'a, C, NC, A> { self._language = new_value.to_string(); self @@ -6681,7 +6988,7 @@ impl<'a, C, NC, A> EditImageListCall<'a, C, NC, A> where NC: hyper::net::Network /// Updates the track configuration for the specified track type. When halted, the rollout track cannot be updated without adding new APKs, and adding new APKs will cause it to resume. /// /// A builder for the *tracks.update* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -6750,7 +7057,7 @@ impl<'a, C, NC, A> EditTrackUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "packageName", "editId", "track"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6807,7 +7114,7 @@ impl<'a, C, NC, A> EditTrackUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6823,7 +7130,6 @@ impl<'a, C, NC, A> EditTrackUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -6833,7 +7139,7 @@ impl<'a, C, NC, A> EditTrackUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6844,7 +7150,7 @@ impl<'a, C, NC, A> EditTrackUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6853,13 +7159,13 @@ impl<'a, C, NC, A> EditTrackUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6880,7 +7186,7 @@ impl<'a, C, NC, A> EditTrackUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditTrackUpdateCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -6890,7 +7196,7 @@ impl<'a, C, NC, A> EditTrackUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditTrackUpdateCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -6900,7 +7206,7 @@ impl<'a, C, NC, A> EditTrackUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The track type to read or modify. + /// The track type to read or modify. pub fn track(mut self, new_value: &str) -> EditTrackUpdateCall<'a, C, NC, A> { self._track = new_value.to_string(); self @@ -6961,7 +7267,7 @@ impl<'a, C, NC, A> EditTrackUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Creates or updates a localized store listing. This method supports patch semantics. /// /// A builder for the *listings.patch* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -7030,7 +7336,7 @@ impl<'a, C, NC, A> EditListingPatchCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "packageName", "editId", "language"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7087,7 +7393,7 @@ impl<'a, C, NC, A> EditListingPatchCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7103,7 +7409,6 @@ impl<'a, C, NC, A> EditListingPatchCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -7113,7 +7418,7 @@ impl<'a, C, NC, A> EditListingPatchCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7124,7 +7429,7 @@ impl<'a, C, NC, A> EditListingPatchCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7133,13 +7438,13 @@ impl<'a, C, NC, A> EditListingPatchCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7160,7 +7465,7 @@ impl<'a, C, NC, A> EditListingPatchCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditListingPatchCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -7170,7 +7475,7 @@ impl<'a, C, NC, A> EditListingPatchCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditListingPatchCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -7180,7 +7485,7 @@ impl<'a, C, NC, A> EditListingPatchCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditListingPatchCall<'a, C, NC, A> { self._language = new_value.to_string(); self @@ -7241,7 +7546,7 @@ impl<'a, C, NC, A> EditListingPatchCall<'a, C, NC, A> where NC: hyper::net::Netw /// Returns information about the edit specified. Calls will fail if the edit is no long active (e.g. has been deleted, superseded or expired). /// /// A builder for the *get* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -7301,7 +7606,7 @@ impl<'a, C, NC, A> EditGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "packageName", "editId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7354,7 +7659,7 @@ impl<'a, C, NC, A> EditGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7366,7 +7671,6 @@ impl<'a, C, NC, A> EditGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -7376,7 +7680,7 @@ impl<'a, C, NC, A> EditGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7387,7 +7691,7 @@ impl<'a, C, NC, A> EditGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7396,13 +7700,13 @@ impl<'a, C, NC, A> EditGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7414,7 +7718,7 @@ impl<'a, C, NC, A> EditGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditGetCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -7424,7 +7728,7 @@ impl<'a, C, NC, A> EditGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditGetCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -7485,7 +7789,7 @@ impl<'a, C, NC, A> EditGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Deletes the image (specified by id) from the edit. /// /// A builder for the *images.delete* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -7551,7 +7855,7 @@ impl<'a, C, NC, A> EditImageDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["packageName", "editId", "language", "imageType", "imageId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7603,7 +7907,7 @@ impl<'a, C, NC, A> EditImageDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7615,7 +7919,6 @@ impl<'a, C, NC, A> EditImageDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -7625,7 +7928,7 @@ impl<'a, C, NC, A> EditImageDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7636,12 +7939,12 @@ impl<'a, C, NC, A> EditImageDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7653,7 +7956,7 @@ impl<'a, C, NC, A> EditImageDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditImageDeleteCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -7663,7 +7966,7 @@ impl<'a, C, NC, A> EditImageDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditImageDeleteCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -7673,7 +7976,7 @@ impl<'a, C, NC, A> EditImageDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditImageDeleteCall<'a, C, NC, A> { self._language = new_value.to_string(); self @@ -7692,7 +7995,7 @@ impl<'a, C, NC, A> EditImageDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier an image within the set of images attached to this edit. + /// Unique identifier an image within the set of images attached to this edit. pub fn image_id(mut self, new_value: &str) -> EditImageDeleteCall<'a, C, NC, A> { self._image_id = new_value.to_string(); self @@ -7751,7 +8054,7 @@ impl<'a, C, NC, A> EditImageDeleteCall<'a, C, NC, A> where NC: hyper::net::Netwo /// A builder for the *apks.upload* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -7813,7 +8116,7 @@ impl<'a, C, NC, A> EditApkUploadCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "packageName", "editId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7876,7 +8179,7 @@ impl<'a, C, NC, A> EditApkUploadCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7902,7 +8205,7 @@ impl<'a, C, NC, A> EditApkUploadCall<'a, C, NC, A> where NC: hyper::net::Network let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); if size > 1073741824 { - return Result::UploadSizeLimitExceeded(size, 1073741824) + return Err(Error::UploadSizeLimitExceeded(size, 1073741824)) } req = req.header(ContentType(reader_mime_type.clone())) .header(ContentLength(size)) @@ -7915,7 +8218,6 @@ impl<'a, C, NC, A> EditApkUploadCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - } }; @@ -7926,7 +8228,7 @@ impl<'a, C, NC, A> EditApkUploadCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7937,13 +8239,13 @@ impl<'a, C, NC, A> EditApkUploadCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } if protocol == "resumable" { let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); if size > 1073741824 { - return Result::UploadSizeLimitExceeded(size, 1073741824) + return Err(Error::UploadSizeLimitExceeded(size, 1073741824)) } let mut client = &mut *self.hub.client.borrow_mut(); let upload_result = { @@ -7968,17 +8270,17 @@ impl<'a, C, NC, A> EditApkUploadCall<'a, C, NC, A> where NC: hyper::net::Network match upload_result { None => { dlg.finished(false); - return Result::Cancelled + return Err(Error::Cancelled) } Some(Err(err)) => { dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Some(Ok(upload_result)) => { res = upload_result; if !res.status.is_success() { dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } } } @@ -7990,13 +8292,13 @@ impl<'a, C, NC, A> EditApkUploadCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8012,11 +8314,14 @@ impl<'a, C, NC, A> EditApkUploadCall<'a, C, NC, A> where NC: hyper::net::Network where RS: ReadSeek { self.doit(stream, mime_type, "simple") } - /// Upload media in a resumeable fashion. + /// Upload media in a resumable fashion. /// Even if the upload fails or is interrupted, it can be resumed for a /// certain amount of time as the server maintains state temporarily. /// - /// TODO: Write more about how delegation works in this particular case. + /// The delegate will be asked for an `upload_url()`, and if not provided, will be asked to store an upload URL + /// that was provided by the server, using `store_upload_url(...)`. The upload will be done in chunks, the delegate + /// may specify the `chunk_size()` and may cancel the operation before each chunk is uploaded, using + /// `cancel_chunk_upload(...)`. /// /// * *max size*: 1GB /// * *multipart*: yes @@ -8031,7 +8336,7 @@ impl<'a, C, NC, A> EditApkUploadCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApkUploadCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -8041,7 +8346,7 @@ impl<'a, C, NC, A> EditApkUploadCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApkUploadCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -8102,7 +8407,7 @@ impl<'a, C, NC, A> EditApkUploadCall<'a, C, NC, A> where NC: hyper::net::Network /// Updates or creates the APK-specific localized listing for a specified APK and language code. /// /// A builder for the *apklistings.update* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -8173,7 +8478,7 @@ impl<'a, C, NC, A> EditApklistingUpdateCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "packageName", "editId", "apkVersionCode", "language"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8230,7 +8535,7 @@ impl<'a, C, NC, A> EditApklistingUpdateCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8246,7 +8551,6 @@ impl<'a, C, NC, A> EditApklistingUpdateCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -8256,7 +8560,7 @@ impl<'a, C, NC, A> EditApklistingUpdateCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8267,7 +8571,7 @@ impl<'a, C, NC, A> EditApklistingUpdateCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8276,13 +8580,13 @@ impl<'a, C, NC, A> EditApklistingUpdateCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8303,7 +8607,7 @@ impl<'a, C, NC, A> EditApklistingUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApklistingUpdateCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -8313,7 +8617,7 @@ impl<'a, C, NC, A> EditApklistingUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApklistingUpdateCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -8323,7 +8627,7 @@ impl<'a, C, NC, A> EditApklistingUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The APK version code whose APK-specific listings should be read or modified. + /// The APK version code whose APK-specific listings should be read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditApklistingUpdateCall<'a, C, NC, A> { self._apk_version_code = new_value; self @@ -8333,7 +8637,7 @@ impl<'a, C, NC, A> EditApklistingUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditApklistingUpdateCall<'a, C, NC, A> { self._language = new_value.to_string(); self @@ -8392,7 +8696,7 @@ impl<'a, C, NC, A> EditApklistingUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// A builder for the *apks.list* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -8452,7 +8756,7 @@ impl<'a, C, NC, A> EditApkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "packageName", "editId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8505,7 +8809,7 @@ impl<'a, C, NC, A> EditApkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8517,7 +8821,6 @@ impl<'a, C, NC, A> EditApkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -8527,7 +8830,7 @@ impl<'a, C, NC, A> EditApkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8538,7 +8841,7 @@ impl<'a, C, NC, A> EditApkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8547,13 +8850,13 @@ impl<'a, C, NC, A> EditApkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8565,7 +8868,7 @@ impl<'a, C, NC, A> EditApkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApkListCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -8575,7 +8878,7 @@ impl<'a, C, NC, A> EditApkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApkListCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -8636,7 +8939,7 @@ impl<'a, C, NC, A> EditApkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Updates or creates the APK-specific localized listing for a specified APK and language code. This method supports patch semantics. /// /// A builder for the *apklistings.patch* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -8707,7 +9010,7 @@ impl<'a, C, NC, A> EditApklistingPatchCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "packageName", "editId", "apkVersionCode", "language"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8764,7 +9067,7 @@ impl<'a, C, NC, A> EditApklistingPatchCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8780,7 +9083,6 @@ impl<'a, C, NC, A> EditApklistingPatchCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -8790,7 +9092,7 @@ impl<'a, C, NC, A> EditApklistingPatchCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8801,7 +9103,7 @@ impl<'a, C, NC, A> EditApklistingPatchCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8810,13 +9112,13 @@ impl<'a, C, NC, A> EditApklistingPatchCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8837,7 +9139,7 @@ impl<'a, C, NC, A> EditApklistingPatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApklistingPatchCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -8847,7 +9149,7 @@ impl<'a, C, NC, A> EditApklistingPatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApklistingPatchCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -8857,7 +9159,7 @@ impl<'a, C, NC, A> EditApklistingPatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The APK version code whose APK-specific listings should be read or modified. + /// The APK version code whose APK-specific listings should be read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditApklistingPatchCall<'a, C, NC, A> { self._apk_version_code = new_value; self @@ -8867,7 +9169,7 @@ impl<'a, C, NC, A> EditApklistingPatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditApklistingPatchCall<'a, C, NC, A> { self._language = new_value.to_string(); self @@ -8928,7 +9230,7 @@ impl<'a, C, NC, A> EditApklistingPatchCall<'a, C, NC, A> where NC: hyper::net::N /// Fetches information about a localized store listing. /// /// A builder for the *listings.get* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -8990,7 +9292,7 @@ impl<'a, C, NC, A> EditListingGetCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "packageName", "editId", "language"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9043,7 +9345,7 @@ impl<'a, C, NC, A> EditListingGetCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9055,7 +9357,6 @@ impl<'a, C, NC, A> EditListingGetCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -9065,7 +9366,7 @@ impl<'a, C, NC, A> EditListingGetCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9076,7 +9377,7 @@ impl<'a, C, NC, A> EditListingGetCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9085,13 +9386,13 @@ impl<'a, C, NC, A> EditListingGetCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9103,7 +9404,7 @@ impl<'a, C, NC, A> EditListingGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditListingGetCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -9113,7 +9414,7 @@ impl<'a, C, NC, A> EditListingGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditListingGetCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -9123,7 +9424,7 @@ impl<'a, C, NC, A> EditListingGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditListingGetCall<'a, C, NC, A> { self._language = new_value.to_string(); self @@ -9182,7 +9483,7 @@ impl<'a, C, NC, A> EditListingGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// A builder for the *testers.get* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -9244,7 +9545,7 @@ impl<'a, C, NC, A> EditTesterGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "packageName", "editId", "track"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9297,7 +9598,7 @@ impl<'a, C, NC, A> EditTesterGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9309,7 +9610,6 @@ impl<'a, C, NC, A> EditTesterGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -9319,7 +9619,7 @@ impl<'a, C, NC, A> EditTesterGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9330,7 +9630,7 @@ impl<'a, C, NC, A> EditTesterGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9339,13 +9639,13 @@ impl<'a, C, NC, A> EditTesterGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9357,7 +9657,7 @@ impl<'a, C, NC, A> EditTesterGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditTesterGetCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -9367,7 +9667,7 @@ impl<'a, C, NC, A> EditTesterGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditTesterGetCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -9437,7 +9737,7 @@ impl<'a, C, NC, A> EditTesterGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Deletes an edit for an app. Creating a new edit will automatically delete any of your previous edits so this method need only be called if you want to preemptively abandon an edit. /// /// A builder for the *delete* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -9497,7 +9797,7 @@ impl<'a, C, NC, A> EditDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["packageName", "editId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9549,7 +9849,7 @@ impl<'a, C, NC, A> EditDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9561,7 +9861,6 @@ impl<'a, C, NC, A> EditDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -9571,7 +9870,7 @@ impl<'a, C, NC, A> EditDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9582,12 +9881,12 @@ impl<'a, C, NC, A> EditDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9599,7 +9898,7 @@ impl<'a, C, NC, A> EditDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditDeleteCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -9609,7 +9908,7 @@ impl<'a, C, NC, A> EditDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditDeleteCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -9670,7 +9969,7 @@ impl<'a, C, NC, A> EditDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Uploads and attaches a new Expansion File to the APK specified. /// /// A builder for the *expansionfiles.upload* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -9736,7 +10035,7 @@ impl<'a, C, NC, A> EditExpansionfileUploadCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "packageName", "editId", "apkVersionCode", "expansionFileType"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9799,7 +10098,7 @@ impl<'a, C, NC, A> EditExpansionfileUploadCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9825,7 +10124,7 @@ impl<'a, C, NC, A> EditExpansionfileUploadCall<'a, C, NC, A> where NC: hyper::ne let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); if size > 2147483648 { - return Result::UploadSizeLimitExceeded(size, 2147483648) + return Err(Error::UploadSizeLimitExceeded(size, 2147483648)) } req = req.header(ContentType(reader_mime_type.clone())) .header(ContentLength(size)) @@ -9838,7 +10137,6 @@ impl<'a, C, NC, A> EditExpansionfileUploadCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - } }; @@ -9849,7 +10147,7 @@ impl<'a, C, NC, A> EditExpansionfileUploadCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9860,13 +10158,13 @@ impl<'a, C, NC, A> EditExpansionfileUploadCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } if protocol == "resumable" { let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); if size > 2147483648 { - return Result::UploadSizeLimitExceeded(size, 2147483648) + return Err(Error::UploadSizeLimitExceeded(size, 2147483648)) } let mut client = &mut *self.hub.client.borrow_mut(); let upload_result = { @@ -9891,17 +10189,17 @@ impl<'a, C, NC, A> EditExpansionfileUploadCall<'a, C, NC, A> where NC: hyper::ne match upload_result { None => { dlg.finished(false); - return Result::Cancelled + return Err(Error::Cancelled) } Some(Err(err)) => { dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Some(Ok(upload_result)) => { res = upload_result; if !res.status.is_success() { dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } } } @@ -9913,13 +10211,13 @@ impl<'a, C, NC, A> EditExpansionfileUploadCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9935,11 +10233,14 @@ impl<'a, C, NC, A> EditExpansionfileUploadCall<'a, C, NC, A> where NC: hyper::ne where RS: ReadSeek { self.doit(stream, mime_type, "simple") } - /// Upload media in a resumeable fashion. + /// Upload media in a resumable fashion. /// Even if the upload fails or is interrupted, it can be resumed for a /// certain amount of time as the server maintains state temporarily. /// - /// TODO: Write more about how delegation works in this particular case. + /// The delegate will be asked for an `upload_url()`, and if not provided, will be asked to store an upload URL + /// that was provided by the server, using `store_upload_url(...)`. The upload will be done in chunks, the delegate + /// may specify the `chunk_size()` and may cancel the operation before each chunk is uploaded, using + /// `cancel_chunk_upload(...)`. /// /// * *max size*: 2048MB /// * *multipart*: yes @@ -9954,7 +10255,7 @@ impl<'a, C, NC, A> EditExpansionfileUploadCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditExpansionfileUploadCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -9964,7 +10265,7 @@ impl<'a, C, NC, A> EditExpansionfileUploadCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditExpansionfileUploadCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -9974,7 +10275,7 @@ impl<'a, C, NC, A> EditExpansionfileUploadCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The version code of the APK whose Expansion File configuration is being read or modified. + /// The version code of the APK whose Expansion File configuration is being read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditExpansionfileUploadCall<'a, C, NC, A> { self._apk_version_code = new_value; self @@ -10044,7 +10345,7 @@ impl<'a, C, NC, A> EditExpansionfileUploadCall<'a, C, NC, A> where NC: hyper::ne /// Creates a new edit for an app, populated with the app's current state. /// /// A builder for the *insert* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -10109,7 +10410,7 @@ impl<'a, C, NC, A> EditInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "packageName"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10166,7 +10467,7 @@ impl<'a, C, NC, A> EditInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10182,7 +10483,6 @@ impl<'a, C, NC, A> EditInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -10192,7 +10492,7 @@ impl<'a, C, NC, A> EditInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10203,7 +10503,7 @@ impl<'a, C, NC, A> EditInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10212,13 +10512,13 @@ impl<'a, C, NC, A> EditInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10239,7 +10539,7 @@ impl<'a, C, NC, A> EditInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditInsertCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -10300,7 +10600,7 @@ impl<'a, C, NC, A> EditInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Returns all of the localized store listings attached to this edit. /// /// A builder for the *listings.list* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -10360,7 +10660,7 @@ impl<'a, C, NC, A> EditListingListCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "packageName", "editId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10413,7 +10713,7 @@ impl<'a, C, NC, A> EditListingListCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10425,7 +10725,6 @@ impl<'a, C, NC, A> EditListingListCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -10435,7 +10734,7 @@ impl<'a, C, NC, A> EditListingListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10446,7 +10745,7 @@ impl<'a, C, NC, A> EditListingListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10455,13 +10754,13 @@ impl<'a, C, NC, A> EditListingListCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10473,7 +10772,7 @@ impl<'a, C, NC, A> EditListingListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditListingListCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -10483,7 +10782,7 @@ impl<'a, C, NC, A> EditListingListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditListingListCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -10542,7 +10841,7 @@ impl<'a, C, NC, A> EditListingListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// A builder for the *testers.patch* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -10611,7 +10910,7 @@ impl<'a, C, NC, A> EditTesterPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "packageName", "editId", "track"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10668,7 +10967,7 @@ impl<'a, C, NC, A> EditTesterPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10684,7 +10983,6 @@ impl<'a, C, NC, A> EditTesterPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -10694,7 +10992,7 @@ impl<'a, C, NC, A> EditTesterPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10705,7 +11003,7 @@ impl<'a, C, NC, A> EditTesterPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10714,13 +11012,13 @@ impl<'a, C, NC, A> EditTesterPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10741,7 +11039,7 @@ impl<'a, C, NC, A> EditTesterPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditTesterPatchCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -10751,7 +11049,7 @@ impl<'a, C, NC, A> EditTesterPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditTesterPatchCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -10821,7 +11119,7 @@ impl<'a, C, NC, A> EditTesterPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Commits/applies the changes made in this edit back to the app. /// /// A builder for the *commit* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -10881,7 +11179,7 @@ impl<'a, C, NC, A> EditCommitCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "packageName", "editId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10934,7 +11232,7 @@ impl<'a, C, NC, A> EditCommitCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10946,7 +11244,6 @@ impl<'a, C, NC, A> EditCommitCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -10956,7 +11253,7 @@ impl<'a, C, NC, A> EditCommitCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10967,7 +11264,7 @@ impl<'a, C, NC, A> EditCommitCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10976,13 +11273,13 @@ impl<'a, C, NC, A> EditCommitCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10994,7 +11291,7 @@ impl<'a, C, NC, A> EditCommitCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditCommitCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -11004,7 +11301,7 @@ impl<'a, C, NC, A> EditCommitCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditCommitCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -11065,7 +11362,7 @@ impl<'a, C, NC, A> EditCommitCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Lists all the track configurations for this edit. /// /// A builder for the *tracks.list* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -11125,7 +11422,7 @@ impl<'a, C, NC, A> EditTrackListCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "packageName", "editId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11178,7 +11475,7 @@ impl<'a, C, NC, A> EditTrackListCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11190,7 +11487,6 @@ impl<'a, C, NC, A> EditTrackListCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -11200,7 +11496,7 @@ impl<'a, C, NC, A> EditTrackListCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11211,7 +11507,7 @@ impl<'a, C, NC, A> EditTrackListCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11220,13 +11516,13 @@ impl<'a, C, NC, A> EditTrackListCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11238,7 +11534,7 @@ impl<'a, C, NC, A> EditTrackListCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditTrackListCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -11248,7 +11544,7 @@ impl<'a, C, NC, A> EditTrackListCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditTrackListCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -11309,7 +11605,7 @@ impl<'a, C, NC, A> EditTrackListCall<'a, C, NC, A> where NC: hyper::net::Network /// Checks that the edit can be successfully committed. The edit's changes are not applied to the live app. /// /// A builder for the *validate* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -11369,7 +11665,7 @@ impl<'a, C, NC, A> EditValidateCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "packageName", "editId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11422,7 +11718,7 @@ impl<'a, C, NC, A> EditValidateCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11434,7 +11730,6 @@ impl<'a, C, NC, A> EditValidateCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -11444,7 +11739,7 @@ impl<'a, C, NC, A> EditValidateCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11455,7 +11750,7 @@ impl<'a, C, NC, A> EditValidateCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11464,13 +11759,13 @@ impl<'a, C, NC, A> EditValidateCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11482,7 +11777,7 @@ impl<'a, C, NC, A> EditValidateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditValidateCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -11492,7 +11787,7 @@ impl<'a, C, NC, A> EditValidateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditValidateCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -11553,7 +11848,7 @@ impl<'a, C, NC, A> EditValidateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Creates or updates a localized store listing. /// /// A builder for the *listings.update* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -11622,7 +11917,7 @@ impl<'a, C, NC, A> EditListingUpdateCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "packageName", "editId", "language"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11679,7 +11974,7 @@ impl<'a, C, NC, A> EditListingUpdateCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11695,7 +11990,6 @@ impl<'a, C, NC, A> EditListingUpdateCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -11705,7 +11999,7 @@ impl<'a, C, NC, A> EditListingUpdateCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11716,7 +12010,7 @@ impl<'a, C, NC, A> EditListingUpdateCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11725,13 +12019,13 @@ impl<'a, C, NC, A> EditListingUpdateCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11752,7 +12046,7 @@ impl<'a, C, NC, A> EditListingUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditListingUpdateCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -11762,7 +12056,7 @@ impl<'a, C, NC, A> EditListingUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditListingUpdateCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -11772,7 +12066,7 @@ impl<'a, C, NC, A> EditListingUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditListingUpdateCall<'a, C, NC, A> { self._language = new_value.to_string(); self @@ -11833,7 +12127,7 @@ impl<'a, C, NC, A> EditListingUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Fetches the Expansion File configuration for the APK specified. /// /// A builder for the *expansionfiles.get* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -11897,7 +12191,7 @@ impl<'a, C, NC, A> EditExpansionfileGetCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "packageName", "editId", "apkVersionCode", "expansionFileType"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11950,7 +12244,7 @@ impl<'a, C, NC, A> EditExpansionfileGetCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11962,7 +12256,6 @@ impl<'a, C, NC, A> EditExpansionfileGetCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -11972,7 +12265,7 @@ impl<'a, C, NC, A> EditExpansionfileGetCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11983,7 +12276,7 @@ impl<'a, C, NC, A> EditExpansionfileGetCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11992,13 +12285,13 @@ impl<'a, C, NC, A> EditExpansionfileGetCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12010,7 +12303,7 @@ impl<'a, C, NC, A> EditExpansionfileGetCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditExpansionfileGetCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -12020,7 +12313,7 @@ impl<'a, C, NC, A> EditExpansionfileGetCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditExpansionfileGetCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -12030,7 +12323,7 @@ impl<'a, C, NC, A> EditExpansionfileGetCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The version code of the APK whose Expansion File configuration is being read or modified. + /// The version code of the APK whose Expansion File configuration is being read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditExpansionfileGetCall<'a, C, NC, A> { self._apk_version_code = new_value; self @@ -12100,7 +12393,7 @@ impl<'a, C, NC, A> EditExpansionfileGetCall<'a, C, NC, A> where NC: hyper::net:: /// Deletes all images for the specified language and image type. /// /// A builder for the *images.deleteall* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -12164,7 +12457,7 @@ impl<'a, C, NC, A> EditImageDeleteallCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "packageName", "editId", "language", "imageType"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12217,7 +12510,7 @@ impl<'a, C, NC, A> EditImageDeleteallCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12229,7 +12522,6 @@ impl<'a, C, NC, A> EditImageDeleteallCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -12239,7 +12531,7 @@ impl<'a, C, NC, A> EditImageDeleteallCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12250,7 +12542,7 @@ impl<'a, C, NC, A> EditImageDeleteallCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12259,13 +12551,13 @@ impl<'a, C, NC, A> EditImageDeleteallCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12277,7 +12569,7 @@ impl<'a, C, NC, A> EditImageDeleteallCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditImageDeleteallCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -12287,7 +12579,7 @@ impl<'a, C, NC, A> EditImageDeleteallCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditImageDeleteallCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -12297,7 +12589,7 @@ impl<'a, C, NC, A> EditImageDeleteallCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". + /// The language code (a BCP-47 language tag) of the localized listing whose images are to read or modified. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditImageDeleteallCall<'a, C, NC, A> { self._language = new_value.to_string(); self @@ -12367,7 +12659,7 @@ impl<'a, C, NC, A> EditImageDeleteallCall<'a, C, NC, A> where NC: hyper::net::Ne /// Updates app details for this edit. This method supports patch semantics. /// /// A builder for the *details.patch* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -12434,7 +12726,7 @@ impl<'a, C, NC, A> EditDetailPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "packageName", "editId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12491,7 +12783,7 @@ impl<'a, C, NC, A> EditDetailPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12507,7 +12799,6 @@ impl<'a, C, NC, A> EditDetailPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -12517,7 +12808,7 @@ impl<'a, C, NC, A> EditDetailPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12528,7 +12819,7 @@ impl<'a, C, NC, A> EditDetailPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12537,13 +12828,13 @@ impl<'a, C, NC, A> EditDetailPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12564,7 +12855,7 @@ impl<'a, C, NC, A> EditDetailPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditDetailPatchCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -12574,7 +12865,7 @@ impl<'a, C, NC, A> EditDetailPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditDetailPatchCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -12635,7 +12926,7 @@ impl<'a, C, NC, A> EditDetailPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Updates the track configuration for the specified track type. When halted, the rollout track cannot be updated without adding new APKs, and adding new APKs will cause it to resume. This method supports patch semantics. /// /// A builder for the *tracks.patch* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -12704,7 +12995,7 @@ impl<'a, C, NC, A> EditTrackPatchCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "packageName", "editId", "track"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12761,7 +13052,7 @@ impl<'a, C, NC, A> EditTrackPatchCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12777,7 +13068,6 @@ impl<'a, C, NC, A> EditTrackPatchCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -12787,7 +13077,7 @@ impl<'a, C, NC, A> EditTrackPatchCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12798,7 +13088,7 @@ impl<'a, C, NC, A> EditTrackPatchCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12807,13 +13097,13 @@ impl<'a, C, NC, A> EditTrackPatchCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12834,7 +13124,7 @@ impl<'a, C, NC, A> EditTrackPatchCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditTrackPatchCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -12844,7 +13134,7 @@ impl<'a, C, NC, A> EditTrackPatchCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditTrackPatchCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -12854,7 +13144,7 @@ impl<'a, C, NC, A> EditTrackPatchCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The track type to read or modify. + /// The track type to read or modify. pub fn track(mut self, new_value: &str) -> EditTrackPatchCall<'a, C, NC, A> { self._track = new_value.to_string(); self @@ -12915,7 +13205,7 @@ impl<'a, C, NC, A> EditTrackPatchCall<'a, C, NC, A> where NC: hyper::net::Networ /// Deletes the specified localized store listing from an edit. /// /// A builder for the *listings.delete* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -12977,7 +13267,7 @@ impl<'a, C, NC, A> EditListingDeleteCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["packageName", "editId", "language"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13029,7 +13319,7 @@ impl<'a, C, NC, A> EditListingDeleteCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13041,7 +13331,6 @@ impl<'a, C, NC, A> EditListingDeleteCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -13051,7 +13340,7 @@ impl<'a, C, NC, A> EditListingDeleteCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13062,12 +13351,12 @@ impl<'a, C, NC, A> EditListingDeleteCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13079,7 +13368,7 @@ impl<'a, C, NC, A> EditListingDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditListingDeleteCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -13089,7 +13378,7 @@ impl<'a, C, NC, A> EditListingDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditListingDeleteCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -13099,7 +13388,7 @@ impl<'a, C, NC, A> EditListingDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// The language code (a BCP-47 language tag) of the localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditListingDeleteCall<'a, C, NC, A> { self._language = new_value.to_string(); self @@ -13160,7 +13449,7 @@ impl<'a, C, NC, A> EditListingDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Fetches the APK-specific localized listing for a specified APK and language code. /// /// A builder for the *apklistings.get* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -13224,7 +13513,7 @@ impl<'a, C, NC, A> EditApklistingGetCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "packageName", "editId", "apkVersionCode", "language"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13277,7 +13566,7 @@ impl<'a, C, NC, A> EditApklistingGetCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13289,7 +13578,6 @@ impl<'a, C, NC, A> EditApklistingGetCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -13299,7 +13587,7 @@ impl<'a, C, NC, A> EditApklistingGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13310,7 +13598,7 @@ impl<'a, C, NC, A> EditApklistingGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13319,13 +13607,13 @@ impl<'a, C, NC, A> EditApklistingGetCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13337,7 +13625,7 @@ impl<'a, C, NC, A> EditApklistingGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApklistingGetCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -13347,7 +13635,7 @@ impl<'a, C, NC, A> EditApklistingGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApklistingGetCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -13357,7 +13645,7 @@ impl<'a, C, NC, A> EditApklistingGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The APK version code whose APK-specific listings should be read or modified. + /// The APK version code whose APK-specific listings should be read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditApklistingGetCall<'a, C, NC, A> { self._apk_version_code = new_value; self @@ -13367,7 +13655,7 @@ impl<'a, C, NC, A> EditApklistingGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". + /// The language code (a BCP-47 language tag) of the APK-specific localized listing to read or modify. For example, to select Austrian German, pass "de-AT". pub fn language(mut self, new_value: &str) -> EditApklistingGetCall<'a, C, NC, A> { self._language = new_value.to_string(); self @@ -13426,7 +13714,7 @@ impl<'a, C, NC, A> EditApklistingGetCall<'a, C, NC, A> where NC: hyper::net::Net /// A builder for the *testers.update* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -13495,7 +13783,7 @@ impl<'a, C, NC, A> EditTesterUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "packageName", "editId", "track"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13552,7 +13840,7 @@ impl<'a, C, NC, A> EditTesterUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13568,7 +13856,6 @@ impl<'a, C, NC, A> EditTesterUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -13578,7 +13865,7 @@ impl<'a, C, NC, A> EditTesterUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13589,7 +13876,7 @@ impl<'a, C, NC, A> EditTesterUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13598,13 +13885,13 @@ impl<'a, C, NC, A> EditTesterUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13625,7 +13912,7 @@ impl<'a, C, NC, A> EditTesterUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditTesterUpdateCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -13635,7 +13922,7 @@ impl<'a, C, NC, A> EditTesterUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditTesterUpdateCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -13705,7 +13992,7 @@ impl<'a, C, NC, A> EditTesterUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Lists all the APK-specific localized listings for a specified APK. /// /// A builder for the *apklistings.list* method supported by a *edit* resource. -/// It is not used directly, but through a `EditMethods`. +/// It is not used directly, but through a `EditMethods` instance. /// /// # Example /// @@ -13767,7 +14054,7 @@ impl<'a, C, NC, A> EditApklistingListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "packageName", "editId", "apkVersionCode"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13820,7 +14107,7 @@ impl<'a, C, NC, A> EditApklistingListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13832,7 +14119,6 @@ impl<'a, C, NC, A> EditApklistingListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -13842,7 +14128,7 @@ impl<'a, C, NC, A> EditApklistingListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13853,7 +14139,7 @@ impl<'a, C, NC, A> EditApklistingListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13862,13 +14148,13 @@ impl<'a, C, NC, A> EditApklistingListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13880,7 +14166,7 @@ impl<'a, C, NC, A> EditApklistingListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". + /// Unique identifier for the Android app that is being updated; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> EditApklistingListCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -13890,7 +14176,7 @@ impl<'a, C, NC, A> EditApklistingListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for this edit. + /// Unique identifier for this edit. pub fn edit_id(mut self, new_value: &str) -> EditApklistingListCall<'a, C, NC, A> { self._edit_id = new_value.to_string(); self @@ -13900,7 +14186,7 @@ impl<'a, C, NC, A> EditApklistingListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The APK version code whose APK-specific listings should be read or modified. + /// The APK version code whose APK-specific listings should be read or modified. pub fn apk_version_code(mut self, new_value: i32) -> EditApklistingListCall<'a, C, NC, A> { self._apk_version_code = new_value; self @@ -13959,7 +14245,7 @@ impl<'a, C, NC, A> EditApklistingListCall<'a, C, NC, A> where NC: hyper::net::Ne /// A builder for the *batch* method supported by a *inappproduct* resource. -/// It is not used directly, but through a `InappproductMethods`. +/// It is not used directly, but through a `InappproductMethods` instance. /// /// # Example /// @@ -14022,7 +14308,7 @@ impl<'a, C, NC, A> InappproductBatchCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14055,7 +14341,7 @@ impl<'a, C, NC, A> InappproductBatchCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14071,7 +14357,6 @@ impl<'a, C, NC, A> InappproductBatchCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -14081,7 +14366,7 @@ impl<'a, C, NC, A> InappproductBatchCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14092,7 +14377,7 @@ impl<'a, C, NC, A> InappproductBatchCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14101,13 +14386,13 @@ impl<'a, C, NC, A> InappproductBatchCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14179,7 +14464,7 @@ impl<'a, C, NC, A> InappproductBatchCall<'a, C, NC, A> where NC: hyper::net::Net /// List all the in-app products for an Android app, both subscriptions and managed in-app products.. /// /// A builder for the *list* method supported by a *inappproduct* resource. -/// It is not used directly, but through a `InappproductMethods`. +/// It is not used directly, but through a `InappproductMethods` instance. /// /// # Example /// @@ -14252,7 +14537,7 @@ impl<'a, C, NC, A> InappproductListCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "packageName", "token", "startIndex", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14305,7 +14590,7 @@ impl<'a, C, NC, A> InappproductListCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14317,7 +14602,6 @@ impl<'a, C, NC, A> InappproductListCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -14327,7 +14611,7 @@ impl<'a, C, NC, A> InappproductListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14338,7 +14622,7 @@ impl<'a, C, NC, A> InappproductListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14347,13 +14631,13 @@ impl<'a, C, NC, A> InappproductListCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14365,7 +14649,7 @@ impl<'a, C, NC, A> InappproductListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app with in-app products; for example, "com.spiffygame". + /// Unique identifier for the Android app with in-app products; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> InappproductListCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -14447,7 +14731,7 @@ impl<'a, C, NC, A> InappproductListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Creates a new in-app product for an app. /// /// A builder for the *insert* method supported by a *inappproduct* resource. -/// It is not used directly, but through a `InappproductMethods`. +/// It is not used directly, but through a `InappproductMethods` instance. /// /// # Example /// @@ -14517,7 +14801,7 @@ impl<'a, C, NC, A> InappproductInsertCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "packageName", "autoConvertMissingPrices"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14574,7 +14858,7 @@ impl<'a, C, NC, A> InappproductInsertCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14590,7 +14874,6 @@ impl<'a, C, NC, A> InappproductInsertCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -14600,7 +14883,7 @@ impl<'a, C, NC, A> InappproductInsertCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14611,7 +14894,7 @@ impl<'a, C, NC, A> InappproductInsertCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14620,13 +14903,13 @@ impl<'a, C, NC, A> InappproductInsertCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14647,7 +14930,7 @@ impl<'a, C, NC, A> InappproductInsertCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app; for example, "com.spiffygame". + /// Unique identifier for the Android app; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> InappproductInsertCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -14655,7 +14938,7 @@ impl<'a, C, NC, A> InappproductInsertCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *auto convert missing prices* query property to the given value. /// /// - /// If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. + /// If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. pub fn auto_convert_missing_prices(mut self, new_value: bool) -> InappproductInsertCall<'a, C, NC, A> { self._auto_convert_missing_prices = Some(new_value); self @@ -14716,7 +14999,7 @@ impl<'a, C, NC, A> InappproductInsertCall<'a, C, NC, A> where NC: hyper::net::Ne /// Delete an in-app product for an app. /// /// A builder for the *delete* method supported by a *inappproduct* resource. -/// It is not used directly, but through a `InappproductMethods`. +/// It is not used directly, but through a `InappproductMethods` instance. /// /// # Example /// @@ -14776,7 +15059,7 @@ impl<'a, C, NC, A> InappproductDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["packageName", "sku"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14828,7 +15111,7 @@ impl<'a, C, NC, A> InappproductDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14840,7 +15123,6 @@ impl<'a, C, NC, A> InappproductDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -14850,7 +15132,7 @@ impl<'a, C, NC, A> InappproductDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14861,12 +15143,12 @@ impl<'a, C, NC, A> InappproductDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14878,7 +15160,7 @@ impl<'a, C, NC, A> InappproductDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". + /// Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> InappproductDeleteCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -14888,7 +15170,7 @@ impl<'a, C, NC, A> InappproductDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the in-app product. + /// Unique identifier for the in-app product. pub fn sku(mut self, new_value: &str) -> InappproductDeleteCall<'a, C, NC, A> { self._sku = new_value.to_string(); self @@ -14949,7 +15231,7 @@ impl<'a, C, NC, A> InappproductDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne /// Returns information about the in-app product specified. /// /// A builder for the *get* method supported by a *inappproduct* resource. -/// It is not used directly, but through a `InappproductMethods`. +/// It is not used directly, but through a `InappproductMethods` instance. /// /// # Example /// @@ -15009,7 +15291,7 @@ impl<'a, C, NC, A> InappproductGetCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "packageName", "sku"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15062,7 +15344,7 @@ impl<'a, C, NC, A> InappproductGetCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15074,7 +15356,6 @@ impl<'a, C, NC, A> InappproductGetCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -15084,7 +15365,7 @@ impl<'a, C, NC, A> InappproductGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15095,7 +15376,7 @@ impl<'a, C, NC, A> InappproductGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15104,13 +15385,13 @@ impl<'a, C, NC, A> InappproductGetCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15131,7 +15412,7 @@ impl<'a, C, NC, A> InappproductGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the in-app product. + /// Unique identifier for the in-app product. pub fn sku(mut self, new_value: &str) -> InappproductGetCall<'a, C, NC, A> { self._sku = new_value.to_string(); self @@ -15192,7 +15473,7 @@ impl<'a, C, NC, A> InappproductGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Updates the details of an in-app product. /// /// A builder for the *update* method supported by a *inappproduct* resource. -/// It is not used directly, but through a `InappproductMethods`. +/// It is not used directly, but through a `InappproductMethods` instance. /// /// # Example /// @@ -15264,7 +15545,7 @@ impl<'a, C, NC, A> InappproductUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "packageName", "sku", "autoConvertMissingPrices"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15321,7 +15602,7 @@ impl<'a, C, NC, A> InappproductUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15337,7 +15618,6 @@ impl<'a, C, NC, A> InappproductUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -15347,7 +15627,7 @@ impl<'a, C, NC, A> InappproductUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15358,7 +15638,7 @@ impl<'a, C, NC, A> InappproductUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15367,13 +15647,13 @@ impl<'a, C, NC, A> InappproductUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15394,7 +15674,7 @@ impl<'a, C, NC, A> InappproductUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". + /// Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> InappproductUpdateCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -15404,7 +15684,7 @@ impl<'a, C, NC, A> InappproductUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the in-app product. + /// Unique identifier for the in-app product. pub fn sku(mut self, new_value: &str) -> InappproductUpdateCall<'a, C, NC, A> { self._sku = new_value.to_string(); self @@ -15412,7 +15692,7 @@ impl<'a, C, NC, A> InappproductUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *auto convert missing prices* query property to the given value. /// /// - /// If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. + /// If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. pub fn auto_convert_missing_prices(mut self, new_value: bool) -> InappproductUpdateCall<'a, C, NC, A> { self._auto_convert_missing_prices = Some(new_value); self @@ -15473,7 +15753,7 @@ impl<'a, C, NC, A> InappproductUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne /// Updates the details of an in-app product. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *inappproduct* resource. -/// It is not used directly, but through a `InappproductMethods`. +/// It is not used directly, but through a `InappproductMethods` instance. /// /// # Example /// @@ -15545,7 +15825,7 @@ impl<'a, C, NC, A> InappproductPatchCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "packageName", "sku", "autoConvertMissingPrices"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15602,7 +15882,7 @@ impl<'a, C, NC, A> InappproductPatchCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15618,7 +15898,6 @@ impl<'a, C, NC, A> InappproductPatchCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -15628,7 +15907,7 @@ impl<'a, C, NC, A> InappproductPatchCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15639,7 +15918,7 @@ impl<'a, C, NC, A> InappproductPatchCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15648,13 +15927,13 @@ impl<'a, C, NC, A> InappproductPatchCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15675,7 +15954,7 @@ impl<'a, C, NC, A> InappproductPatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". + /// Unique identifier for the Android app with the in-app product; for example, "com.spiffygame". pub fn package_name(mut self, new_value: &str) -> InappproductPatchCall<'a, C, NC, A> { self._package_name = new_value.to_string(); self @@ -15685,7 +15964,7 @@ impl<'a, C, NC, A> InappproductPatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Unique identifier for the in-app product. + /// Unique identifier for the in-app product. pub fn sku(mut self, new_value: &str) -> InappproductPatchCall<'a, C, NC, A> { self._sku = new_value.to_string(); self @@ -15693,7 +15972,7 @@ impl<'a, C, NC, A> InappproductPatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *auto convert missing prices* query property to the given value. /// /// - /// If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. + /// If true the prices for all regions targeted by the parent app that don't have a price specified for this in-app product will be auto converted to the target currency based on the default price. Defaults to false. pub fn auto_convert_missing_prices(mut self, new_value: bool) -> InappproductPatchCall<'a, C, NC, A> { self._auto_convert_missing_prices = Some(new_value); self diff --git a/gen/appsactivity1/Cargo.toml b/gen/appsactivity1/Cargo.toml index c2d396c145..a4c82b78c6 100644 --- a/gen/appsactivity1/Cargo.toml +++ b/gen/appsactivity1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-appsactivity1" -version = "0.1.1+20140828" +version = "0.1.2+20140828" authors = ["Sebastian Thiel "] description = "A complete library to interact with appsactivity (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appsactivity1" @@ -16,7 +16,7 @@ keywords = ["appsactivity", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/appsactivity1/README.md b/gen/appsactivity1/README.md index c99c393036..8f6060b891 100644 --- a/gen/appsactivity1/README.md +++ b/gen/appsactivity1/README.md @@ -1,11 +1,11 @@ The `google-appsactivity1` library allows access to all features of the *Google appsactivity* service. -This documentation was generated from *appsactivity* crate version *0.1.1+20140828*, where *20140828* is the exact revision of the *appsactivity:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *appsactivity* crate version *0.1.2+20140828*, where *20140828* is the exact revision of the *appsactivity:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *appsactivity* *v1* API can be found at the [official documentation site](https://developers.google.com/google-apps/activity/). @@ -25,6 +25,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-appsactivity1/struct.Appsactivity.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-appsactivity1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-appsactivity1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-appsactivity1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -34,6 +36,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-appsactivity1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -68,7 +72,7 @@ google-appsactivity1 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-appsactivity1" as appsactivity1; -use appsactivity1::Result; +use appsactivity1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use appsactivity1::Appsactivity; @@ -99,15 +103,17 @@ let result = hub.activities().list() .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -120,7 +126,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-appsactivity1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-appsactivity1/trait.ResponseResult.html), it will return that by default. @@ -143,8 +149,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-appsactivity1/ ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-appsactivity1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-appsactivity1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-appsactivity1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-appsactivity1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-appsactivity1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/appsactivity1/src/cmn.rs b/gen/appsactivity1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/appsactivity1/src/cmn.rs +++ b/gen/appsactivity1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/appsactivity1/src/lib.rs b/gen/appsactivity1/src/lib.rs index 1a4458e333..77904e07bf 100644 --- a/gen/appsactivity1/src/lib.rs +++ b/gen/appsactivity1/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *appsactivity* crate version *0.1.1+20140828*, where *20140828* is the exact revision of the *appsactivity:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *appsactivity* crate version *0.1.2+20140828*, where *20140828* is the exact revision of the *appsactivity:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *appsactivity* *v1* API can be found at the //! [official documentation site](https://developers.google.com/google-apps/activity/). @@ -25,6 +25,8 @@ //! //! * **[Hub](struct.Appsactivity.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -34,6 +36,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -68,7 +72,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-appsactivity1" as appsactivity1; -//! use appsactivity1::Result; +//! use appsactivity1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -100,15 +104,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -121,7 +127,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -144,8 +150,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -194,7 +201,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -252,7 +259,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-appsactivity1" as appsactivity1; -/// use appsactivity1::Result; +/// use appsactivity1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -284,15 +291,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -313,7 +322,7 @@ impl<'a, C, NC, A> Appsactivity Appsactivity { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -323,7 +332,7 @@ impl<'a, C, NC, A> Appsactivity } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -343,10 +352,10 @@ impl<'a, C, NC, A> Appsactivity /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Rename { - /// The new title. + /// The new title. #[serde(alias="newTitle")] pub new_title: String, - /// The old title. + /// The old title. #[serde(alias="oldTitle")] pub old_title: String, } @@ -360,10 +369,10 @@ impl Part for Rename {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PermissionChange { - /// Lists all Permission objects removed. + /// Lists all Permission objects removed. #[serde(alias="removedPermissions")] pub removed_permissions: Vec, - /// Lists all Permission objects added. + /// Lists all Permission objects added. #[serde(alias="addedPermissions")] pub added_permissions: Vec, } @@ -377,12 +386,12 @@ impl Part for PermissionChange {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Target { - /// The MIME type of the target. + /// The MIME type of the target. #[serde(alias="mimeType")] pub mime_type: String, - /// The ID of the target. For example, in Google Drive, this is the file or folder ID. + /// The ID of the target. For example, in Google Drive, this is the file or folder ID. pub id: String, - /// The name of the target. For example, in Google Drive, this is the title of the file. + /// The name of the target. For example, in Google Drive, this is the title of the file. pub name: String, } @@ -395,12 +404,12 @@ impl Part for Target {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Parent { - /// The parent's ID. + /// The parent's ID. pub id: String, - /// Whether this is the root folder. + /// Whether this is the root folder. #[serde(alias="isRoot")] pub is_root: bool, - /// The parent's title. + /// The parent's title. pub title: String, } @@ -413,20 +422,20 @@ impl Part for Parent {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Permission { - /// Whether the permission requires a link to the file. + /// Whether the permission requires a link to the file. #[serde(alias="withLink")] pub with_link: bool, - /// The ID for this permission. Corresponds to the Drive API's permission ID returned as part of the Drive Permissions resource. + /// The ID for this permission. Corresponds to the Drive API's permission ID returned as part of the Drive Permissions resource. #[serde(alias="permissionId")] pub permission_id: String, - /// Indicates the Google Drive permissions role. The role determines a user's ability to read, write, or comment on the file. + /// Indicates the Google Drive permissions role. The role determines a user's ability to read, write, or comment on the file. pub role: String, - /// The name of the user or group the permission applies to. + /// The name of the user or group the permission applies to. pub name: String, - /// Indicates how widely permissions are granted. + /// Indicates how widely permissions are granted. #[serde(alias="type")] pub type_: String, - /// The user's information if the type is USER. + /// The user's information if the type is USER. pub user: User, } @@ -439,7 +448,7 @@ impl Part for Permission {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Photo { - /// The URL of the photo. + /// The URL of the photo. pub url: String, } @@ -452,10 +461,10 @@ impl Part for Photo {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Move { - /// The removed parent(s). + /// The removed parent(s). #[serde(alias="removedParents")] pub removed_parents: Vec, - /// The added parent(s). + /// The added parent(s). #[serde(alias="addedParents")] pub added_parents: Vec, } @@ -474,10 +483,10 @@ impl Part for Move {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ListActivitiesResponse { - /// Token for the next page of results. + /// Token for the next page of results. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// List of activities. + /// List of activities. pub activities: Vec, } @@ -490,9 +499,9 @@ impl ResponseResult for ListActivitiesResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct User { - /// The profile photo of the user. + /// The profile photo of the user. pub photo: Photo, - /// The displayable name of the user. + /// The displayable name of the user. pub name: String, } @@ -505,10 +514,10 @@ impl Part for User {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Activity { - /// The fields common to all of the singleEvents that make up the Activity. + /// The fields common to all of the singleEvents that make up the Activity. #[serde(alias="combinedEvent")] pub combined_event: Event, - /// A list of all the Events that make up the Activity. + /// A list of all the Events that make up the Activity. #[serde(alias="singleEvents")] pub single_events: Vec, } @@ -522,28 +531,28 @@ impl Part for Activity {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Event { - /// Extra information for rename type events, such as the old and new names. + /// Extra information for rename type events, such as the old and new names. pub rename: Rename, - /// Information specific to the Target object modified by the event. + /// Information specific to the Target object modified by the event. pub target: Target, - /// Additional event types. Some events may have multiple types when multiple actions are part of a single event. For example, creating a document, renaming it, and sharing it may be part of a single file-creation event. + /// Additional event types. Some events may have multiple types when multiple actions are part of a single event. For example, creating a document, renaming it, and sharing it may be part of a single file-creation event. #[serde(alias="additionalEventTypes")] pub additional_event_types: Vec, - /// Extra information for move type events, such as changes in an object's parents. + /// Extra information for move type events, such as changes in an object's parents. #[serde(alias="move")] pub move_: Move, - /// Extra information for permissionChange type events, such as the user or group the new permission applies to. + /// Extra information for permissionChange type events, such as the user or group the new permission applies to. #[serde(alias="permissionChanges")] pub permission_changes: Vec, - /// Represents the user responsible for the event. + /// Represents the user responsible for the event. pub user: User, - /// The time at which the event occurred formatted as Unix time in milliseconds. + /// The time at which the event occurred formatted as Unix time in milliseconds. #[serde(alias="eventTimeMillis")] pub event_time_millis: String, - /// The main type of event that occurred. + /// The main type of event that occurred. #[serde(alias="primaryEventType")] pub primary_event_type: String, - /// Whether this event is caused by a user being deleted. + /// Whether this event is caused by a user being deleted. #[serde(alias="fromUserDeletion")] pub from_user_deletion: bool, } @@ -590,13 +599,13 @@ pub struct ActivityMethods<'a, C, NC, A> hub: &'a Appsactivity, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ActivityMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ActivityMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ActivityMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns a list of activities visible to the current logged in user. Visible activities are determined by the visiblity settings of the object that was acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is scoped to activities from a given Google service using the source parameter. + /// Returns a list of activities visible to the current logged in user. Visible activities are determined by the visiblity settings of the object that was acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is scoped to activities from a given Google service using the source parameter. pub fn list(&self) -> ActivityListCall<'a, C, NC, A> { ActivityListCall { hub: self.hub, @@ -625,7 +634,7 @@ impl<'a, C, NC, A> ActivityMethods<'a, C, NC, A> { /// Returns a list of activities visible to the current logged in user. Visible activities are determined by the visiblity settings of the object that was acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is scoped to activities from a given Google service using the source parameter. /// /// A builder for the *list* method supported by a *activity* resource. -/// It is not used directly, but through a `ActivityMethods`. +/// It is not used directly, but through a `ActivityMethods` instance. /// /// # Example /// @@ -716,7 +725,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "userId", "source", "pageToken", "pageSize", "groupingStrategy", "drive.fileId", "drive.ancestorId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -745,7 +754,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -757,7 +766,6 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -767,7 +775,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -778,7 +786,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -787,13 +795,13 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -803,7 +811,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *user id* query property to the given value. /// /// - /// Indicates the user to return activity for. Use the special value me to indicate the currently authenticated user. + /// Indicates the user to return activity for. Use the special value me to indicate the currently authenticated user. pub fn user_id(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._user_id = Some(new_value.to_string()); self @@ -820,7 +828,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// A token to retrieve a specific page of results. + /// A token to retrieve a specific page of results. pub fn page_token(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -828,7 +836,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page size* query property to the given value. /// /// - /// The maximum number of events to return on a page. The response includes a continuation token if there are more events. + /// The maximum number of events to return on a page. The response includes a continuation token if there are more events. pub fn page_size(mut self, new_value: i32) -> ActivityListCall<'a, C, NC, A> { self._page_size = Some(new_value); self @@ -836,7 +844,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *grouping strategy* query property to the given value. /// /// - /// Indicates the strategy to use when grouping singleEvents items in the associated combinedEvent object. + /// Indicates the strategy to use when grouping singleEvents items in the associated combinedEvent object. pub fn grouping_strategy(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._grouping_strategy = Some(new_value.to_string()); self @@ -844,7 +852,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *drive.file id* query property to the given value. /// /// - /// Identifies the Drive item to return activities for. + /// Identifies the Drive item to return activities for. pub fn drive_file_id(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._drive_file_id = Some(new_value.to_string()); self @@ -852,7 +860,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *drive.ancestor id* query property to the given value. /// /// - /// Identifies the Drive folder containing the items for which to return activities. + /// Identifies the Drive folder containing the items for which to return activities. pub fn drive_ancestor_id(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._drive_ancestor_id = Some(new_value.to_string()); self diff --git a/gen/appstate1/Cargo.toml b/gen/appstate1/Cargo.toml index 8c4140e39d..244edee6b2 100644 --- a/gen/appstate1/Cargo.toml +++ b/gen/appstate1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-appstate1" -version = "0.1.1+20150309" +version = "0.1.2+20150316" authors = ["Sebastian Thiel "] description = "A complete library to interact with App State (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/appstate1" @@ -16,7 +16,7 @@ keywords = ["appstate", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/appstate1/README.md b/gen/appstate1/README.md index a24e6b67bc..519fb81137 100644 --- a/gen/appstate1/README.md +++ b/gen/appstate1/README.md @@ -1,11 +1,11 @@ The `google-appstate1` library allows access to all features of the *Google App State* service. -This documentation was generated from *App State* crate version *0.1.1+20150309*, where *20150309* is the exact revision of the *appstate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *App State* crate version *0.1.2+20150316*, where *20150316* is the exact revision of the *appstate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *App State* *v1* API can be found at the [official documentation site](https://developers.google.com/games/services/web/api/states). @@ -25,6 +25,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-appstate1/struct.AppState.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-appstate1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-appstate1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-appstate1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -34,6 +36,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-appstate1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -70,7 +74,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-appstate1" as appstate1; use appstate1::UpdateRequest; -use appstate1::Result; +use appstate1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use appstate1::AppState; @@ -100,15 +104,17 @@ let result = hub.states().update(&req, -39) .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -121,7 +127,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-appstate1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-appstate1/trait.ResponseResult.html), it will return that by default. @@ -144,8 +150,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-appstate1/trai ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-appstate1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-appstate1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-appstate1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-appstate1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-appstate1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/appstate1/src/cmn.rs b/gen/appstate1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/appstate1/src/cmn.rs +++ b/gen/appstate1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/appstate1/src/lib.rs b/gen/appstate1/src/lib.rs index 427bf9dff5..0c0f028417 100644 --- a/gen/appstate1/src/lib.rs +++ b/gen/appstate1/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *App State* crate version *0.1.1+20150309*, where *20150309* is the exact revision of the *appstate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *App State* crate version *0.1.2+20150316*, where *20150316* is the exact revision of the *appstate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *App State* *v1* API can be found at the //! [official documentation site](https://developers.google.com/games/services/web/api/states). @@ -25,6 +25,8 @@ //! //! * **[Hub](struct.AppState.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -34,6 +36,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -70,7 +74,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-appstate1" as appstate1; //! use appstate1::UpdateRequest; -//! use appstate1::Result; +//! use appstate1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -101,15 +105,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -122,7 +128,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -145,8 +151,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -195,7 +202,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -242,7 +249,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-appstate1" as appstate1; /// use appstate1::UpdateRequest; -/// use appstate1::Result; +/// use appstate1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -273,15 +280,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -302,7 +311,7 @@ impl<'a, C, NC, A> AppState AppState { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -312,7 +321,7 @@ impl<'a, C, NC, A> AppState } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -337,11 +346,11 @@ impl<'a, C, NC, A> AppState /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ListResponse { - /// The app state data. + /// The app state data. pub items: Vec, - /// Uniquely identifies the type of this resource. Value is always the fixed string appstate#listResponse. + /// Uniquely identifies the type of this resource. Value is always the fixed string appstate#listResponse. pub kind: String, - /// The maximum number of keys allowed for this user. + /// The maximum number of keys allowed for this user. #[serde(alias="maximumKeyCount")] pub maximum_key_count: i32, } @@ -360,14 +369,14 @@ impl ResponseResult for ListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct GetResponse { - /// The requested data. + /// The requested data. pub data: String, - /// Uniquely identifies the type of this resource. Value is always the fixed string appstate#getResponse. + /// Uniquely identifies the type of this resource. Value is always the fixed string appstate#getResponse. pub kind: String, - /// The key for the data. + /// The key for the data. #[serde(alias="stateKey")] pub state_key: i32, - /// The current app state version. + /// The current app state version. #[serde(alias="currentStateVersion")] pub current_state_version: String, } @@ -386,9 +395,9 @@ impl ResponseResult for GetResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct UpdateRequest { - /// Uniquely identifies the type of this resource. Value is always the fixed string appstate#updateRequest. + /// Uniquely identifies the type of this resource. Value is always the fixed string appstate#updateRequest. pub kind: Option, - /// The new app state data that your application is trying to update with. + /// The new app state data that your application is trying to update with. pub data: Option, } @@ -407,12 +416,12 @@ impl RequestValue for UpdateRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct WriteResult { - /// Uniquely identifies the type of this resource. Value is always the fixed string appstate#writeResult. + /// Uniquely identifies the type of this resource. Value is always the fixed string appstate#writeResult. pub kind: String, - /// The written key. + /// The written key. #[serde(alias="stateKey")] pub state_key: i32, - /// The version of the data for this key on the server. + /// The version of the data for this key on the server. #[serde(alias="currentStateVersion")] pub current_state_version: String, } @@ -459,13 +468,17 @@ pub struct StateMethods<'a, C, NC, A> hub: &'a AppState, } -impl<'a, C, NC, A> ResourceMethodsBuilder for StateMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for StateMethods<'a, C, NC, A> {} impl<'a, C, NC, A> StateMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a key and the data associated with it. The key is removed and no longer counts against the key quota. Note that since this method is not safe in the face of concurrent modifications, it should only be used for development and testing purposes. Invoking this method in shipping code can result in data loss and data corruption. + /// Deletes a key and the data associated with it. The key is removed and no longer counts against the key quota. Note that since this method is not safe in the face of concurrent modifications, it should only be used for development and testing purposes. Invoking this method in shipping code can result in data loss and data corruption. + /// + /// # Arguments + /// + /// * `stateKey` - The key for the data to be retrieved. pub fn delete(&self, state_key: i32) -> StateDeleteCall<'a, C, NC, A> { StateDeleteCall { hub: self.hub, @@ -478,7 +491,11 @@ impl<'a, C, NC, A> StateMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the data corresponding to the passed key. If the key does not exist on the server, an HTTP 404 will be returned. + /// Retrieves the data corresponding to the passed key. If the key does not exist on the server, an HTTP 404 will be returned. + /// + /// # Arguments + /// + /// * `stateKey` - The key for the data to be retrieved. pub fn get(&self, state_key: i32) -> StateGetCall<'a, C, NC, A> { StateGetCall { hub: self.hub, @@ -491,7 +508,11 @@ impl<'a, C, NC, A> StateMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Clears (sets to empty) the data for the passed key if and only if the passed version matches the currently stored version. This method results in a conflict error on version mismatch. + /// Clears (sets to empty) the data for the passed key if and only if the passed version matches the currently stored version. This method results in a conflict error on version mismatch. + /// + /// # Arguments + /// + /// * `stateKey` - The key for the data to be retrieved. pub fn clear(&self, state_key: i32) -> StateClearCall<'a, C, NC, A> { StateClearCall { hub: self.hub, @@ -505,7 +526,7 @@ impl<'a, C, NC, A> StateMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all the states keys, and optionally the state data. + /// Lists all the states keys, and optionally the state data. pub fn list(&self) -> StateListCall<'a, C, NC, A> { StateListCall { hub: self.hub, @@ -518,7 +539,12 @@ impl<'a, C, NC, A> StateMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update the data associated with the input key if and only if the passed version matches the currently stored version. This method is safe in the face of concurrent writes. Maximum per-key size is 128KB. + /// Update the data associated with the input key if and only if the passed version matches the currently stored version. This method is safe in the face of concurrent writes. Maximum per-key size is 128KB. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `stateKey` - The key for the data to be retrieved. pub fn update(&self, request: &UpdateRequest, state_key: i32) -> StateUpdateCall<'a, C, NC, A> { StateUpdateCall { hub: self.hub, @@ -543,7 +569,7 @@ impl<'a, C, NC, A> StateMethods<'a, C, NC, A> { /// Deletes a key and the data associated with it. The key is removed and no longer counts against the key quota. Note that since this method is not safe in the face of concurrent modifications, it should only be used for development and testing purposes. Invoking this method in shipping code can result in data loss and data corruption. /// /// A builder for the *delete* method supported by a *state* resource. -/// It is not used directly, but through a `StateMethods`. +/// It is not used directly, but through a `StateMethods` instance. /// /// # Example /// @@ -601,7 +627,7 @@ impl<'a, C, NC, A> StateDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["stateKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -653,7 +679,7 @@ impl<'a, C, NC, A> StateDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -665,7 +691,6 @@ impl<'a, C, NC, A> StateDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -675,7 +700,7 @@ impl<'a, C, NC, A> StateDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -686,12 +711,12 @@ impl<'a, C, NC, A> StateDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -703,7 +728,7 @@ impl<'a, C, NC, A> StateDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The key for the data to be retrieved. + /// The key for the data to be retrieved. pub fn state_key(mut self, new_value: i32) -> StateDeleteCall<'a, C, NC, A> { self._state_key = new_value; self @@ -764,7 +789,7 @@ impl<'a, C, NC, A> StateDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Retrieves the data corresponding to the passed key. If the key does not exist on the server, an HTTP 404 will be returned. /// /// A builder for the *get* method supported by a *state* resource. -/// It is not used directly, but through a `StateMethods`. +/// It is not used directly, but through a `StateMethods` instance. /// /// # Example /// @@ -822,7 +847,7 @@ impl<'a, C, NC, A> StateGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "stateKey"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -875,7 +900,7 @@ impl<'a, C, NC, A> StateGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -887,7 +912,6 @@ impl<'a, C, NC, A> StateGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -897,7 +921,7 @@ impl<'a, C, NC, A> StateGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -908,7 +932,7 @@ impl<'a, C, NC, A> StateGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -917,13 +941,13 @@ impl<'a, C, NC, A> StateGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -935,7 +959,7 @@ impl<'a, C, NC, A> StateGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The key for the data to be retrieved. + /// The key for the data to be retrieved. pub fn state_key(mut self, new_value: i32) -> StateGetCall<'a, C, NC, A> { self._state_key = new_value; self @@ -996,7 +1020,7 @@ impl<'a, C, NC, A> StateGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Clears (sets to empty) the data for the passed key if and only if the passed version matches the currently stored version. This method results in a conflict error on version mismatch. /// /// A builder for the *clear* method supported by a *state* resource. -/// It is not used directly, but through a `StateMethods`. +/// It is not used directly, but through a `StateMethods` instance. /// /// # Example /// @@ -1059,7 +1083,7 @@ impl<'a, C, NC, A> StateClearCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "stateKey", "currentDataVersion"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1112,7 +1136,7 @@ impl<'a, C, NC, A> StateClearCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1124,7 +1148,6 @@ impl<'a, C, NC, A> StateClearCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -1134,7 +1157,7 @@ impl<'a, C, NC, A> StateClearCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1145,7 +1168,7 @@ impl<'a, C, NC, A> StateClearCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1154,13 +1177,13 @@ impl<'a, C, NC, A> StateClearCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1172,7 +1195,7 @@ impl<'a, C, NC, A> StateClearCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The key for the data to be retrieved. + /// The key for the data to be retrieved. pub fn state_key(mut self, new_value: i32) -> StateClearCall<'a, C, NC, A> { self._state_key = new_value; self @@ -1180,7 +1203,7 @@ impl<'a, C, NC, A> StateClearCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *current data version* query property to the given value. /// /// - /// The version of the data to be cleared. Version strings are returned by the server. + /// The version of the data to be cleared. Version strings are returned by the server. pub fn current_data_version(mut self, new_value: &str) -> StateClearCall<'a, C, NC, A> { self._current_data_version = Some(new_value.to_string()); self @@ -1241,7 +1264,7 @@ impl<'a, C, NC, A> StateClearCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Lists all the states keys, and optionally the state data. /// /// A builder for the *list* method supported by a *state* resource. -/// It is not used directly, but through a `StateMethods`. +/// It is not used directly, but through a `StateMethods` instance. /// /// # Example /// @@ -1302,7 +1325,7 @@ impl<'a, C, NC, A> StateListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "includeData"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1331,7 +1354,7 @@ impl<'a, C, NC, A> StateListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1343,7 +1366,6 @@ impl<'a, C, NC, A> StateListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -1353,7 +1375,7 @@ impl<'a, C, NC, A> StateListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1364,7 +1386,7 @@ impl<'a, C, NC, A> StateListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1373,13 +1395,13 @@ impl<'a, C, NC, A> StateListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1389,7 +1411,7 @@ impl<'a, C, NC, A> StateListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *include data* query property to the given value. /// /// - /// Whether to include the full data in addition to the version number + /// Whether to include the full data in addition to the version number pub fn include_data(mut self, new_value: bool) -> StateListCall<'a, C, NC, A> { self._include_data = Some(new_value); self @@ -1450,7 +1472,7 @@ impl<'a, C, NC, A> StateListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Update the data associated with the input key if and only if the passed version matches the currently stored version. This method is safe in the face of concurrent writes. Maximum per-key size is 128KB. /// /// A builder for the *update* method supported by a *state* resource. -/// It is not used directly, but through a `StateMethods`. +/// It is not used directly, but through a `StateMethods` instance. /// /// # Example /// @@ -1520,7 +1542,7 @@ impl<'a, C, NC, A> StateUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "stateKey", "currentStateVersion"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1577,7 +1599,7 @@ impl<'a, C, NC, A> StateUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1593,7 +1615,6 @@ impl<'a, C, NC, A> StateUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -1603,7 +1624,7 @@ impl<'a, C, NC, A> StateUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1614,7 +1635,7 @@ impl<'a, C, NC, A> StateUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1623,13 +1644,13 @@ impl<'a, C, NC, A> StateUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1650,7 +1671,7 @@ impl<'a, C, NC, A> StateUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The key for the data to be retrieved. + /// The key for the data to be retrieved. pub fn state_key(mut self, new_value: i32) -> StateUpdateCall<'a, C, NC, A> { self._state_key = new_value; self @@ -1658,7 +1679,7 @@ impl<'a, C, NC, A> StateUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *current state version* query property to the given value. /// /// - /// The version of the app state your application is attempting to update. If this does not match the current version, this method will return a conflict error. If there is no data stored on the server for this key, the update will succeed irrespective of the value of this parameter. + /// The version of the app state your application is attempting to update. If this does not match the current version, this method will return a conflict error. If there is no data stored on the server for this key, the update will succeed irrespective of the value of this parameter. pub fn current_state_version(mut self, new_value: &str) -> StateUpdateCall<'a, C, NC, A> { self._current_state_version = Some(new_value.to_string()); self diff --git a/gen/audit1/Cargo.toml b/gen/audit1/Cargo.toml index 48af81d122..80e9150f17 100644 --- a/gen/audit1/Cargo.toml +++ b/gen/audit1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-audit1" -version = "0.1.1+20130108" +version = "0.1.2+20130108" authors = ["Sebastian Thiel "] description = "A complete library to interact with audit (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/audit1" @@ -16,7 +16,7 @@ keywords = ["audit", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/audit1/README.md b/gen/audit1/README.md index a90324aec9..5999385ae8 100644 --- a/gen/audit1/README.md +++ b/gen/audit1/README.md @@ -1,11 +1,11 @@ The `google-audit1` library allows access to all features of the *Google audit* service. -This documentation was generated from *audit* crate version *0.1.1+20130108*, where *20130108* is the exact revision of the *audit:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *audit* crate version *0.1.2+20130108*, where *20130108* is the exact revision of the *audit:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *audit* *v1* API can be found at the [official documentation site](https://developers.google.com/google-apps/admin-audit/get_started). @@ -25,6 +25,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-audit1/struct.Audit.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-audit1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-audit1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-audit1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -34,6 +36,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-audit1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -68,7 +72,7 @@ google-audit1 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-audit1" as audit1; -use audit1::Result; +use audit1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use audit1::Audit; @@ -101,15 +105,17 @@ let result = hub.activities().list("customerId", "applicationId") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -122,7 +128,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-audit1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-audit1/trait.ResponseResult.html), it will return that by default. @@ -145,8 +151,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-audit1/trait.D ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-audit1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-audit1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-audit1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-audit1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-audit1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/audit1/src/cmn.rs b/gen/audit1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/audit1/src/cmn.rs +++ b/gen/audit1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/audit1/src/lib.rs b/gen/audit1/src/lib.rs index 7a78a54cf2..79b4138728 100644 --- a/gen/audit1/src/lib.rs +++ b/gen/audit1/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *audit* crate version *0.1.1+20130108*, where *20130108* is the exact revision of the *audit:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *audit* crate version *0.1.2+20130108*, where *20130108* is the exact revision of the *audit:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *audit* *v1* API can be found at the //! [official documentation site](https://developers.google.com/google-apps/admin-audit/get_started). @@ -25,6 +25,8 @@ //! //! * **[Hub](struct.Audit.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -34,6 +36,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -68,7 +72,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-audit1" as audit1; -//! use audit1::Result; +//! use audit1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -102,15 +106,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -123,7 +129,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -146,8 +152,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -196,7 +203,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -220,7 +227,7 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, Re /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-audit1" as audit1; -/// use audit1::Result; +/// use audit1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -254,15 +261,17 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, Re /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -283,7 +292,7 @@ impl<'a, C, NC, A> Audit Audit { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -293,7 +302,7 @@ impl<'a, C, NC, A> Audit } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -318,11 +327,11 @@ impl<'a, C, NC, A> Audit /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Activities { - /// Each record in read response. + /// Each record in read response. pub items: Vec, - /// Kind of list response this is. + /// Kind of list response this is. pub kind: String, - /// Next page URL. + /// Next page URL. pub next: String, } @@ -335,14 +344,14 @@ impl ResponseResult for Activities {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ActivityActor { - /// ID of application which interacted on behalf of the user. + /// ID of application which interacted on behalf of the user. #[serde(alias="applicationId")] pub application_id: String, - /// Email address of the user. + /// Email address of the user. pub email: String, - /// For OAuth 2LO API requests, consumer_key of the requestor. + /// For OAuth 2LO API requests, consumer_key of the requestor. pub key: String, - /// User or OAuth 2LO request. + /// User or OAuth 2LO request. #[serde(alias="callerType")] pub caller_type: String, } @@ -357,16 +366,16 @@ impl Part for ActivityActor {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ActivityId { - /// Unique qualifier if multiple events have the same time. + /// Unique qualifier if multiple events have the same time. #[serde(alias="uniqQualifier")] pub uniq_qualifier: String, - /// Application ID of the source application. + /// Application ID of the source application. #[serde(alias="applicationId")] pub application_id: String, - /// Obfuscated customer ID of the source customer. + /// Obfuscated customer ID of the source customer. #[serde(alias="customerId")] pub customer_id: String, - /// Time of occurrence of the activity. + /// Time of occurrence of the activity. pub time: String, } @@ -380,19 +389,19 @@ impl Part for ActivityId {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Activity { - /// Kind of resource this is. + /// Kind of resource this is. pub kind: String, - /// Activity events. + /// Activity events. pub events: Vec, - /// IP Address of the user doing the action. + /// IP Address of the user doing the action. #[serde(alias="ipAddress")] pub ip_address: String, - /// Domain of source customer. + /// Domain of source customer. #[serde(alias="ownerDomain")] pub owner_domain: String, - /// User doing the action. + /// User doing the action. pub actor: ActivityActor, - /// Unique identifier for each activity record. + /// Unique identifier for each activity record. pub id: ActivityId, } @@ -405,9 +414,9 @@ impl Part for Activity {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ActivityEventsParameters { - /// Name of the parameter. + /// Name of the parameter. pub name: String, - /// Value of the parameter. + /// Value of the parameter. pub value: String, } @@ -421,12 +430,12 @@ impl Part for ActivityEventsParameters {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ActivityEvents { - /// Type of event. + /// Type of event. #[serde(alias="eventType")] pub event_type: String, - /// Name of event. + /// Name of event. pub name: String, - /// Event parameters. + /// Event parameters. pub parameters: Vec, } @@ -473,13 +482,18 @@ pub struct ActivityMethods<'a, C, NC, A> hub: &'a Audit, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ActivityMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ActivityMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ActivityMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of activities for a specific customer and application. + /// Retrieves a list of activities for a specific customer and application. + /// + /// # Arguments + /// + /// * `customerId` - Represents the customer who is the owner of target object on which action was performed. + /// * `applicationId` - Application ID of the application on which the event was performed. pub fn list(&self, customer_id: &str, application_id: &str) -> ActivityListCall<'a, C, NC, A> { ActivityListCall { hub: self.hub, @@ -511,7 +525,7 @@ impl<'a, C, NC, A> ActivityMethods<'a, C, NC, A> { /// Retrieves a list of activities for a specific customer and application. /// /// A builder for the *list* method supported by a *activity* resource. -/// It is not used directly, but through a `ActivityMethods`. +/// It is not used directly, but through a `ActivityMethods` instance. /// /// # Example /// @@ -615,7 +629,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "customerId", "applicationId", "startTime", "maxResults", "eventName", "endTime", "continuationToken", "caller", "actorIpAddress", "actorEmail", "actorApplicationId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -634,7 +648,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Some(value) => params.push(("key", value)), None => { dlg.finished(false); - return Result::MissingAPIKey + return Err(Error::MissingAPIKey) } } @@ -678,7 +692,6 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -688,7 +701,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -699,7 +712,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -708,13 +721,13 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -726,7 +739,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Represents the customer who is the owner of target object on which action was performed. + /// Represents the customer who is the owner of target object on which action was performed. pub fn customer_id(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._customer_id = new_value.to_string(); self @@ -736,7 +749,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Application ID of the application on which the event was performed. + /// Application ID of the application on which the event was performed. pub fn application_id(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._application_id = new_value.to_string(); self @@ -744,7 +757,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *start time* query property to the given value. /// /// - /// Return events which occured at or after this time. + /// Return events which occured at or after this time. pub fn start_time(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._start_time = Some(new_value.to_string()); self @@ -752,7 +765,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Number of activity records to be shown in each page. + /// Number of activity records to be shown in each page. pub fn max_results(mut self, new_value: i32) -> ActivityListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -760,7 +773,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *event name* query property to the given value. /// /// - /// Name of the event being queried. + /// Name of the event being queried. pub fn event_name(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._event_name = Some(new_value.to_string()); self @@ -768,7 +781,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *end time* query property to the given value. /// /// - /// Return events which occured at or before this time. + /// Return events which occured at or before this time. pub fn end_time(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._end_time = Some(new_value.to_string()); self @@ -776,7 +789,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *continuation token* query property to the given value. /// /// - /// Next page URL. + /// Next page URL. pub fn continuation_token(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._continuation_token = Some(new_value.to_string()); self @@ -784,7 +797,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *caller* query property to the given value. /// /// - /// Type of the caller. + /// Type of the caller. pub fn caller(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._caller = Some(new_value.to_string()); self @@ -792,7 +805,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *actor ip address* query property to the given value. /// /// - /// IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses. + /// IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses. pub fn actor_ip_address(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._actor_ip_address = Some(new_value.to_string()); self @@ -800,7 +813,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *actor email* query property to the given value. /// /// - /// Email address of the user who performed the action. + /// Email address of the user who performed the action. pub fn actor_email(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._actor_email = Some(new_value.to_string()); self @@ -808,7 +821,7 @@ impl<'a, C, NC, A> ActivityListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *actor application id* query property to the given value. /// /// - /// Application ID of the application which interacted on behalf of the user while performing the event. + /// Application ID of the application which interacted on behalf of the user while performing the event. pub fn actor_application_id(mut self, new_value: &str) -> ActivityListCall<'a, C, NC, A> { self._actor_application_id = Some(new_value.to_string()); self diff --git a/gen/autoscaler1_beta2/Cargo.toml b/gen/autoscaler1_beta2/Cargo.toml index 0f45dc49eb..c885f2770b 100644 --- a/gen/autoscaler1_beta2/Cargo.toml +++ b/gen/autoscaler1_beta2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-autoscaler1_beta2" -version = "0.1.1+20141112" +version = "0.1.2+20141112" authors = ["Sebastian Thiel "] description = "A complete library to interact with autoscaler (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/autoscaler1_beta2" @@ -16,7 +16,7 @@ keywords = ["autoscaler", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/autoscaler1_beta2/README.md b/gen/autoscaler1_beta2/README.md index 0b3ce12b63..060c65e471 100644 --- a/gen/autoscaler1_beta2/README.md +++ b/gen/autoscaler1_beta2/README.md @@ -1,11 +1,11 @@ The `google-autoscaler1_beta2` library allows access to all features of the *Google autoscaler* service. -This documentation was generated from *autoscaler* crate version *0.1.1+20141112*, where *20141112* is the exact revision of the *autoscaler:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *autoscaler* crate version *0.1.2+20141112*, where *20141112* is the exact revision of the *autoscaler:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *autoscaler* *v1_beta2* API can be found at the [official documentation site](http://developers.google.com/compute/docs/autoscaler). @@ -29,6 +29,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-autoscaler1_beta2/struct.AutoscalerHub.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-autoscaler1_beta2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-autoscaler1_beta2/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-autoscaler1_beta2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -38,6 +40,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-autoscaler1_beta2/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -77,7 +81,7 @@ google-autoscaler1_beta2 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-autoscaler1_beta2" as autoscaler1_beta2; -use autoscaler1_beta2::Result; +use autoscaler1_beta2::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use autoscaler1_beta2::AutoscalerHub; @@ -104,15 +108,17 @@ let result = hub.autoscalers().list("project", "zone") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -125,7 +131,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-autoscaler1_beta2/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-autoscaler1_beta2/trait.ResponseResult.html), it will return that by default. @@ -148,8 +154,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-autoscaler1_be ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-autoscaler1_beta2/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-autoscaler1_beta2/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-autoscaler1_beta2/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-autoscaler1_beta2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-autoscaler1_beta2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/autoscaler1_beta2/src/cmn.rs b/gen/autoscaler1_beta2/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/autoscaler1_beta2/src/cmn.rs +++ b/gen/autoscaler1_beta2/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/autoscaler1_beta2/src/lib.rs b/gen/autoscaler1_beta2/src/lib.rs index 4ee893ded8..715a5d8583 100644 --- a/gen/autoscaler1_beta2/src/lib.rs +++ b/gen/autoscaler1_beta2/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *autoscaler* crate version *0.1.1+20141112*, where *20141112* is the exact revision of the *autoscaler:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *autoscaler* crate version *0.1.2+20141112*, where *20141112* is the exact revision of the *autoscaler:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *autoscaler* *v1_beta2* API can be found at the //! [official documentation site](http://developers.google.com/compute/docs/autoscaler). @@ -29,6 +29,8 @@ //! //! * **[Hub](struct.AutoscalerHub.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -38,6 +40,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -77,7 +81,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-autoscaler1_beta2" as autoscaler1_beta2; -//! use autoscaler1_beta2::Result; +//! use autoscaler1_beta2::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -105,15 +109,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -126,7 +132,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -149,8 +155,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -199,7 +206,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -249,7 +256,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-autoscaler1_beta2" as autoscaler1_beta2; -/// use autoscaler1_beta2::Result; +/// use autoscaler1_beta2::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -277,15 +284,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -306,7 +315,7 @@ impl<'a, C, NC, A> AutoscalerHub AutoscalerHub { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -322,7 +331,7 @@ impl<'a, C, NC, A> AutoscalerHub } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -342,15 +351,15 @@ impl<'a, C, NC, A> AutoscalerHub /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DeprecationStatus { - /// no description provided + /// no description provided pub deleted: String, - /// no description provided + /// no description provided pub deprecated: String, - /// no description provided + /// no description provided pub state: String, - /// no description provided + /// no description provided pub obsolete: String, - /// no description provided + /// no description provided pub replacement: String, } @@ -363,9 +372,9 @@ impl Part for DeprecationStatus {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationWarningsData { - /// no description provided + /// no description provided pub key: String, - /// no description provided + /// no description provided pub value: String, } @@ -384,28 +393,28 @@ impl Part for OperationWarningsData {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Zone { - /// no description provided + /// no description provided pub status: Option, - /// Type of the resource. + /// Type of the resource. pub kind: Option, - /// no description provided + /// no description provided pub description: Option, - /// no description provided + /// no description provided #[serde(alias="maintenanceWindows")] pub maintenance_windows: Option>, - /// no description provided + /// no description provided pub deprecated: Option, - /// no description provided + /// no description provided pub region: Option, - /// no description provided + /// no description provided #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// no description provided + /// no description provided pub id: Option, - /// Server defined URL for the resource (output only). + /// Server defined URL for the resource (output only). #[serde(alias="selfLink")] pub self_link: Option, - /// no description provided + /// no description provided pub name: Option, } @@ -418,11 +427,11 @@ impl Resource for Zone {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationWarnings { - /// no description provided + /// no description provided pub message: String, - /// no description provided + /// no description provided pub code: String, - /// no description provided + /// no description provided pub data: Vec, } @@ -441,16 +450,16 @@ impl Part for OperationWarnings {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationList { - /// no description provided + /// no description provided #[serde(alias="nextPageToken")] pub next_page_token: String, - /// no description provided + /// no description provided pub items: Vec, - /// Type of resource. Always compute#operations for Operations resource. + /// Type of resource. Always compute#operations for Operations resource. pub kind: String, - /// no description provided + /// no description provided pub id: String, - /// no description provided + /// no description provided #[serde(alias="selfLink")] pub self_link: String, } @@ -464,15 +473,15 @@ impl ResponseResult for OperationList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ZoneMaintenanceWindows { - /// no description provided + /// no description provided #[serde(alias="endTime")] pub end_time: String, - /// no description provided + /// no description provided pub description: String, - /// no description provided + /// no description provided #[serde(alias="beginTime")] pub begin_time: String, - /// no description provided + /// no description provided pub name: String, } @@ -486,12 +495,12 @@ impl Part for ZoneMaintenanceWindows {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AutoscalingPolicyCustomMetricUtilization { - /// Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count. + /// Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count. pub metric: String, - /// Defines type in which utilization_target is expressed. + /// Defines type in which utilization_target is expressed. #[serde(alias="utilizationTargetType")] pub utilization_target_type: String, - /// Target value of the metric which Autoscaler should maintain. Must be a positive value. + /// Target value of the metric which Autoscaler should maintain. Must be a positive value. #[serde(alias="utilizationTarget")] pub utilization_target: f64, } @@ -505,11 +514,11 @@ impl Part for AutoscalingPolicyCustomMetricUtilization {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationErrorErrors { - /// no description provided + /// no description provided pub message: String, - /// no description provided + /// no description provided pub code: String, - /// no description provided + /// no description provided pub location: String, } @@ -523,22 +532,22 @@ impl Part for OperationErrorErrors {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AutoscalingPolicy { - /// Configuration parameters of autoscaling based on custom metric. + /// Configuration parameters of autoscaling based on custom metric. #[serde(alias="customMetricUtilizations")] pub custom_metric_utilizations: Vec, - /// The maximum number of replicas that the Autoscaler can scale up to. + /// The maximum number of replicas that the Autoscaler can scale up to. #[serde(alias="maxNumReplicas")] pub max_num_replicas: i32, - /// Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy. + /// Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy. #[serde(alias="cpuUtilization")] pub cpu_utilization: AutoscalingPolicyCpuUtilization, - /// The minimum number of replicas that the Autoscaler can scale down to. + /// The minimum number of replicas that the Autoscaler can scale down to. #[serde(alias="minNumReplicas")] pub min_num_replicas: i32, - /// The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds. + /// The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds. #[serde(alias="coolDownPeriodSec")] pub cool_down_period_sec: i32, - /// Configuration parameters of autoscaling based on load balancer. + /// Configuration parameters of autoscaling based on load balancer. #[serde(alias="loadBalancingUtilization")] pub load_balancing_utilization: AutoscalingPolicyLoadBalancingUtilization, } @@ -552,7 +561,7 @@ impl Part for AutoscalingPolicy {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationError { - /// no description provided + /// no description provided pub errors: Vec, } @@ -566,7 +575,7 @@ impl Part for OperationError {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AutoscalingPolicyCpuUtilization { - /// The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8. + /// The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8. #[serde(alias="utilizationTarget")] pub utilization_target: f64, } @@ -580,7 +589,7 @@ impl Part for AutoscalingPolicyCpuUtilization {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AutoscalingPolicyLoadBalancingUtilization { - /// Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7. + /// Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7. #[serde(alias="utilizationTarget")] pub utilization_target: f64, } @@ -599,12 +608,12 @@ impl Part for AutoscalingPolicyLoadBalancingUtilization {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AutoscalerListResponse { - /// [Output only] A token used to continue a truncated list request. + /// [Output only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Autoscaler resources. + /// Autoscaler resources. pub items: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, } @@ -626,61 +635,61 @@ impl ResponseResult for AutoscalerListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Operation { - /// no description provided + /// no description provided pub status: String, - /// no description provided + /// no description provided #[serde(alias="insertTime")] pub insert_time: String, - /// no description provided + /// no description provided pub warnings: Vec, - /// no description provided + /// no description provided pub error: OperationError, - /// no description provided + /// no description provided #[serde(alias="targetId")] pub target_id: String, - /// no description provided + /// no description provided #[serde(alias="targetLink")] pub target_link: String, - /// no description provided + /// no description provided #[serde(alias="startTime")] pub start_time: String, - /// no description provided + /// no description provided #[serde(alias="clientOperationId")] pub client_operation_id: String, - /// no description provided + /// no description provided #[serde(alias="creationTimestamp")] pub creation_timestamp: String, - /// no description provided + /// no description provided pub id: String, - /// [Output Only] Type of the resource. Always kind#operation for Operation resources. + /// [Output Only] Type of the resource. Always kind#operation for Operation resources. pub kind: String, - /// no description provided + /// no description provided pub name: String, - /// no description provided + /// no description provided pub zone: String, - /// no description provided + /// no description provided pub region: String, - /// no description provided + /// no description provided #[serde(alias="selfLink")] pub self_link: String, - /// no description provided + /// no description provided #[serde(alias="operationType")] pub operation_type: String, - /// no description provided + /// no description provided #[serde(alias="httpErrorMessage")] pub http_error_message: String, - /// no description provided + /// no description provided pub progress: i32, - /// no description provided + /// no description provided #[serde(alias="endTime")] pub end_time: String, - /// no description provided + /// no description provided #[serde(alias="httpErrorStatusCode")] pub http_error_status_code: i32, - /// no description provided + /// no description provided #[serde(alias="statusMessage")] pub status_message: String, - /// no description provided + /// no description provided pub user: String, } @@ -698,16 +707,16 @@ impl ResponseResult for Operation {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ZoneList { - /// no description provided + /// no description provided #[serde(alias="nextPageToken")] pub next_page_token: String, - /// no description provided + /// no description provided pub items: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, - /// no description provided + /// no description provided pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -731,24 +740,24 @@ impl ResponseResult for ZoneList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Autoscaler { - /// Type of resource. + /// Type of resource. pub kind: Option, - /// An optional textual description of the resource provided by the client. + /// An optional textual description of the resource provided by the client. pub description: Option, - /// Name of the Autoscaler resource. Must be unique per project and zone. + /// Name of the Autoscaler resource. Must be unique per project and zone. pub name: Option, - /// Configuration parameters for autoscaling algorithm. + /// Configuration parameters for autoscaling algorithm. #[serde(alias="autoscalingPolicy")] pub autoscaling_policy: Option, - /// [Output Only] Creation timestamp in RFC3339 text format. + /// [Output Only] Creation timestamp in RFC3339 text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: Option, - /// [Output Only] A self-link to the Autoscaler configuration resource. + /// [Output Only] A self-link to the Autoscaler configuration resource. #[serde(alias="selfLink")] pub self_link: Option, - /// URL to the entity which will be autoscaled. Currently the only supported value is ReplicaPool?s URL. Note: it is illegal to specify multiple Autoscalers for the same target. + /// URL to the entity which will be autoscaled. Currently the only supported value is ReplicaPool?s URL. Note: it is illegal to specify multiple Autoscalers for the same target. pub target: Option, } @@ -796,13 +805,17 @@ pub struct ZoneMethods<'a, C, NC, A> hub: &'a AutoscalerHub, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ZoneMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ZoneMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ZoneMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// + /// + /// + /// # Arguments + /// + /// * `project` - No description provided. pub fn list(&self, project: &str) -> ZoneListCall<'a, C, NC, A> { ZoneListCall { hub: self.hub, @@ -853,13 +866,18 @@ pub struct ZoneOperationMethods<'a, C, NC, A> hub: &'a AutoscalerHub, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ZoneOperationMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ZoneOperationMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ZoneOperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of operation resources contained within the specified zone. + /// Retrieves the list of operation resources contained within the specified zone. + /// + /// # Arguments + /// + /// * `project` - No description provided. + /// * `zone` - No description provided. pub fn list(&self, project: &str, zone: &str) -> ZoneOperationListCall<'a, C, NC, A> { ZoneOperationListCall { hub: self.hub, @@ -876,7 +894,13 @@ impl<'a, C, NC, A> ZoneOperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified zone-specific operation resource. + /// Deletes the specified zone-specific operation resource. + /// + /// # Arguments + /// + /// * `project` - No description provided. + /// * `zone` - No description provided. + /// * `operation` - No description provided. pub fn delete(&self, project: &str, zone: &str, operation: &str) -> ZoneOperationDeleteCall<'a, C, NC, A> { ZoneOperationDeleteCall { hub: self.hub, @@ -891,7 +915,13 @@ impl<'a, C, NC, A> ZoneOperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the specified zone-specific operation resource. + /// Retrieves the specified zone-specific operation resource. + /// + /// # Arguments + /// + /// * `project` - No description provided. + /// * `zone` - No description provided. + /// * `operation` - No description provided. pub fn get(&self, project: &str, zone: &str, operation: &str) -> ZoneOperationGetCall<'a, C, NC, A> { ZoneOperationGetCall { hub: self.hub, @@ -941,13 +971,18 @@ pub struct AutoscalerMethods<'a, C, NC, A> hub: &'a AutoscalerHub, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AutoscalerMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AutoscalerMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AutoscalerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all Autoscaler resources in this zone. + /// Lists all Autoscaler resources in this zone. + /// + /// # Arguments + /// + /// * `project` - Project ID of Autoscaler resource. + /// * `zone` - Zone name of Autoscaler resource. pub fn list(&self, project: &str, zone: &str) -> AutoscalerListCall<'a, C, NC, A> { AutoscalerListCall { hub: self.hub, @@ -964,7 +999,14 @@ impl<'a, C, NC, A> AutoscalerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update the entire content of the Autoscaler resource. + /// Update the entire content of the Autoscaler resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID of Autoscaler resource. + /// * `zone` - Zone name of Autoscaler resource. + /// * `autoscaler` - Name of the Autoscaler resource. pub fn update(&self, request: &Autoscaler, project: &str, zone: &str, autoscaler: &str) -> AutoscalerUpdateCall<'a, C, NC, A> { AutoscalerUpdateCall { hub: self.hub, @@ -980,7 +1022,14 @@ impl<'a, C, NC, A> AutoscalerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update the entire content of the Autoscaler resource. This method supports patch semantics. + /// Update the entire content of the Autoscaler resource. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID of Autoscaler resource. + /// * `zone` - Zone name of Autoscaler resource. + /// * `autoscaler` - Name of the Autoscaler resource. pub fn patch(&self, request: &Autoscaler, project: &str, zone: &str, autoscaler: &str) -> AutoscalerPatchCall<'a, C, NC, A> { AutoscalerPatchCall { hub: self.hub, @@ -996,7 +1045,13 @@ impl<'a, C, NC, A> AutoscalerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified Autoscaler resource. + /// Deletes the specified Autoscaler resource. + /// + /// # Arguments + /// + /// * `project` - Project ID of Autoscaler resource. + /// * `zone` - Zone name of Autoscaler resource. + /// * `autoscaler` - Name of the Autoscaler resource. pub fn delete(&self, project: &str, zone: &str, autoscaler: &str) -> AutoscalerDeleteCall<'a, C, NC, A> { AutoscalerDeleteCall { hub: self.hub, @@ -1011,7 +1066,13 @@ impl<'a, C, NC, A> AutoscalerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Adds new Autoscaler resource. + /// Adds new Autoscaler resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID of Autoscaler resource. + /// * `zone` - Zone name of Autoscaler resource. pub fn insert(&self, request: &Autoscaler, project: &str, zone: &str) -> AutoscalerInsertCall<'a, C, NC, A> { AutoscalerInsertCall { hub: self.hub, @@ -1026,7 +1087,13 @@ impl<'a, C, NC, A> AutoscalerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the specified Autoscaler resource. + /// Gets the specified Autoscaler resource. + /// + /// # Arguments + /// + /// * `project` - Project ID of Autoscaler resource. + /// * `zone` - Zone name of Autoscaler resource. + /// * `autoscaler` - Name of the Autoscaler resource. pub fn get(&self, project: &str, zone: &str, autoscaler: &str) -> AutoscalerGetCall<'a, C, NC, A> { AutoscalerGetCall { hub: self.hub, @@ -1051,7 +1118,7 @@ impl<'a, C, NC, A> AutoscalerMethods<'a, C, NC, A> { /// /// /// A builder for the *list* method supported by a *zone* resource. -/// It is not used directly, but through a `ZoneMethods`. +/// It is not used directly, but through a `ZoneMethods` instance. /// /// # Example /// @@ -1124,7 +1191,7 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1177,7 +1244,7 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1189,7 +1256,6 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -1199,7 +1265,7 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1210,7 +1276,7 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1219,13 +1285,13 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1318,7 +1384,7 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Retrieves the list of operation resources contained within the specified zone. /// /// A builder for the *list* method supported by a *zoneOperation* resource. -/// It is not used directly, but through a `ZoneOperationMethods`. +/// It is not used directly, but through a `ZoneOperationMethods` instance. /// /// # Example /// @@ -1393,7 +1459,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "project", "zone", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1446,7 +1512,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1458,7 +1524,6 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -1468,7 +1533,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1479,7 +1544,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1488,13 +1553,13 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1596,7 +1661,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net /// Deletes the specified zone-specific operation resource. /// /// A builder for the *delete* method supported by a *zoneOperation* resource. -/// It is not used directly, but through a `ZoneOperationMethods`. +/// It is not used directly, but through a `ZoneOperationMethods` instance. /// /// # Example /// @@ -1658,7 +1723,7 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["project", "zone", "operation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1710,7 +1775,7 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1722,7 +1787,6 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -1732,7 +1796,7 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1743,12 +1807,12 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1838,7 +1902,7 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// Retrieves the specified zone-specific operation resource. /// /// A builder for the *get* method supported by a *zoneOperation* resource. -/// It is not used directly, but through a `ZoneOperationMethods`. +/// It is not used directly, but through a `ZoneOperationMethods` instance. /// /// # Example /// @@ -1900,7 +1964,7 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "project", "zone", "operation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1953,7 +2017,7 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1965,7 +2029,6 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -1975,7 +2038,7 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1986,7 +2049,7 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1995,13 +2058,13 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2091,7 +2154,7 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Lists all Autoscaler resources in this zone. /// /// A builder for the *list* method supported by a *autoscaler* resource. -/// It is not used directly, but through a `AutoscalerMethods`. +/// It is not used directly, but through a `AutoscalerMethods` instance. /// /// # Example /// @@ -2166,7 +2229,7 @@ impl<'a, C, NC, A> AutoscalerListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "zone", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2219,7 +2282,7 @@ impl<'a, C, NC, A> AutoscalerListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2231,7 +2294,6 @@ impl<'a, C, NC, A> AutoscalerListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -2241,7 +2303,7 @@ impl<'a, C, NC, A> AutoscalerListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2252,7 +2314,7 @@ impl<'a, C, NC, A> AutoscalerListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2261,13 +2323,13 @@ impl<'a, C, NC, A> AutoscalerListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2279,7 +2341,7 @@ impl<'a, C, NC, A> AutoscalerListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of Autoscaler resource. + /// Project ID of Autoscaler resource. pub fn project(mut self, new_value: &str) -> AutoscalerListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -2289,7 +2351,7 @@ impl<'a, C, NC, A> AutoscalerListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Zone name of Autoscaler resource. + /// Zone name of Autoscaler resource. pub fn zone(mut self, new_value: &str) -> AutoscalerListCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -2371,7 +2433,7 @@ impl<'a, C, NC, A> AutoscalerListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Update the entire content of the Autoscaler resource. /// /// A builder for the *update* method supported by a *autoscaler* resource. -/// It is not used directly, but through a `AutoscalerMethods`. +/// It is not used directly, but through a `AutoscalerMethods` instance. /// /// # Example /// @@ -2440,7 +2502,7 @@ impl<'a, C, NC, A> AutoscalerUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "project", "zone", "autoscaler"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2497,7 +2559,7 @@ impl<'a, C, NC, A> AutoscalerUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2513,7 +2575,6 @@ impl<'a, C, NC, A> AutoscalerUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -2523,7 +2584,7 @@ impl<'a, C, NC, A> AutoscalerUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2534,7 +2595,7 @@ impl<'a, C, NC, A> AutoscalerUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2543,13 +2604,13 @@ impl<'a, C, NC, A> AutoscalerUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2570,7 +2631,7 @@ impl<'a, C, NC, A> AutoscalerUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of Autoscaler resource. + /// Project ID of Autoscaler resource. pub fn project(mut self, new_value: &str) -> AutoscalerUpdateCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -2580,7 +2641,7 @@ impl<'a, C, NC, A> AutoscalerUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Zone name of Autoscaler resource. + /// Zone name of Autoscaler resource. pub fn zone(mut self, new_value: &str) -> AutoscalerUpdateCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -2590,7 +2651,7 @@ impl<'a, C, NC, A> AutoscalerUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the Autoscaler resource. + /// Name of the Autoscaler resource. pub fn autoscaler(mut self, new_value: &str) -> AutoscalerUpdateCall<'a, C, NC, A> { self._autoscaler = new_value.to_string(); self @@ -2651,7 +2712,7 @@ impl<'a, C, NC, A> AutoscalerUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Update the entire content of the Autoscaler resource. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *autoscaler* resource. -/// It is not used directly, but through a `AutoscalerMethods`. +/// It is not used directly, but through a `AutoscalerMethods` instance. /// /// # Example /// @@ -2720,7 +2781,7 @@ impl<'a, C, NC, A> AutoscalerPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "project", "zone", "autoscaler"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2777,7 +2838,7 @@ impl<'a, C, NC, A> AutoscalerPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2793,7 +2854,6 @@ impl<'a, C, NC, A> AutoscalerPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -2803,7 +2863,7 @@ impl<'a, C, NC, A> AutoscalerPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2814,7 +2874,7 @@ impl<'a, C, NC, A> AutoscalerPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2823,13 +2883,13 @@ impl<'a, C, NC, A> AutoscalerPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2850,7 +2910,7 @@ impl<'a, C, NC, A> AutoscalerPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of Autoscaler resource. + /// Project ID of Autoscaler resource. pub fn project(mut self, new_value: &str) -> AutoscalerPatchCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -2860,7 +2920,7 @@ impl<'a, C, NC, A> AutoscalerPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Zone name of Autoscaler resource. + /// Zone name of Autoscaler resource. pub fn zone(mut self, new_value: &str) -> AutoscalerPatchCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -2870,7 +2930,7 @@ impl<'a, C, NC, A> AutoscalerPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the Autoscaler resource. + /// Name of the Autoscaler resource. pub fn autoscaler(mut self, new_value: &str) -> AutoscalerPatchCall<'a, C, NC, A> { self._autoscaler = new_value.to_string(); self @@ -2931,7 +2991,7 @@ impl<'a, C, NC, A> AutoscalerPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Deletes the specified Autoscaler resource. /// /// A builder for the *delete* method supported by a *autoscaler* resource. -/// It is not used directly, but through a `AutoscalerMethods`. +/// It is not used directly, but through a `AutoscalerMethods` instance. /// /// # Example /// @@ -2993,7 +3053,7 @@ impl<'a, C, NC, A> AutoscalerDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "project", "zone", "autoscaler"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3046,7 +3106,7 @@ impl<'a, C, NC, A> AutoscalerDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3058,7 +3118,6 @@ impl<'a, C, NC, A> AutoscalerDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -3068,7 +3127,7 @@ impl<'a, C, NC, A> AutoscalerDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3079,7 +3138,7 @@ impl<'a, C, NC, A> AutoscalerDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3088,13 +3147,13 @@ impl<'a, C, NC, A> AutoscalerDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3106,7 +3165,7 @@ impl<'a, C, NC, A> AutoscalerDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of Autoscaler resource. + /// Project ID of Autoscaler resource. pub fn project(mut self, new_value: &str) -> AutoscalerDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -3116,7 +3175,7 @@ impl<'a, C, NC, A> AutoscalerDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Zone name of Autoscaler resource. + /// Zone name of Autoscaler resource. pub fn zone(mut self, new_value: &str) -> AutoscalerDeleteCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -3126,7 +3185,7 @@ impl<'a, C, NC, A> AutoscalerDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the Autoscaler resource. + /// Name of the Autoscaler resource. pub fn autoscaler(mut self, new_value: &str) -> AutoscalerDeleteCall<'a, C, NC, A> { self._autoscaler = new_value.to_string(); self @@ -3187,7 +3246,7 @@ impl<'a, C, NC, A> AutoscalerDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Adds new Autoscaler resource. /// /// A builder for the *insert* method supported by a *autoscaler* resource. -/// It is not used directly, but through a `AutoscalerMethods`. +/// It is not used directly, but through a `AutoscalerMethods` instance. /// /// # Example /// @@ -3254,7 +3313,7 @@ impl<'a, C, NC, A> AutoscalerInsertCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "project", "zone"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3311,7 +3370,7 @@ impl<'a, C, NC, A> AutoscalerInsertCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3327,7 +3386,6 @@ impl<'a, C, NC, A> AutoscalerInsertCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -3337,7 +3395,7 @@ impl<'a, C, NC, A> AutoscalerInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3348,7 +3406,7 @@ impl<'a, C, NC, A> AutoscalerInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3357,13 +3415,13 @@ impl<'a, C, NC, A> AutoscalerInsertCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3384,7 +3442,7 @@ impl<'a, C, NC, A> AutoscalerInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of Autoscaler resource. + /// Project ID of Autoscaler resource. pub fn project(mut self, new_value: &str) -> AutoscalerInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -3394,7 +3452,7 @@ impl<'a, C, NC, A> AutoscalerInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Zone name of Autoscaler resource. + /// Zone name of Autoscaler resource. pub fn zone(mut self, new_value: &str) -> AutoscalerInsertCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -3455,7 +3513,7 @@ impl<'a, C, NC, A> AutoscalerInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Gets the specified Autoscaler resource. /// /// A builder for the *get* method supported by a *autoscaler* resource. -/// It is not used directly, but through a `AutoscalerMethods`. +/// It is not used directly, but through a `AutoscalerMethods` instance. /// /// # Example /// @@ -3517,7 +3575,7 @@ impl<'a, C, NC, A> AutoscalerGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "project", "zone", "autoscaler"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3570,7 +3628,7 @@ impl<'a, C, NC, A> AutoscalerGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3582,7 +3640,6 @@ impl<'a, C, NC, A> AutoscalerGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -3592,7 +3649,7 @@ impl<'a, C, NC, A> AutoscalerGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3603,7 +3660,7 @@ impl<'a, C, NC, A> AutoscalerGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3612,13 +3669,13 @@ impl<'a, C, NC, A> AutoscalerGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3630,7 +3687,7 @@ impl<'a, C, NC, A> AutoscalerGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of Autoscaler resource. + /// Project ID of Autoscaler resource. pub fn project(mut self, new_value: &str) -> AutoscalerGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -3640,7 +3697,7 @@ impl<'a, C, NC, A> AutoscalerGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Zone name of Autoscaler resource. + /// Zone name of Autoscaler resource. pub fn zone(mut self, new_value: &str) -> AutoscalerGetCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -3650,7 +3707,7 @@ impl<'a, C, NC, A> AutoscalerGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the Autoscaler resource. + /// Name of the Autoscaler resource. pub fn autoscaler(mut self, new_value: &str) -> AutoscalerGetCall<'a, C, NC, A> { self._autoscaler = new_value.to_string(); self diff --git a/gen/bigquery2/Cargo.toml b/gen/bigquery2/Cargo.toml index c6fd143ad2..4c1da8bf5d 100644 --- a/gen/bigquery2/Cargo.toml +++ b/gen/bigquery2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-bigquery2" -version = "0.1.1+20141112" +version = "0.1.2+20150303" authors = ["Sebastian Thiel "] description = "A complete library to interact with bigquery (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/bigquery2" @@ -16,7 +16,7 @@ keywords = ["bigquery", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/bigquery2/README.md b/gen/bigquery2/README.md index 5cd3a1d598..159fd47a2d 100644 --- a/gen/bigquery2/README.md +++ b/gen/bigquery2/README.md @@ -1,11 +1,11 @@ The `google-bigquery2` library allows access to all features of the *Google bigquery* service. -This documentation was generated from *bigquery* crate version *0.1.1+20141112*, where *20141112* is the exact revision of the *bigquery:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *bigquery* crate version *0.1.2+20150303*, where *20150303* is the exact revision of the *bigquery:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *bigquery* *v2* API can be found at the [official documentation site](https://developers.google.com/bigquery/docs/overview). @@ -37,6 +37,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-bigquery2/struct.Bigquery.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-bigquery2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-bigquery2/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-bigquery2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -46,6 +48,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-bigquery2/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -86,7 +90,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-bigquery2" as bigquery2; use bigquery2::Table; -use bigquery2::Result; +use bigquery2::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use bigquery2::Bigquery; @@ -115,15 +119,17 @@ let result = hub.tables().update(&req, "projectId", "datasetId", "tableId") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -136,7 +142,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-bigquery2/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-bigquery2/trait.ResponseResult.html), it will return that by default. @@ -159,8 +165,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-bigquery2/trai ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-bigquery2/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-bigquery2/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-bigquery2/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-bigquery2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-bigquery2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/bigquery2/src/cmn.rs b/gen/bigquery2/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/bigquery2/src/cmn.rs +++ b/gen/bigquery2/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/bigquery2/src/lib.rs b/gen/bigquery2/src/lib.rs index 842d38baab..bd5c8e9ce7 100644 --- a/gen/bigquery2/src/lib.rs +++ b/gen/bigquery2/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *bigquery* crate version *0.1.1+20141112*, where *20141112* is the exact revision of the *bigquery:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *bigquery* crate version *0.1.2+20150303*, where *20150303* is the exact revision of the *bigquery:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *bigquery* *v2* API can be found at the //! [official documentation site](https://developers.google.com/bigquery/docs/overview). @@ -37,6 +37,8 @@ //! //! * **[Hub](struct.Bigquery.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -46,6 +48,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -86,7 +90,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-bigquery2" as bigquery2; //! use bigquery2::Table; -//! use bigquery2::Result; +//! use bigquery2::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -116,15 +120,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -137,7 +143,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -160,8 +166,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -210,7 +217,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -277,7 +284,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-bigquery2" as bigquery2; /// use bigquery2::Table; -/// use bigquery2::Result; +/// use bigquery2::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -307,15 +314,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -336,7 +345,7 @@ impl<'a, C, NC, A> Bigquery Bigquery { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -358,7 +367,7 @@ impl<'a, C, NC, A> Bigquery } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -378,10 +387,10 @@ impl<'a, C, NC, A> Bigquery /// #[derive(Default, Clone, Debug, Serialize)] pub struct TableDataInsertAllRequestRows { - /// [Optional] A unique ID for each row. BigQuery uses this property to detect duplicate insertion requests on a best-effort basis. + /// [Optional] A unique ID for each row. BigQuery uses this property to detect duplicate insertion requests on a best-effort basis. #[serde(alias="insertId")] pub insert_id: String, - /// [Required] A JSON object that contains a row of data. The object's properties and values must match the destination table's schema. + /// [Required] A JSON object that contains a row of data. The object's properties and values must match the destination table's schema. pub json: JsonObject, } @@ -395,7 +404,7 @@ impl Part for TableDataInsertAllRequestRows {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobStatistics4 { - /// [Experimental] Number of files per destination URI or URI pattern specified in the extract configuration. These values will be in the same order as the URIs specified in the 'destinationUris' field. + /// [Experimental] Number of files per destination URI or URI pattern specified in the extract configuration. These values will be in the same order as the URIs specified in the 'destinationUris' field. #[serde(alias="destinationUriFileCounts")] pub destination_uri_file_counts: Vec, } @@ -414,26 +423,26 @@ impl Part for JobStatistics4 {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct QueryRequest { - /// [Optional] How long to wait for the query to complete, in milliseconds, before the request times out and returns. Note that this is only a timeout for the request, not the query. If the query takes longer to run than the timeout value, the call returns without any results and with the 'jobComplete' flag set to false. You can call GetQueryResults() to wait for the query to complete and read the results. The default value is 10000 milliseconds (10 seconds). + /// [Optional] How long to wait for the query to complete, in milliseconds, before the request times out and returns. Note that this is only a timeout for the request, not the query. If the query takes longer to run than the timeout value, the call returns without any results and with the 'jobComplete' flag set to false. You can call GetQueryResults() to wait for the query to complete and read the results. The default value is 10000 milliseconds (10 seconds). #[serde(alias="timeoutMs")] pub timeout_ms: Option, - /// The resource type of the request. + /// The resource type of the request. pub kind: Option, - /// [Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. + /// [Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. #[serde(alias="dryRun")] pub dry_run: Option, - /// [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. The default value is true. + /// [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. The default value is true. #[serde(alias="useQueryCache")] pub use_query_cache: Option, - /// [Optional] Specifies the default datasetId and projectId to assume for any unqualified table names in the query. If not set, all table names in the query string must be qualified in the format 'datasetId.tableId'. + /// [Optional] Specifies the default datasetId and projectId to assume for any unqualified table names in the query. If not set, all table names in the query string must be qualified in the format 'datasetId.tableId'. #[serde(alias="defaultDataset")] pub default_dataset: Option, - /// [Optional] The maximum number of rows of data to return per page of results. Setting this flag to a small value such as 1000 and then paging through results might improve reliability when the query result set is large. In addition to this limit, responses are also limited to 10 MB. By default, there is no maximum row count, and only the byte limit applies. + /// [Optional] The maximum number of rows of data to return per page of results. Setting this flag to a small value such as 1000 and then paging through results might improve reliability when the query result set is large. In addition to this limit, responses are also limited to 10 MB. By default, there is no maximum row count, and only the byte limit applies. #[serde(alias="maxResults")] pub max_results: Option, - /// [Required] A query string, following the BigQuery query syntax, of the query to execute. Example: "SELECT count(f1) FROM [myProjectId:myDatasetId.myTableId]". + /// [Required] A query string, following the BigQuery query syntax, of the query to execute. Example: "SELECT count(f1) FROM [myProjectId:myDatasetId.myTableId]". pub query: Option, - /// [Deprecated] This property is deprecated. + /// [Deprecated] This property is deprecated. #[serde(alias="preserveNulls")] pub preserve_nulls: Option, } @@ -447,10 +456,10 @@ impl RequestValue for QueryRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobStatistics2 { - /// [Output-only] Whether the query result was fetched from the query cache. + /// [Output-only] Whether the query result was fetched from the query cache. #[serde(alias="cacheHit")] pub cache_hit: bool, - /// [Output-only] Total bytes processed for this job. + /// [Output-only] Total bytes processed for this job. #[serde(alias="totalBytesProcessed")] pub total_bytes_processed: String, } @@ -464,16 +473,16 @@ impl Part for JobStatistics2 {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobStatistics3 { - /// [Output-only] Number of rows imported in a load job. Note that while an import job is in the running state, this value may change. + /// [Output-only] Number of rows imported in a load job. Note that while an import job is in the running state, this value may change. #[serde(alias="outputRows")] pub output_rows: String, - /// [Output-only] Number of source files in a load job. + /// [Output-only] Number of source files in a load job. #[serde(alias="inputFiles")] pub input_files: String, - /// [Output-only] Number of bytes of source data in a joad job. + /// [Output-only] Number of bytes of source data in a joad job. #[serde(alias="inputFileBytes")] pub input_file_bytes: String, - /// [Output-only] Size of the loaded data in bytes. Note that while an import job is in the running state, this value may change. + /// [Output-only] Size of the loaded data in bytes. Note that while an import job is in the running state, this value may change. #[serde(alias="outputBytes")] pub output_bytes: String, } @@ -502,17 +511,17 @@ impl Part for JsonObject {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ProjectList { - /// A token to request the next page of results. + /// A token to request the next page of results. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The total number of projects in the list. + /// The total number of projects in the list. #[serde(alias="totalItems")] pub total_items: i32, - /// The type of list. + /// The type of list. pub kind: String, - /// A hash of the page of results + /// A hash of the page of results pub etag: String, - /// Projects to which you have at least READ access. + /// Projects to which you have at least READ access. pub projects: Vec, } @@ -525,16 +534,16 @@ impl ResponseResult for ProjectList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TableFieldSchema { - /// [Optional] Describes the nested schema fields if the type property is set to RECORD. + /// [Optional] Describes the nested schema fields if the type property is set to RECORD. pub fields: Vec, - /// [Optional] The field description. The maximum length is 16K characters. + /// [Optional] The field description. The maximum length is 16K characters. pub description: String, - /// [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema). + /// [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema). #[serde(alias="type")] pub type_: String, - /// [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. + /// [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE. pub mode: String, - /// [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. + /// [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters. pub name: String, } @@ -557,29 +566,29 @@ impl Part for TableFieldSchema {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Dataset { - /// [Output-only] The resource type. + /// [Output-only] The resource type. pub kind: Option, - /// [Optional] A user-friendly description of the dataset. + /// [Optional] A user-friendly description of the dataset. pub description: Option, - /// [Required] A reference that identifies the dataset. + /// [Required] A reference that identifies the dataset. #[serde(alias="datasetReference")] pub dataset_reference: Option, - /// [Output-only] The time when this dataset was created, in milliseconds since the epoch. + /// [Output-only] The time when this dataset was created, in milliseconds since the epoch. #[serde(alias="creationTime")] pub creation_time: Option, - /// [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER; + /// [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER; pub access: Option>, - /// [Output-only] A hash of the resource. + /// [Output-only] A hash of the resource. pub etag: Option, - /// [Optional] A descriptive name for the dataset. + /// [Optional] A descriptive name for the dataset. #[serde(alias="friendlyName")] pub friendly_name: Option, - /// [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch. + /// [Output-only] The date when this dataset or any of its tables was last modified, in milliseconds since the epoch. #[serde(alias="lastModifiedTime")] pub last_modified_time: Option, - /// [Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field. + /// [Output-only] The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field. When creating a new dataset, leave this field blank, and instead specify the datasetId field. pub id: Option, - /// [Output-only] A URL that can be used to access the resource again. You can use this URL in Get or Update requests to the resource. + /// [Output-only] A URL that can be used to access the resource again. You can use this URL in Get or Update requests to the resource. #[serde(alias="selfLink")] pub self_link: Option, } @@ -595,9 +604,9 @@ impl ResponseResult for Dataset {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TableDataInsertAllResponseInsertErrors { - /// The index of the row that error applies to. + /// The index of the row that error applies to. pub index: u32, - /// Error information for the row indicated by the index property. + /// Error information for the row indicated by the index property. pub errors: Vec, } @@ -611,7 +620,7 @@ impl Part for TableDataInsertAllResponseInsertErrors {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TableCell { - /// no description provided + /// no description provided pub v: String, } @@ -624,10 +633,10 @@ impl Part for TableCell {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobReference { - /// [Required] The ID of the project containing this job. + /// [Required] The ID of the project containing this job. #[serde(alias="projectId")] pub project_id: String, - /// [Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters. + /// [Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters. #[serde(alias="jobId")] pub job_id: String, } @@ -641,14 +650,14 @@ impl Part for JobReference {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DatasetListDatasets { - /// A descriptive name for the dataset, if one exists. + /// A descriptive name for the dataset, if one exists. #[serde(alias="friendlyName")] pub friendly_name: String, - /// The resource type. This property always returns the value "bigquery#dataset". + /// The resource type. This property always returns the value "bigquery#dataset". pub kind: String, - /// The fully-qualified, unique, opaque ID of the dataset. + /// The fully-qualified, unique, opaque ID of the dataset. pub id: String, - /// The dataset reference. Use this property to access specific parts of the dataset's ID, such as project ID or dataset ID. + /// The dataset reference. Use this property to access specific parts of the dataset's ID, such as project ID or dataset ID. #[serde(alias="datasetReference")] pub dataset_reference: DatasetReference, } @@ -663,17 +672,17 @@ impl Part for DatasetListDatasets {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TableListTables { - /// The user-friendly name for this table. + /// The user-friendly name for this table. #[serde(alias="friendlyName")] pub friendly_name: String, - /// The resource type. + /// The resource type. pub kind: String, - /// The type of table. Possible values are: TABLE, VIEW. + /// The type of table. Possible values are: TABLE, VIEW. #[serde(alias="type")] pub type_: String, - /// An opaque ID of the table + /// An opaque ID of the table pub id: String, - /// A reference uniquely identifying the table. + /// A reference uniquely identifying the table. #[serde(alias="tableReference")] pub table_reference: TableReference, } @@ -693,16 +702,16 @@ impl Part for TableListTables {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TableList { - /// A token to request the next page of results. + /// A token to request the next page of results. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Tables in the requested dataset. + /// Tables in the requested dataset. pub tables: Vec, - /// The type of list. + /// The type of list. pub kind: String, - /// A hash of this page of results. + /// A hash of this page of results. pub etag: String, - /// The total number of tables in the dataset. + /// The total number of tables in the dataset. #[serde(alias="totalItems")] pub total_items: i32, } @@ -716,7 +725,7 @@ impl ResponseResult for TableList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ProjectReference { - /// [Required] ID of the project. Can be either the numeric ID or the assigned ID of the project. + /// [Required] ID of the project. Can be either the numeric ID or the assigned ID of the project. #[serde(alias="projectId")] pub project_id: String, } @@ -735,16 +744,16 @@ impl Part for ProjectReference {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TableDataList { - /// A token used for paging results. Providing this token instead of the startIndex parameter can help you retrieve stable results when an underlying table is changing. + /// A token used for paging results. Providing this token instead of the startIndex parameter can help you retrieve stable results when an underlying table is changing. #[serde(alias="pageToken")] pub page_token: String, - /// The resource type of the response. + /// The resource type of the response. pub kind: String, - /// A hash of this page of results. + /// A hash of this page of results. pub etag: String, - /// Rows of results. + /// Rows of results. pub rows: Vec, - /// The total number of rows in the complete table. + /// The total number of rows in the complete table. #[serde(alias="totalRows")] pub total_rows: String, } @@ -767,25 +776,25 @@ impl ResponseResult for TableDataList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Job { - /// [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete. + /// [Output-only] The status of this job. Examine this value when polling an asynchronous job to see if the job is complete. pub status: Option, - /// [Output-only] The type of the resource. + /// [Output-only] The type of the resource. pub kind: Option, - /// [Output-only] Information about the job, including starting time and ending time of the job. + /// [Output-only] Information about the job, including starting time and ending time of the job. pub statistics: Option, - /// [Optional] Reference describing the unique-per-user name of the job. + /// [Optional] Reference describing the unique-per-user name of the job. #[serde(alias="jobReference")] pub job_reference: Option, - /// [Output-only] A hash of this resource. + /// [Output-only] A hash of this resource. pub etag: Option, - /// [Output-only] A URL that can be used to access this resource again. + /// [Output-only] A URL that can be used to access this resource again. #[serde(alias="selfLink")] pub self_link: Option, - /// [Required] Describes the job configuration. + /// [Required] Describes the job configuration. pub configuration: Option, - /// [Output-only] Opaque ID field of the job + /// [Output-only] Opaque ID field of the job pub id: Option, - /// [Output-only] Email address of the user who ran the job. + /// [Output-only] Email address of the user who ran the job. pub user_email: Option, } @@ -800,25 +809,25 @@ impl ResponseResult for Job {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct JobListJobs { - /// [Full-projection-only] Describes the state of the job. + /// [Full-projection-only] Describes the state of the job. pub status: JobStatus, - /// The resource type. + /// The resource type. pub kind: String, - /// [Output-only] Information about the job, including starting time and ending time of the job. + /// [Output-only] Information about the job, including starting time and ending time of the job. pub statistics: JobStatistics, - /// Job reference uniquely identifying the job. + /// Job reference uniquely identifying the job. #[serde(alias="jobReference")] pub job_reference: JobReference, - /// Running state of the job. When the state is DONE, errorResult can be checked to determine whether the job succeeded or failed. + /// Running state of the job. When the state is DONE, errorResult can be checked to determine whether the job succeeded or failed. pub state: String, - /// A result object that will be present only if the job has failed. + /// A result object that will be present only if the job has failed. #[serde(alias="errorResult")] pub error_result: ErrorProto, - /// [Full-projection-only] Specifies the job configuration. + /// [Full-projection-only] Specifies the job configuration. pub configuration: JobConfiguration, - /// Unique opaque ID of the job. + /// Unique opaque ID of the job. pub id: String, - /// [Full-projection-only] Email address of the user who ran the job. + /// [Full-projection-only] Email address of the user who ran the job. pub user_email: String, } @@ -832,53 +841,53 @@ impl Part for JobListJobs {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobConfigurationLoad { - /// [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties. + /// [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties. pub encoding: String, - /// [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true. + /// [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true. pub quote: String, - /// [Required] The destination table to load the data into. + /// [Required] The destination table to load the data into. #[serde(alias="destinationTable")] pub destination_table: TableReference, - /// [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Wildcard names are only supported when they appear at the end of the URI. + /// [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Wildcard names are only supported when they appear at the end of the URI. #[serde(alias="sourceUris")] pub source_uris: Vec, - /// Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. + /// Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false. #[serde(alias="allowQuotedNewlines")] pub allow_quoted_newlines: bool, - /// [Experimental] Names(case-sensitive) of properties to keep when importing data. If this is populated, only the specified properties will be imported for each entity. Currently, this is only supported for DATASTORE_BACKUP imports and only top level properties are supported. If any specified property is not found in the Datastore 'Kind' being imported, that is an error. Note: This feature is experimental and can change in the future. + /// [Experimental] Names(case-sensitive) of properties to keep when importing data. If this is populated, only the specified properties will be imported for each entity. Currently, this is only supported for DATASTORE_BACKUP imports and only top level properties are supported. If any specified property is not found in the Datastore 'Kind' being imported, that is an error. Note: This feature is experimental and can change in the future. #[serde(alias="projectionFields")] pub projection_fields: Vec, - /// [Optional] Accept rows that are missing trailing optional columns. The missing values are treated as nulls. Default is false which treats short rows as errors. Only applicable to CSV, ignored for other formats. + /// [Optional] Accept rows that are missing trailing optional columns. The missing values are treated as nulls. Default is false which treats short rows as errors. Only applicable to CSV, ignored for other formats. #[serde(alias="allowJaggedRows")] pub allow_jagged_rows: bool, - /// [Optional] The separator for fields in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (','). + /// [Optional] The separator for fields in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (','). #[serde(alias="fieldDelimiter")] pub field_delimiter: String, - /// [Optional] The format of the data files. For CSV files, specify "CSV". For datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". The default value is CSV. + /// [Optional] The format of the data files. For CSV files, specify "CSV". For datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". The default value is CSV. #[serde(alias="sourceFormat")] pub source_format: String, - /// [Optional] The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an 'invalid' error is returned in the job result and the job fails. The default value is 0, which requires that all records are valid. + /// [Optional] The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an 'invalid' error is returned in the job result and the job fails. The default value is 0, which requires that all records are valid. #[serde(alias="maxBadRecords")] pub max_bad_records: i32, - /// [Optional] Accept rows that contain values that do not match the schema. The unknown values are ignored. Default is false which treats unknown values as errors. For CSV this ignores extra values at the end of a line. For JSON this ignores named values that do not match any column name. + /// [Optional] Accept rows that contain values that do not match the schema. The unknown values are ignored. Default is false which treats unknown values as errors. For CSV this ignores extra values at the end of a line. For JSON this ignores named values that do not match any column name. #[serde(alias="ignoreUnknownValues")] pub ignore_unknown_values: bool, - /// [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion. + /// [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion. #[serde(alias="writeDisposition")] pub write_disposition: String, - /// [Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. + /// [Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped. #[serde(alias="skipLeadingRows")] pub skip_leading_rows: i32, - /// [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. + /// [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. #[serde(alias="createDisposition")] pub create_disposition: String, - /// [Deprecated] The format of the schemaInline property. + /// [Deprecated] The format of the schemaInline property. #[serde(alias="schemaInlineFormat")] pub schema_inline_format: String, - /// [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT". + /// [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT". #[serde(alias="schemaInline")] pub schema_inline: String, - /// [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists or if the schema can be inferred from the loaded data. + /// [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists or if the schema can be inferred from the loaded data. pub schema: TableSchema, } @@ -896,17 +905,17 @@ impl Part for JobConfigurationLoad {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct JobList { - /// A token to request the next page of results. + /// A token to request the next page of results. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Total number of jobs in this collection. + /// Total number of jobs in this collection. #[serde(alias="totalItems")] pub total_items: i32, - /// The resource type of the response. + /// The resource type of the response. pub kind: String, - /// A hash of this page of results. + /// A hash of this page of results. pub etag: String, - /// List of jobs that were requested. + /// List of jobs that were requested. pub jobs: Vec, } @@ -919,24 +928,24 @@ impl ResponseResult for JobList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobConfigurationExtract { - /// [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-qualified Google Cloud Storage URI where the extracted table should be written. + /// [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-qualified Google Cloud Storage URI where the extracted table should be written. #[serde(alias="destinationUri")] pub destination_uri: String, - /// [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with nested or repeated fields cannot be exported as CSV. + /// [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with nested or repeated fields cannot be exported as CSV. #[serde(alias="destinationFormat")] pub destination_format: String, - /// [Optional] The compression type to use for exported files. Possible values include GZIP and NONE. The default value is NONE. + /// [Optional] The compression type to use for exported files. Possible values include GZIP and NONE. The default value is NONE. pub compression: String, - /// [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written. + /// [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written. #[serde(alias="destinationUris")] pub destination_uris: Vec, - /// [Optional] Whether to print out a header row in the results. Default is true. + /// [Optional] Whether to print out a header row in the results. Default is true. #[serde(alias="printHeader")] pub print_header: bool, - /// [Optional] Delimiter to use between fields in the exported data. Default is ',' + /// [Optional] Delimiter to use between fields in the exported data. Default is ',' #[serde(alias="fieldDelimiter")] pub field_delimiter: String, - /// [Required] A reference to the table being exported. + /// [Required] A reference to the table being exported. #[serde(alias="sourceTable")] pub source_table: TableReference, } @@ -955,31 +964,31 @@ impl Part for JobConfigurationExtract {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct GetQueryResultsResponse { - /// The resource type of the response. + /// The resource type of the response. pub kind: String, - /// An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. Present only when the query completes successfully. + /// An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. Present only when the query completes successfully. pub rows: Vec, - /// Reference to the BigQuery Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults). + /// Reference to the BigQuery Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults). #[serde(alias="jobReference")] pub job_reference: JobReference, - /// Whether the query result was fetched from the query cache. + /// Whether the query result was fetched from the query cache. #[serde(alias="cacheHit")] pub cache_hit: bool, - /// Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available. + /// Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available. #[serde(alias="jobComplete")] pub job_complete: bool, - /// The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. Present only when the query completes successfully. + /// The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. Present only when the query completes successfully. #[serde(alias="totalRows")] pub total_rows: String, - /// The total number of bytes processed for this query. + /// The total number of bytes processed for this query. #[serde(alias="totalBytesProcessed")] pub total_bytes_processed: String, - /// A token used for paging results. + /// A token used for paging results. #[serde(alias="pageToken")] pub page_token: String, - /// A hash of this response. + /// A hash of this response. pub etag: String, - /// The schema of the results. Present only when the query completes successfully. + /// The schema of the results. Present only when the query completes successfully. pub schema: TableSchema, } @@ -992,14 +1001,14 @@ impl ResponseResult for GetQueryResultsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ErrorProto { - /// Debugging information. This property is internal to Google and should not be used. + /// Debugging information. This property is internal to Google and should not be used. #[serde(alias="debugInfo")] pub debug_info: String, - /// A human-readable description of the error. + /// A human-readable description of the error. pub message: String, - /// A short error code that summarizes the error. + /// A short error code that summarizes the error. pub reason: String, - /// Specifies where the error occurred, if present. + /// Specifies where the error occurred, if present. pub location: String, } @@ -1012,16 +1021,16 @@ impl Part for ErrorProto {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobConfigurationLink { - /// [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. + /// [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. #[serde(alias="createDisposition")] pub create_disposition: String, - /// [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion. + /// [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion. #[serde(alias="writeDisposition")] pub write_disposition: String, - /// [Required] The destination table of the link job. + /// [Required] The destination table of the link job. #[serde(alias="destinationTable")] pub destination_table: TableReference, - /// [Required] URI of source table to link. + /// [Required] URI of source table to link. #[serde(alias="sourceUri")] pub source_uri: Vec, } @@ -1035,7 +1044,7 @@ impl Part for JobConfigurationLink {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ViewDefinition { - /// [Required] A query that BigQuery executes when the view is referenced. + /// [Required] A query that BigQuery executes when the view is referenced. pub query: String, } @@ -1048,20 +1057,20 @@ impl Part for ViewDefinition {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatasetAccess { - /// [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: "example.com". + /// [Pick one] A domain to grant access to. Any users signed in with the domain specified will be granted the specified access. Example: "example.com". pub domain: String, - /// [Required] Describes the rights granted to the user specified by the other member of the access object. The following string values are supported: READER, WRITER, OWNER. + /// [Required] Describes the rights granted to the user specified by the other member of the access object. The following string values are supported: READER, WRITER, OWNER. pub role: String, - /// [Pick one] An email address of a user to grant access to. For example: fred@example.com. + /// [Pick one] An email address of a user to grant access to. For example: fred@example.com. #[serde(alias="userByEmail")] pub user_by_email: String, - /// [Pick one] A special group to grant access to. Possible values include: projectOwners: Owners of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users. + /// [Pick one] A special group to grant access to. Possible values include: projectOwners: Owners of the enclosing project. projectReaders: Readers of the enclosing project. projectWriters: Writers of the enclosing project. allAuthenticatedUsers: All authenticated BigQuery users. #[serde(alias="specialGroup")] pub special_group: String, - /// [Pick one] An email address of a Google Group to grant access to. + /// [Pick one] An email address of a Google Group to grant access to. #[serde(alias="groupByEmail")] pub group_by_email: String, - /// [Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. + /// [Pick one] A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. pub view: TableReference, } @@ -1075,11 +1084,11 @@ impl Part for DatasetAccess {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobStatus { - /// [Output-only] Running state of the job. + /// [Output-only] Running state of the job. pub state: String, - /// [Output-only] All errors encountered during the running of the job. Errors here do not necessarily mean that the job has completed or was unsuccessful. + /// [Output-only] All errors encountered during the running of the job. Errors here do not necessarily mean that the job has completed or was unsuccessful. pub errors: Vec, - /// [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful. + /// [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful. #[serde(alias="errorResult")] pub error_result: ErrorProto, } @@ -1093,7 +1102,7 @@ impl Part for JobStatus {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TableSchema { - /// Describes the fields in a table. + /// Describes the fields in a table. pub fields: Vec, } @@ -1129,14 +1138,14 @@ impl Part for JsonValue {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct TableDataInsertAllRequest { - /// [Optional] Accept rows that contain values that do not match the schema. The unknown values are ignored. Default is false, which treats unknown values as errors. + /// [Optional] Accept rows that contain values that do not match the schema. The unknown values are ignored. Default is false, which treats unknown values as errors. #[serde(alias="ignoreUnknownValues")] pub ignore_unknown_values: Option, - /// The resource type of the response. + /// The resource type of the response. pub kind: Option, - /// The rows to insert. + /// The rows to insert. pub rows: Option>, - /// [Optional] Insert all valid rows of a request, even if invalid rows exist. The default value is false, which causes the entire request to fail if any invalid rows exist. + /// [Optional] Insert all valid rows of a request, even if invalid rows exist. The default value is false, which causes the entire request to fail if any invalid rows exist. #[serde(alias="skipInvalidRows")] pub skip_invalid_rows: Option, } @@ -1155,14 +1164,14 @@ impl RequestValue for TableDataInsertAllRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DatasetList { - /// A token that can be used to request the next results page. This property is omitted on the final results page. + /// A token that can be used to request the next results page. This property is omitted on the final results page. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The list type. This property always returns the value "bigquery#datasetList". + /// The list type. This property always returns the value "bigquery#datasetList". pub kind: String, - /// An array of the dataset resources in the project. Each resource contains basic information. For full information about a particular dataset resource, use the Datasets: get method. This property is omitted when there are no datasets in the project. + /// An array of the dataset resources in the project. Each resource contains basic information. For full information about a particular dataset resource, use the Datasets: get method. This property is omitted when there are no datasets in the project. pub datasets: Vec, - /// A hash value of the results page. You can use this property to determine if the page has changed since the last request. + /// A hash value of the results page. You can use this property to determine if the page has changed since the last request. pub etag: String, } @@ -1175,22 +1184,22 @@ impl ResponseResult for DatasetList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobStatistics { - /// [Output-only] Statistics for a load job. + /// [Output-only] Statistics for a load job. pub load: JobStatistics3, - /// [Output-only] Statistics for an extract job. + /// [Output-only] Statistics for an extract job. pub extract: JobStatistics4, - /// [Output-only] Start time of this job, in milliseconds since the epoch. This field will be present when the job transitions from the PENDING state to either RUNNING or DONE. + /// [Output-only] Start time of this job, in milliseconds since the epoch. This field will be present when the job transitions from the PENDING state to either RUNNING or DONE. #[serde(alias="startTime")] pub start_time: String, - /// [Output-only] Statistics for a query job. + /// [Output-only] Statistics for a query job. pub query: JobStatistics2, - /// [Output-only] End time of this job, in milliseconds since the epoch. This field will be present whenever a job is in the DONE state. + /// [Output-only] End time of this job, in milliseconds since the epoch. This field will be present whenever a job is in the DONE state. #[serde(alias="endTime")] pub end_time: String, - /// [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs. + /// [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs. #[serde(alias="creationTime")] pub creation_time: String, - /// [Output-only] [Deprecated] Use the bytes processed in the query statistics instead. + /// [Output-only] [Deprecated] Use the bytes processed in the query statistics instead. #[serde(alias="totalBytesProcessed")] pub total_bytes_processed: String, } @@ -1204,32 +1213,32 @@ impl Part for JobStatistics {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobConfigurationQuery { - /// [Experimental] Flattens all nested and repeated fields in the query results. The default value is true. allowLargeResults must be true if this is set to false. + /// [Experimental] Flattens all nested and repeated fields in the query results. The default value is true. allowLargeResults must be true if this is set to false. #[serde(alias="flattenResults")] pub flatten_results: bool, - /// [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. + /// [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. #[serde(alias="useQueryCache")] pub use_query_cache: bool, - /// [Optional] Specifies the default dataset to use for unqualified table names in the query. + /// [Optional] Specifies the default dataset to use for unqualified table names in the query. #[serde(alias="defaultDataset")] pub default_dataset: DatasetReference, - /// [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results. + /// [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results. #[serde(alias="destinationTable")] pub destination_table: TableReference, - /// [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE. + /// [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE. pub priority: String, - /// [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion. + /// [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion. #[serde(alias="writeDisposition")] pub write_disposition: String, - /// If true, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set. + /// If true, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set. #[serde(alias="allowLargeResults")] pub allow_large_results: bool, - /// [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. + /// [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. #[serde(alias="createDisposition")] pub create_disposition: String, - /// [Required] BigQuery SQL query to execute. + /// [Required] BigQuery SQL query to execute. pub query: String, - /// [Deprecated] This property is deprecated. + /// [Deprecated] This property is deprecated. #[serde(alias="preserveNulls")] pub preserve_nulls: bool, } @@ -1243,10 +1252,10 @@ impl Part for JobConfigurationQuery {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatasetReference { - /// [Optional] The ID of the project containing this dataset. + /// [Optional] The ID of the project containing this dataset. #[serde(alias="projectId")] pub project_id: String, - /// [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. + /// [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. #[serde(alias="datasetId")] pub dataset_id: String, } @@ -1260,7 +1269,7 @@ impl Part for DatasetReference {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TableRow { - /// no description provided + /// no description provided pub f: Vec, } @@ -1273,18 +1282,18 @@ impl Part for TableRow {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobConfiguration { - /// [Pick one] Configures a load job. + /// [Pick one] Configures a load job. pub load: JobConfigurationLoad, - /// [Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined. + /// [Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined. #[serde(alias="dryRun")] pub dry_run: bool, - /// [Pick one] Configures a query job. + /// [Pick one] Configures a query job. pub query: JobConfigurationQuery, - /// [Pick one] Configures a link job. + /// [Pick one] Configures a link job. pub link: JobConfigurationLink, - /// [Pick one] Copies a table. + /// [Pick one] Copies a table. pub copy: JobConfigurationTableCopy, - /// [Pick one] Configures an extract job. + /// [Pick one] Configures an extract job. pub extract: JobConfigurationExtract, } @@ -1297,17 +1306,17 @@ impl Part for JobConfiguration {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ProjectListProjects { - /// A descriptive name for this project. + /// A descriptive name for this project. #[serde(alias="friendlyName")] pub friendly_name: String, - /// The resource type. + /// The resource type. pub kind: String, - /// The numeric ID of this project. + /// The numeric ID of this project. #[serde(alias="numericId")] pub numeric_id: String, - /// An opaque ID of this project. + /// An opaque ID of this project. pub id: String, - /// A unique reference to this project. + /// A unique reference to this project. #[serde(alias="projectReference")] pub project_reference: ProjectReference, } @@ -1322,13 +1331,13 @@ impl Part for ProjectListProjects {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TableReference { - /// [Required] The ID of the project containing this table. + /// [Required] The ID of the project containing this table. #[serde(alias="projectId")] pub project_id: String, - /// [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. + /// [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. #[serde(alias="tableId")] pub table_id: String, - /// [Required] The ID of the dataset containing this table. + /// [Required] The ID of the dataset containing this table. #[serde(alias="datasetId")] pub dataset_id: String, } @@ -1352,44 +1361,44 @@ impl Part for TableReference {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Table { - /// [Output-only] The type of the resource. + /// [Output-only] The type of the resource. pub kind: Option, - /// [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed. + /// [Optional] The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed. #[serde(alias="expirationTime")] pub expiration_time: Option, - /// [Optional] A user-friendly description of this table. + /// [Optional] A user-friendly description of this table. pub description: Option, - /// [Output-only] The time when this table was created, in milliseconds since the epoch. + /// [Output-only] The time when this table was created, in milliseconds since the epoch. #[serde(alias="creationTime")] pub creation_time: Option, - /// [Output-only] An opaque ID uniquely identifying the table. + /// [Output-only] An opaque ID uniquely identifying the table. pub id: Option, - /// [Output-only] The number of rows of data in this table. This property is unavailable for tables that are actively receiving streaming inserts. + /// [Output-only] The number of rows of data in this table. This property is unavailable for tables that are actively receiving streaming inserts. #[serde(alias="numRows")] pub num_rows: Option, - /// [Output-only] The size of the table in bytes. This property is unavailable for tables that are actively receiving streaming inserts. + /// [Output-only] The size of the table in bytes. This property is unavailable for tables that are actively receiving streaming inserts. #[serde(alias="numBytes")] pub num_bytes: Option, - /// [Output-only] A hash of this resource. + /// [Output-only] A hash of this resource. pub etag: Option, - /// [Optional] A descriptive name for this table. + /// [Optional] A descriptive name for this table. #[serde(alias="friendlyName")] pub friendly_name: Option, - /// [Output-only] The time when this table was last modified, in milliseconds since the epoch. + /// [Output-only] The time when this table was last modified, in milliseconds since the epoch. #[serde(alias="lastModifiedTime")] pub last_modified_time: Option, - /// [Optional] Describes the schema of this table. + /// [Optional] Describes the schema of this table. pub schema: Option, - /// [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. The default value is TABLE. + /// [Output-only] Describes the table type. The following values are supported: TABLE: A normal BigQuery table. VIEW: A virtual table defined by a SQL query. The default value is TABLE. #[serde(alias="type")] pub type_: Option, - /// [Required] Reference describing the ID of this table. + /// [Required] Reference describing the ID of this table. #[serde(alias="tableReference")] pub table_reference: Option, - /// [Output-only] A URL that can be used to access this resource again. + /// [Output-only] A URL that can be used to access this resource again. #[serde(alias="selfLink")] pub self_link: Option, - /// [Optional] The view definition. + /// [Optional] The view definition. pub view: Option, } @@ -1409,9 +1418,9 @@ impl ResponseResult for Table {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TableDataInsertAllResponse { - /// The resource type of the response. + /// The resource type of the response. pub kind: String, - /// An array of errors for rows that were not inserted. + /// An array of errors for rows that were not inserted. #[serde(alias="insertErrors")] pub insert_errors: Vec, } @@ -1430,29 +1439,29 @@ impl ResponseResult for TableDataInsertAllResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct QueryResponse { - /// The resource type. + /// The resource type. pub kind: String, - /// An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. + /// An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. pub rows: Vec, - /// Reference to the Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults). + /// Reference to the Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults). #[serde(alias="jobReference")] pub job_reference: JobReference, - /// Whether the query result was fetched from the query cache. + /// Whether the query result was fetched from the query cache. #[serde(alias="cacheHit")] pub cache_hit: bool, - /// Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available. + /// Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available. #[serde(alias="jobComplete")] pub job_complete: bool, - /// The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. + /// The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. #[serde(alias="totalRows")] pub total_rows: String, - /// The total number of bytes processed for this query. If this query was a dry run, this is the number of bytes that would be processed if the query were run. + /// The total number of bytes processed for this query. If this query was a dry run, this is the number of bytes that would be processed if the query were run. #[serde(alias="totalBytesProcessed")] pub total_bytes_processed: String, - /// A token used for paging results. + /// A token used for paging results. #[serde(alias="pageToken")] pub page_token: String, - /// The schema of the results. Present only when the query completes successfully. + /// The schema of the results. Present only when the query completes successfully. pub schema: TableSchema, } @@ -1465,19 +1474,19 @@ impl ResponseResult for QueryResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobConfigurationTableCopy { - /// [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. + /// [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. #[serde(alias="createDisposition")] pub create_disposition: String, - /// [Pick one] Source tables to copy. + /// [Pick one] Source tables to copy. #[serde(alias="sourceTables")] pub source_tables: Vec, - /// [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion. + /// [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion. #[serde(alias="writeDisposition")] pub write_disposition: String, - /// [Required] The destination table + /// [Required] The destination table #[serde(alias="destinationTable")] pub destination_table: TableReference, - /// [Pick one] Source table to copy. + /// [Pick one] Source table to copy. #[serde(alias="sourceTable")] pub source_table: TableReference, } @@ -1524,13 +1533,20 @@ pub struct TableMethods<'a, C, NC, A> hub: &'a Bigquery, } -impl<'a, C, NC, A> ResourceMethodsBuilder for TableMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for TableMethods<'a, C, NC, A> {} impl<'a, C, NC, A> TableMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. + /// Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - Project ID of the table to update + /// * `datasetId` - Dataset ID of the table to update + /// * `tableId` - Table ID of the table to update pub fn update(&self, request: &Table, project_id: &str, dataset_id: &str, table_id: &str) -> TableUpdateCall<'a, C, NC, A> { TableUpdateCall { hub: self.hub, @@ -1546,7 +1562,13 @@ impl<'a, C, NC, A> TableMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a new, empty table in the dataset. + /// Creates a new, empty table in the dataset. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - Project ID of the new table + /// * `datasetId` - Dataset ID of the new table pub fn insert(&self, request: &Table, project_id: &str, dataset_id: &str) -> TableInsertCall<'a, C, NC, A> { TableInsertCall { hub: self.hub, @@ -1561,7 +1583,12 @@ impl<'a, C, NC, A> TableMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all tables in the specified dataset. + /// Lists all tables in the specified dataset. + /// + /// # Arguments + /// + /// * `projectId` - Project ID of the tables to list + /// * `datasetId` - Dataset ID of the tables to list pub fn list(&self, project_id: &str, dataset_id: &str) -> TableListCall<'a, C, NC, A> { TableListCall { hub: self.hub, @@ -1577,7 +1604,13 @@ impl<'a, C, NC, A> TableMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted. + /// Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted. + /// + /// # Arguments + /// + /// * `projectId` - Project ID of the table to delete + /// * `datasetId` - Dataset ID of the table to delete + /// * `tableId` - Table ID of the table to delete pub fn delete(&self, project_id: &str, dataset_id: &str, table_id: &str) -> TableDeleteCall<'a, C, NC, A> { TableDeleteCall { hub: self.hub, @@ -1592,7 +1625,13 @@ impl<'a, C, NC, A> TableMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table. + /// Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table. + /// + /// # Arguments + /// + /// * `projectId` - Project ID of the requested table + /// * `datasetId` - Dataset ID of the requested table + /// * `tableId` - Table ID of the requested table pub fn get(&self, project_id: &str, dataset_id: &str, table_id: &str) -> TableGetCall<'a, C, NC, A> { TableGetCall { hub: self.hub, @@ -1607,7 +1646,14 @@ impl<'a, C, NC, A> TableMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports patch semantics. + /// Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - Project ID of the table to update + /// * `datasetId` - Dataset ID of the table to update + /// * `tableId` - Table ID of the table to update pub fn patch(&self, request: &Table, project_id: &str, dataset_id: &str, table_id: &str) -> TablePatchCall<'a, C, NC, A> { TablePatchCall { hub: self.hub, @@ -1658,13 +1704,19 @@ pub struct DatasetMethods<'a, C, NC, A> hub: &'a Bigquery, } -impl<'a, C, NC, A> ResourceMethodsBuilder for DatasetMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for DatasetMethods<'a, C, NC, A> {} impl<'a, C, NC, A> DatasetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports patch semantics. + /// Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - Project ID of the dataset being updated + /// * `datasetId` - Dataset ID of the dataset being updated pub fn patch(&self, request: &Dataset, project_id: &str, dataset_id: &str) -> DatasetPatchCall<'a, C, NC, A> { DatasetPatchCall { hub: self.hub, @@ -1679,7 +1731,12 @@ impl<'a, C, NC, A> DatasetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the dataset specified by datasetID. + /// Returns the dataset specified by datasetID. + /// + /// # Arguments + /// + /// * `projectId` - Project ID of the requested dataset + /// * `datasetId` - Dataset ID of the requested dataset pub fn get(&self, project_id: &str, dataset_id: &str) -> DatasetGetCall<'a, C, NC, A> { DatasetGetCall { hub: self.hub, @@ -1693,7 +1750,11 @@ impl<'a, C, NC, A> DatasetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all the datasets in the specified project to which the caller has read access; however, a project owner can list (but not necessarily get) all datasets in his project. + /// Lists all the datasets in the specified project to which the caller has read access; however, a project owner can list (but not necessarily get) all datasets in his project. + /// + /// # Arguments + /// + /// * `projectId` - Project ID of the datasets to be listed pub fn list(&self, project_id: &str) -> DatasetListCall<'a, C, NC, A> { DatasetListCall { hub: self.hub, @@ -1709,7 +1770,13 @@ impl<'a, C, NC, A> DatasetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. + /// Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - Project ID of the dataset being updated + /// * `datasetId` - Dataset ID of the dataset being updated pub fn update(&self, request: &Dataset, project_id: &str, dataset_id: &str) -> DatasetUpdateCall<'a, C, NC, A> { DatasetUpdateCall { hub: self.hub, @@ -1724,7 +1791,12 @@ impl<'a, C, NC, A> DatasetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name. + /// Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name. + /// + /// # Arguments + /// + /// * `projectId` - Project ID of the dataset being deleted + /// * `datasetId` - Dataset ID of dataset being deleted pub fn delete(&self, project_id: &str, dataset_id: &str) -> DatasetDeleteCall<'a, C, NC, A> { DatasetDeleteCall { hub: self.hub, @@ -1739,7 +1811,12 @@ impl<'a, C, NC, A> DatasetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a new empty dataset. + /// Creates a new empty dataset. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - Project ID of the new dataset pub fn insert(&self, request: &Dataset, project_id: &str) -> DatasetInsertCall<'a, C, NC, A> { DatasetInsertCall { hub: self.hub, @@ -1788,13 +1865,18 @@ pub struct JobMethods<'a, C, NC, A> hub: &'a Bigquery, } -impl<'a, C, NC, A> ResourceMethodsBuilder for JobMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for JobMethods<'a, C, NC, A> {} impl<'a, C, NC, A> JobMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout. + /// Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - Project ID of the project billed for the query pub fn query(&self, request: &QueryRequest, project_id: &str) -> JobQueryCall<'a, C, NC, A> { JobQueryCall { hub: self.hub, @@ -1808,7 +1890,12 @@ impl<'a, C, NC, A> JobMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the results of a query job. + /// Retrieves the results of a query job. + /// + /// # Arguments + /// + /// * `projectId` - Project ID of the query job + /// * `jobId` - Job ID of the query job pub fn get_query_results(&self, project_id: &str, job_id: &str) -> JobGetQueryResultCall<'a, C, NC, A> { JobGetQueryResultCall { hub: self.hub, @@ -1826,7 +1913,11 @@ impl<'a, C, NC, A> JobMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all the Jobs in the specified project that were started by the user. The job list returns in reverse chronological order of when the jobs were created, starting with the most recent job created. + /// Lists all the Jobs in the specified project that were started by the user. The job list returns in reverse chronological order of when the jobs were created, starting with the most recent job created. + /// + /// # Arguments + /// + /// * `projectId` - Project ID of the jobs to list pub fn list(&self, project_id: &str) -> JobListCall<'a, C, NC, A> { JobListCall { hub: self.hub, @@ -1844,7 +1935,12 @@ impl<'a, C, NC, A> JobMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the specified job by ID. + /// Retrieves the specified job by ID. + /// + /// # Arguments + /// + /// * `projectId` - Project ID of the requested job + /// * `jobId` - Job ID of the requested job pub fn get(&self, project_id: &str, job_id: &str) -> JobGetCall<'a, C, NC, A> { JobGetCall { hub: self.hub, @@ -1858,7 +1954,12 @@ impl<'a, C, NC, A> JobMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Starts a new asynchronous job. + /// Starts a new asynchronous job. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - Project ID of the project that will be billed for the job pub fn insert(&self, request: &Job, project_id: &str) -> JobInsertCall<'a, C, NC, A> { JobInsertCall { hub: self.hub, @@ -1907,13 +2008,20 @@ pub struct TabledataMethods<'a, C, NC, A> hub: &'a Bigquery, } -impl<'a, C, NC, A> ResourceMethodsBuilder for TabledataMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for TabledataMethods<'a, C, NC, A> {} impl<'a, C, NC, A> TabledataMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Streams data into BigQuery one record at a time without needing to run a load job. + /// Streams data into BigQuery one record at a time without needing to run a load job. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - Project ID of the destination table. + /// * `datasetId` - Dataset ID of the destination table. + /// * `tableId` - Table ID of the destination table. pub fn insert_all(&self, request: &TableDataInsertAllRequest, project_id: &str, dataset_id: &str, table_id: &str) -> TabledataInsertAllCall<'a, C, NC, A> { TabledataInsertAllCall { hub: self.hub, @@ -1929,7 +2037,13 @@ impl<'a, C, NC, A> TabledataMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves table data from a specified set of rows. + /// Retrieves table data from a specified set of rows. + /// + /// # Arguments + /// + /// * `projectId` - Project ID of the table to read + /// * `datasetId` - Dataset ID of the table to read + /// * `tableId` - Table ID of the table to read pub fn list(&self, project_id: &str, dataset_id: &str, table_id: &str) -> TabledataListCall<'a, C, NC, A> { TabledataListCall { hub: self.hub, @@ -1982,13 +2096,13 @@ pub struct ProjectMethods<'a, C, NC, A> hub: &'a Bigquery, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ProjectMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ProjectMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists the projects to which you have at least read access. + /// Lists the projects to which you have at least read access. pub fn list(&self) -> ProjectListCall<'a, C, NC, A> { ProjectListCall { hub: self.hub, @@ -2012,7 +2126,7 @@ impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. /// /// A builder for the *update* method supported by a *table* resource. -/// It is not used directly, but through a `TableMethods`. +/// It is not used directly, but through a `TableMethods` instance. /// /// # Example /// @@ -2081,7 +2195,7 @@ impl<'a, C, NC, A> TableUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "projectId", "datasetId", "tableId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2138,7 +2252,7 @@ impl<'a, C, NC, A> TableUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2154,7 +2268,6 @@ impl<'a, C, NC, A> TableUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -2164,7 +2277,7 @@ impl<'a, C, NC, A> TableUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2175,7 +2288,7 @@ impl<'a, C, NC, A> TableUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2184,13 +2297,13 @@ impl<'a, C, NC, A> TableUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2211,7 +2324,7 @@ impl<'a, C, NC, A> TableUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the table to update + /// Project ID of the table to update pub fn project_id(mut self, new_value: &str) -> TableUpdateCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -2221,7 +2334,7 @@ impl<'a, C, NC, A> TableUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset ID of the table to update + /// Dataset ID of the table to update pub fn dataset_id(mut self, new_value: &str) -> TableUpdateCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -2231,7 +2344,7 @@ impl<'a, C, NC, A> TableUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Table ID of the table to update + /// Table ID of the table to update pub fn table_id(mut self, new_value: &str) -> TableUpdateCall<'a, C, NC, A> { self._table_id = new_value.to_string(); self @@ -2292,7 +2405,7 @@ impl<'a, C, NC, A> TableUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Creates a new, empty table in the dataset. /// /// A builder for the *insert* method supported by a *table* resource. -/// It is not used directly, but through a `TableMethods`. +/// It is not used directly, but through a `TableMethods` instance. /// /// # Example /// @@ -2359,7 +2472,7 @@ impl<'a, C, NC, A> TableInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "projectId", "datasetId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2416,7 +2529,7 @@ impl<'a, C, NC, A> TableInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2432,7 +2545,6 @@ impl<'a, C, NC, A> TableInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -2442,7 +2554,7 @@ impl<'a, C, NC, A> TableInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2453,7 +2565,7 @@ impl<'a, C, NC, A> TableInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2462,13 +2574,13 @@ impl<'a, C, NC, A> TableInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2489,7 +2601,7 @@ impl<'a, C, NC, A> TableInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the new table + /// Project ID of the new table pub fn project_id(mut self, new_value: &str) -> TableInsertCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -2499,7 +2611,7 @@ impl<'a, C, NC, A> TableInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset ID of the new table + /// Dataset ID of the new table pub fn dataset_id(mut self, new_value: &str) -> TableInsertCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -2560,7 +2672,7 @@ impl<'a, C, NC, A> TableInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Lists all tables in the specified dataset. /// /// A builder for the *list* method supported by a *table* resource. -/// It is not used directly, but through a `TableMethods`. +/// It is not used directly, but through a `TableMethods` instance. /// /// # Example /// @@ -2630,7 +2742,7 @@ impl<'a, C, NC, A> TableListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "projectId", "datasetId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2683,7 +2795,7 @@ impl<'a, C, NC, A> TableListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2695,7 +2807,6 @@ impl<'a, C, NC, A> TableListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -2705,7 +2816,7 @@ impl<'a, C, NC, A> TableListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2716,7 +2827,7 @@ impl<'a, C, NC, A> TableListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2725,13 +2836,13 @@ impl<'a, C, NC, A> TableListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2743,7 +2854,7 @@ impl<'a, C, NC, A> TableListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the tables to list + /// Project ID of the tables to list pub fn project_id(mut self, new_value: &str) -> TableListCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -2753,7 +2864,7 @@ impl<'a, C, NC, A> TableListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset ID of the tables to list + /// Dataset ID of the tables to list pub fn dataset_id(mut self, new_value: &str) -> TableListCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -2761,7 +2872,7 @@ impl<'a, C, NC, A> TableListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *page token* query property to the given value. /// /// - /// Page token, returned by a previous call, to request the next page of results + /// Page token, returned by a previous call, to request the next page of results pub fn page_token(mut self, new_value: &str) -> TableListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2769,7 +2880,7 @@ impl<'a, C, NC, A> TableListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return + /// Maximum number of results to return pub fn max_results(mut self, new_value: u32) -> TableListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2830,7 +2941,7 @@ impl<'a, C, NC, A> TableListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted. /// /// A builder for the *delete* method supported by a *table* resource. -/// It is not used directly, but through a `TableMethods`. +/// It is not used directly, but through a `TableMethods` instance. /// /// # Example /// @@ -2892,7 +3003,7 @@ impl<'a, C, NC, A> TableDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["projectId", "datasetId", "tableId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2944,7 +3055,7 @@ impl<'a, C, NC, A> TableDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2956,7 +3067,6 @@ impl<'a, C, NC, A> TableDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -2966,7 +3076,7 @@ impl<'a, C, NC, A> TableDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2977,12 +3087,12 @@ impl<'a, C, NC, A> TableDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2994,7 +3104,7 @@ impl<'a, C, NC, A> TableDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the table to delete + /// Project ID of the table to delete pub fn project_id(mut self, new_value: &str) -> TableDeleteCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -3004,7 +3114,7 @@ impl<'a, C, NC, A> TableDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset ID of the table to delete + /// Dataset ID of the table to delete pub fn dataset_id(mut self, new_value: &str) -> TableDeleteCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -3014,7 +3124,7 @@ impl<'a, C, NC, A> TableDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Table ID of the table to delete + /// Table ID of the table to delete pub fn table_id(mut self, new_value: &str) -> TableDeleteCall<'a, C, NC, A> { self._table_id = new_value.to_string(); self @@ -3075,7 +3185,7 @@ impl<'a, C, NC, A> TableDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table. /// /// A builder for the *get* method supported by a *table* resource. -/// It is not used directly, but through a `TableMethods`. +/// It is not used directly, but through a `TableMethods` instance. /// /// # Example /// @@ -3137,7 +3247,7 @@ impl<'a, C, NC, A> TableGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "projectId", "datasetId", "tableId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3190,7 +3300,7 @@ impl<'a, C, NC, A> TableGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3202,7 +3312,6 @@ impl<'a, C, NC, A> TableGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -3212,7 +3321,7 @@ impl<'a, C, NC, A> TableGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3223,7 +3332,7 @@ impl<'a, C, NC, A> TableGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3232,13 +3341,13 @@ impl<'a, C, NC, A> TableGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3250,7 +3359,7 @@ impl<'a, C, NC, A> TableGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the requested table + /// Project ID of the requested table pub fn project_id(mut self, new_value: &str) -> TableGetCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -3260,7 +3369,7 @@ impl<'a, C, NC, A> TableGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset ID of the requested table + /// Dataset ID of the requested table pub fn dataset_id(mut self, new_value: &str) -> TableGetCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -3270,7 +3379,7 @@ impl<'a, C, NC, A> TableGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Table ID of the requested table + /// Table ID of the requested table pub fn table_id(mut self, new_value: &str) -> TableGetCall<'a, C, NC, A> { self._table_id = new_value.to_string(); self @@ -3331,7 +3440,7 @@ impl<'a, C, NC, A> TableGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *table* resource. -/// It is not used directly, but through a `TableMethods`. +/// It is not used directly, but through a `TableMethods` instance. /// /// # Example /// @@ -3400,7 +3509,7 @@ impl<'a, C, NC, A> TablePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "projectId", "datasetId", "tableId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3457,7 +3566,7 @@ impl<'a, C, NC, A> TablePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3473,7 +3582,6 @@ impl<'a, C, NC, A> TablePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -3483,7 +3591,7 @@ impl<'a, C, NC, A> TablePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3494,7 +3602,7 @@ impl<'a, C, NC, A> TablePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3503,13 +3611,13 @@ impl<'a, C, NC, A> TablePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3530,7 +3638,7 @@ impl<'a, C, NC, A> TablePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the table to update + /// Project ID of the table to update pub fn project_id(mut self, new_value: &str) -> TablePatchCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -3540,7 +3648,7 @@ impl<'a, C, NC, A> TablePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset ID of the table to update + /// Dataset ID of the table to update pub fn dataset_id(mut self, new_value: &str) -> TablePatchCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -3550,7 +3658,7 @@ impl<'a, C, NC, A> TablePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Table ID of the table to update + /// Table ID of the table to update pub fn table_id(mut self, new_value: &str) -> TablePatchCall<'a, C, NC, A> { self._table_id = new_value.to_string(); self @@ -3611,7 +3719,7 @@ impl<'a, C, NC, A> TablePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *dataset* resource. -/// It is not used directly, but through a `DatasetMethods`. +/// It is not used directly, but through a `DatasetMethods` instance. /// /// # Example /// @@ -3678,7 +3786,7 @@ impl<'a, C, NC, A> DatasetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "projectId", "datasetId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3735,7 +3843,7 @@ impl<'a, C, NC, A> DatasetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3751,7 +3859,6 @@ impl<'a, C, NC, A> DatasetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -3761,7 +3868,7 @@ impl<'a, C, NC, A> DatasetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3772,7 +3879,7 @@ impl<'a, C, NC, A> DatasetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3781,13 +3888,13 @@ impl<'a, C, NC, A> DatasetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3808,7 +3915,7 @@ impl<'a, C, NC, A> DatasetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the dataset being updated + /// Project ID of the dataset being updated pub fn project_id(mut self, new_value: &str) -> DatasetPatchCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -3818,7 +3925,7 @@ impl<'a, C, NC, A> DatasetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset ID of the dataset being updated + /// Dataset ID of the dataset being updated pub fn dataset_id(mut self, new_value: &str) -> DatasetPatchCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -3879,7 +3986,7 @@ impl<'a, C, NC, A> DatasetPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Returns the dataset specified by datasetID. /// /// A builder for the *get* method supported by a *dataset* resource. -/// It is not used directly, but through a `DatasetMethods`. +/// It is not used directly, but through a `DatasetMethods` instance. /// /// # Example /// @@ -3939,7 +4046,7 @@ impl<'a, C, NC, A> DatasetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "projectId", "datasetId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3992,7 +4099,7 @@ impl<'a, C, NC, A> DatasetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4004,7 +4111,6 @@ impl<'a, C, NC, A> DatasetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -4014,7 +4120,7 @@ impl<'a, C, NC, A> DatasetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4025,7 +4131,7 @@ impl<'a, C, NC, A> DatasetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4034,13 +4140,13 @@ impl<'a, C, NC, A> DatasetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4052,7 +4158,7 @@ impl<'a, C, NC, A> DatasetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the requested dataset + /// Project ID of the requested dataset pub fn project_id(mut self, new_value: &str) -> DatasetGetCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -4062,7 +4168,7 @@ impl<'a, C, NC, A> DatasetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset ID of the requested dataset + /// Dataset ID of the requested dataset pub fn dataset_id(mut self, new_value: &str) -> DatasetGetCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -4123,7 +4229,7 @@ impl<'a, C, NC, A> DatasetGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Lists all the datasets in the specified project to which the caller has read access; however, a project owner can list (but not necessarily get) all datasets in his project. /// /// A builder for the *list* method supported by a *dataset* resource. -/// It is not used directly, but through a `DatasetMethods`. +/// It is not used directly, but through a `DatasetMethods` instance. /// /// # Example /// @@ -4196,7 +4302,7 @@ impl<'a, C, NC, A> DatasetListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "projectId", "pageToken", "maxResults", "all"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4249,7 +4355,7 @@ impl<'a, C, NC, A> DatasetListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4261,7 +4367,6 @@ impl<'a, C, NC, A> DatasetListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -4271,7 +4376,7 @@ impl<'a, C, NC, A> DatasetListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4282,7 +4387,7 @@ impl<'a, C, NC, A> DatasetListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4291,13 +4396,13 @@ impl<'a, C, NC, A> DatasetListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4309,7 +4414,7 @@ impl<'a, C, NC, A> DatasetListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the datasets to be listed + /// Project ID of the datasets to be listed pub fn project_id(mut self, new_value: &str) -> DatasetListCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -4317,7 +4422,7 @@ impl<'a, C, NC, A> DatasetListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *page token* query property to the given value. /// /// - /// Page token, returned by a previous call, to request the next page of results + /// Page token, returned by a previous call, to request the next page of results pub fn page_token(mut self, new_value: &str) -> DatasetListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -4325,7 +4430,7 @@ impl<'a, C, NC, A> DatasetListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of results to return + /// The maximum number of results to return pub fn max_results(mut self, new_value: u32) -> DatasetListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -4333,7 +4438,7 @@ impl<'a, C, NC, A> DatasetListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *all* query property to the given value. /// /// - /// Whether to list all datasets, including hidden ones + /// Whether to list all datasets, including hidden ones pub fn all(mut self, new_value: bool) -> DatasetListCall<'a, C, NC, A> { self._all = Some(new_value); self @@ -4394,7 +4499,7 @@ impl<'a, C, NC, A> DatasetListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. /// /// A builder for the *update* method supported by a *dataset* resource. -/// It is not used directly, but through a `DatasetMethods`. +/// It is not used directly, but through a `DatasetMethods` instance. /// /// # Example /// @@ -4461,7 +4566,7 @@ impl<'a, C, NC, A> DatasetUpdateCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "projectId", "datasetId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4518,7 +4623,7 @@ impl<'a, C, NC, A> DatasetUpdateCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4534,7 +4639,6 @@ impl<'a, C, NC, A> DatasetUpdateCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -4544,7 +4648,7 @@ impl<'a, C, NC, A> DatasetUpdateCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4555,7 +4659,7 @@ impl<'a, C, NC, A> DatasetUpdateCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4564,13 +4668,13 @@ impl<'a, C, NC, A> DatasetUpdateCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4591,7 +4695,7 @@ impl<'a, C, NC, A> DatasetUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the dataset being updated + /// Project ID of the dataset being updated pub fn project_id(mut self, new_value: &str) -> DatasetUpdateCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -4601,7 +4705,7 @@ impl<'a, C, NC, A> DatasetUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset ID of the dataset being updated + /// Dataset ID of the dataset being updated pub fn dataset_id(mut self, new_value: &str) -> DatasetUpdateCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -4662,7 +4766,7 @@ impl<'a, C, NC, A> DatasetUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name. /// /// A builder for the *delete* method supported by a *dataset* resource. -/// It is not used directly, but through a `DatasetMethods`. +/// It is not used directly, but through a `DatasetMethods` instance. /// /// # Example /// @@ -4727,7 +4831,7 @@ impl<'a, C, NC, A> DatasetDeleteCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["projectId", "datasetId", "deleteContents"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4779,7 +4883,7 @@ impl<'a, C, NC, A> DatasetDeleteCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4791,7 +4895,6 @@ impl<'a, C, NC, A> DatasetDeleteCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -4801,7 +4904,7 @@ impl<'a, C, NC, A> DatasetDeleteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4812,12 +4915,12 @@ impl<'a, C, NC, A> DatasetDeleteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4829,7 +4932,7 @@ impl<'a, C, NC, A> DatasetDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the dataset being deleted + /// Project ID of the dataset being deleted pub fn project_id(mut self, new_value: &str) -> DatasetDeleteCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -4839,7 +4942,7 @@ impl<'a, C, NC, A> DatasetDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset ID of dataset being deleted + /// Dataset ID of dataset being deleted pub fn dataset_id(mut self, new_value: &str) -> DatasetDeleteCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -4847,7 +4950,7 @@ impl<'a, C, NC, A> DatasetDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *delete contents* query property to the given value. /// /// - /// If True, delete all the tables in the dataset. If False and the dataset contains tables, the request will fail. Default is False + /// If True, delete all the tables in the dataset. If False and the dataset contains tables, the request will fail. Default is False pub fn delete_contents(mut self, new_value: bool) -> DatasetDeleteCall<'a, C, NC, A> { self._delete_contents = Some(new_value); self @@ -4908,7 +5011,7 @@ impl<'a, C, NC, A> DatasetDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Creates a new empty dataset. /// /// A builder for the *insert* method supported by a *dataset* resource. -/// It is not used directly, but through a `DatasetMethods`. +/// It is not used directly, but through a `DatasetMethods` instance. /// /// # Example /// @@ -4973,7 +5076,7 @@ impl<'a, C, NC, A> DatasetInsertCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "projectId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5030,7 +5133,7 @@ impl<'a, C, NC, A> DatasetInsertCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5046,7 +5149,6 @@ impl<'a, C, NC, A> DatasetInsertCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -5056,7 +5158,7 @@ impl<'a, C, NC, A> DatasetInsertCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5067,7 +5169,7 @@ impl<'a, C, NC, A> DatasetInsertCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5076,13 +5178,13 @@ impl<'a, C, NC, A> DatasetInsertCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5103,7 +5205,7 @@ impl<'a, C, NC, A> DatasetInsertCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the new dataset + /// Project ID of the new dataset pub fn project_id(mut self, new_value: &str) -> DatasetInsertCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -5164,7 +5266,7 @@ impl<'a, C, NC, A> DatasetInsertCall<'a, C, NC, A> where NC: hyper::net::Network /// Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout. /// /// A builder for the *query* method supported by a *job* resource. -/// It is not used directly, but through a `JobMethods`. +/// It is not used directly, but through a `JobMethods` instance. /// /// # Example /// @@ -5229,7 +5331,7 @@ impl<'a, C, NC, A> JobQueryCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "projectId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5286,7 +5388,7 @@ impl<'a, C, NC, A> JobQueryCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5302,7 +5404,6 @@ impl<'a, C, NC, A> JobQueryCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -5312,7 +5413,7 @@ impl<'a, C, NC, A> JobQueryCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5323,7 +5424,7 @@ impl<'a, C, NC, A> JobQueryCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5332,13 +5433,13 @@ impl<'a, C, NC, A> JobQueryCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5359,7 +5460,7 @@ impl<'a, C, NC, A> JobQueryCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the project billed for the query + /// Project ID of the project billed for the query pub fn project_id(mut self, new_value: &str) -> JobQueryCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -5420,7 +5521,7 @@ impl<'a, C, NC, A> JobQueryCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Retrieves the results of a query job. /// /// A builder for the *getQueryResults* method supported by a *job* resource. -/// It is not used directly, but through a `JobMethods`. +/// It is not used directly, but through a `JobMethods` instance. /// /// # Example /// @@ -5500,7 +5601,7 @@ impl<'a, C, NC, A> JobGetQueryResultCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "projectId", "jobId", "timeoutMs", "startIndex", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5553,7 +5654,7 @@ impl<'a, C, NC, A> JobGetQueryResultCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5565,7 +5666,6 @@ impl<'a, C, NC, A> JobGetQueryResultCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -5575,7 +5675,7 @@ impl<'a, C, NC, A> JobGetQueryResultCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5586,7 +5686,7 @@ impl<'a, C, NC, A> JobGetQueryResultCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5595,13 +5695,13 @@ impl<'a, C, NC, A> JobGetQueryResultCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5613,7 +5713,7 @@ impl<'a, C, NC, A> JobGetQueryResultCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the query job + /// Project ID of the query job pub fn project_id(mut self, new_value: &str) -> JobGetQueryResultCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -5623,7 +5723,7 @@ impl<'a, C, NC, A> JobGetQueryResultCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Job ID of the query job + /// Job ID of the query job pub fn job_id(mut self, new_value: &str) -> JobGetQueryResultCall<'a, C, NC, A> { self._job_id = new_value.to_string(); self @@ -5631,7 +5731,7 @@ impl<'a, C, NC, A> JobGetQueryResultCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *timeout ms* query property to the given value. /// /// - /// How long to wait for the query to complete, in milliseconds, before returning. Default is to return immediately. If the timeout passes before the job completes, the request will fail with a TIMEOUT error + /// How long to wait for the query to complete, in milliseconds, before returning. Default is to return immediately. If the timeout passes before the job completes, the request will fail with a TIMEOUT error pub fn timeout_ms(mut self, new_value: u32) -> JobGetQueryResultCall<'a, C, NC, A> { self._timeout_ms = Some(new_value); self @@ -5639,7 +5739,7 @@ impl<'a, C, NC, A> JobGetQueryResultCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *start index* query property to the given value. /// /// - /// Zero-based index of the starting row + /// Zero-based index of the starting row pub fn start_index(mut self, new_value: &str) -> JobGetQueryResultCall<'a, C, NC, A> { self._start_index = Some(new_value.to_string()); self @@ -5647,7 +5747,7 @@ impl<'a, C, NC, A> JobGetQueryResultCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *page token* query property to the given value. /// /// - /// Page token, returned by a previous call, to request the next page of results + /// Page token, returned by a previous call, to request the next page of results pub fn page_token(mut self, new_value: &str) -> JobGetQueryResultCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -5655,7 +5755,7 @@ impl<'a, C, NC, A> JobGetQueryResultCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to read + /// Maximum number of results to read pub fn max_results(mut self, new_value: u32) -> JobGetQueryResultCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -5716,7 +5816,7 @@ impl<'a, C, NC, A> JobGetQueryResultCall<'a, C, NC, A> where NC: hyper::net::Net /// Lists all the Jobs in the specified project that were started by the user. The job list returns in reverse chronological order of when the jobs were created, starting with the most recent job created. /// /// A builder for the *list* method supported by a *job* resource. -/// It is not used directly, but through a `JobMethods`. +/// It is not used directly, but through a `JobMethods` instance. /// /// # Example /// @@ -5803,7 +5903,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "projectId", "stateFilter", "projection", "pageToken", "maxResults", "allUsers"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5856,7 +5956,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5868,7 +5968,6 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -5878,7 +5977,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5889,7 +5988,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5898,13 +5997,13 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5916,7 +6015,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the jobs to list + /// Project ID of the jobs to list pub fn project_id(mut self, new_value: &str) -> JobListCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -5925,7 +6024,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Filter for job state + /// Filter for job state pub fn add_state_filter(mut self, new_value: &str) -> JobListCall<'a, C, NC, A> { self._state_filter.push(new_value.to_string()); self @@ -5933,7 +6032,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *projection* query property to the given value. /// /// - /// Restrict information returned to a set of selected fields + /// Restrict information returned to a set of selected fields pub fn projection(mut self, new_value: &str) -> JobListCall<'a, C, NC, A> { self._projection = Some(new_value.to_string()); self @@ -5941,7 +6040,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *page token* query property to the given value. /// /// - /// Page token, returned by a previous call, to request the next page of results + /// Page token, returned by a previous call, to request the next page of results pub fn page_token(mut self, new_value: &str) -> JobListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -5949,7 +6048,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return + /// Maximum number of results to return pub fn max_results(mut self, new_value: u32) -> JobListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -5957,7 +6056,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *all users* query property to the given value. /// /// - /// Whether to display jobs owned by all users in the project. Default false + /// Whether to display jobs owned by all users in the project. Default false pub fn all_users(mut self, new_value: bool) -> JobListCall<'a, C, NC, A> { self._all_users = Some(new_value); self @@ -6018,7 +6117,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Retrieves the specified job by ID. /// /// A builder for the *get* method supported by a *job* resource. -/// It is not used directly, but through a `JobMethods`. +/// It is not used directly, but through a `JobMethods` instance. /// /// # Example /// @@ -6078,7 +6177,7 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect for &field in ["alt", "projectId", "jobId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6131,7 +6230,7 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6143,7 +6242,6 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect dlg.pre_request(); req.send() - }; match req_result { @@ -6153,7 +6251,7 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6164,7 +6262,7 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6173,13 +6271,13 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6191,7 +6289,7 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the requested job + /// Project ID of the requested job pub fn project_id(mut self, new_value: &str) -> JobGetCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -6201,7 +6299,7 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Job ID of the requested job + /// Job ID of the requested job pub fn job_id(mut self, new_value: &str) -> JobGetCall<'a, C, NC, A> { self._job_id = new_value.to_string(); self @@ -6262,7 +6360,7 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Starts a new asynchronous job. /// /// A builder for the *insert* method supported by a *job* resource. -/// It is not used directly, but through a `JobMethods`. +/// It is not used directly, but through a `JobMethods` instance. /// /// # Example /// @@ -6329,7 +6427,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "projectId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6396,7 +6494,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6442,7 +6540,6 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - } }; @@ -6453,7 +6550,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6464,7 +6561,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } if protocol == "resumable" { let size = reader.seek(io::SeekFrom::End(0)).unwrap(); @@ -6493,17 +6590,17 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn match upload_result { None => { dlg.finished(false); - return Result::Cancelled + return Err(Error::Cancelled) } Some(Err(err)) => { dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Some(Ok(upload_result)) => { res = upload_result; if !res.status.is_success() { dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } } } @@ -6515,13 +6612,13 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6537,11 +6634,14 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn where RS: ReadSeek { self.doit(stream, mime_type, "simple") } - /// Upload media in a resumeable fashion. + /// Upload media in a resumable fashion. /// Even if the upload fails or is interrupted, it can be resumed for a /// certain amount of time as the server maintains state temporarily. /// - /// TODO: Write more about how delegation works in this particular case. + /// The delegate will be asked for an `upload_url()`, and if not provided, will be asked to store an upload URL + /// that was provided by the server, using `store_upload_url(...)`. The upload will be done in chunks, the delegate + /// may specify the `chunk_size()` and may cancel the operation before each chunk is uploaded, using + /// `cancel_chunk_upload(...)`. /// /// * *max size*: 0kb /// * *multipart*: yes @@ -6565,7 +6665,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the project that will be billed for the job + /// Project ID of the project that will be billed for the job pub fn project_id(mut self, new_value: &str) -> JobInsertCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -6626,7 +6726,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Streams data into BigQuery one record at a time without needing to run a load job. /// /// A builder for the *insertAll* method supported by a *tabledata* resource. -/// It is not used directly, but through a `TabledataMethods`. +/// It is not used directly, but through a `TabledataMethods` instance. /// /// # Example /// @@ -6695,7 +6795,7 @@ impl<'a, C, NC, A> TabledataInsertAllCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "projectId", "datasetId", "tableId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6752,7 +6852,7 @@ impl<'a, C, NC, A> TabledataInsertAllCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6768,7 +6868,6 @@ impl<'a, C, NC, A> TabledataInsertAllCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -6778,7 +6877,7 @@ impl<'a, C, NC, A> TabledataInsertAllCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6789,7 +6888,7 @@ impl<'a, C, NC, A> TabledataInsertAllCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6798,13 +6897,13 @@ impl<'a, C, NC, A> TabledataInsertAllCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6825,7 +6924,7 @@ impl<'a, C, NC, A> TabledataInsertAllCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the destination table. + /// Project ID of the destination table. pub fn project_id(mut self, new_value: &str) -> TabledataInsertAllCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -6835,7 +6934,7 @@ impl<'a, C, NC, A> TabledataInsertAllCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset ID of the destination table. + /// Dataset ID of the destination table. pub fn dataset_id(mut self, new_value: &str) -> TabledataInsertAllCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -6845,7 +6944,7 @@ impl<'a, C, NC, A> TabledataInsertAllCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Table ID of the destination table. + /// Table ID of the destination table. pub fn table_id(mut self, new_value: &str) -> TabledataInsertAllCall<'a, C, NC, A> { self._table_id = new_value.to_string(); self @@ -6906,7 +7005,7 @@ impl<'a, C, NC, A> TabledataInsertAllCall<'a, C, NC, A> where NC: hyper::net::Ne /// Retrieves table data from a specified set of rows. /// /// A builder for the *list* method supported by a *tabledata* resource. -/// It is not used directly, but through a `TabledataMethods`. +/// It is not used directly, but through a `TabledataMethods` instance. /// /// # Example /// @@ -6983,7 +7082,7 @@ impl<'a, C, NC, A> TabledataListCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "projectId", "datasetId", "tableId", "startIndex", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7036,7 +7135,7 @@ impl<'a, C, NC, A> TabledataListCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7048,7 +7147,6 @@ impl<'a, C, NC, A> TabledataListCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -7058,7 +7156,7 @@ impl<'a, C, NC, A> TabledataListCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7069,7 +7167,7 @@ impl<'a, C, NC, A> TabledataListCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7078,13 +7176,13 @@ impl<'a, C, NC, A> TabledataListCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7096,7 +7194,7 @@ impl<'a, C, NC, A> TabledataListCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID of the table to read + /// Project ID of the table to read pub fn project_id(mut self, new_value: &str) -> TabledataListCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -7106,7 +7204,7 @@ impl<'a, C, NC, A> TabledataListCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset ID of the table to read + /// Dataset ID of the table to read pub fn dataset_id(mut self, new_value: &str) -> TabledataListCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -7116,7 +7214,7 @@ impl<'a, C, NC, A> TabledataListCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Table ID of the table to read + /// Table ID of the table to read pub fn table_id(mut self, new_value: &str) -> TabledataListCall<'a, C, NC, A> { self._table_id = new_value.to_string(); self @@ -7124,7 +7222,7 @@ impl<'a, C, NC, A> TabledataListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *start index* query property to the given value. /// /// - /// Zero-based index of the starting row to read + /// Zero-based index of the starting row to read pub fn start_index(mut self, new_value: &str) -> TabledataListCall<'a, C, NC, A> { self._start_index = Some(new_value.to_string()); self @@ -7132,7 +7230,7 @@ impl<'a, C, NC, A> TabledataListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *page token* query property to the given value. /// /// - /// Page token, returned by a previous call, identifying the result set + /// Page token, returned by a previous call, identifying the result set pub fn page_token(mut self, new_value: &str) -> TabledataListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -7140,7 +7238,7 @@ impl<'a, C, NC, A> TabledataListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return + /// Maximum number of results to return pub fn max_results(mut self, new_value: u32) -> TabledataListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -7201,7 +7299,7 @@ impl<'a, C, NC, A> TabledataListCall<'a, C, NC, A> where NC: hyper::net::Network /// Lists the projects to which you have at least read access. /// /// A builder for the *list* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -7267,7 +7365,7 @@ impl<'a, C, NC, A> ProjectListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7296,7 +7394,7 @@ impl<'a, C, NC, A> ProjectListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7308,7 +7406,6 @@ impl<'a, C, NC, A> ProjectListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -7318,7 +7415,7 @@ impl<'a, C, NC, A> ProjectListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7329,7 +7426,7 @@ impl<'a, C, NC, A> ProjectListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7338,13 +7435,13 @@ impl<'a, C, NC, A> ProjectListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7354,7 +7451,7 @@ impl<'a, C, NC, A> ProjectListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *page token* query property to the given value. /// /// - /// Page token, returned by a previous call, to request the next page of results + /// Page token, returned by a previous call, to request the next page of results pub fn page_token(mut self, new_value: &str) -> ProjectListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -7362,7 +7459,7 @@ impl<'a, C, NC, A> ProjectListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return + /// Maximum number of results to return pub fn max_results(mut self, new_value: u32) -> ProjectListCall<'a, C, NC, A> { self._max_results = Some(new_value); self diff --git a/gen/blogger3/Cargo.toml b/gen/blogger3/Cargo.toml index c8c02181fd..a99a5f6fcc 100644 --- a/gen/blogger3/Cargo.toml +++ b/gen/blogger3/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-blogger3" -version = "0.1.1+20150208" +version = "0.1.2+20150208" authors = ["Sebastian Thiel "] description = "A complete library to interact with blogger (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/blogger3" @@ -16,7 +16,7 @@ keywords = ["blogger", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/blogger3/README.md b/gen/blogger3/README.md index 026d2629d2..f215da8119 100644 --- a/gen/blogger3/README.md +++ b/gen/blogger3/README.md @@ -1,11 +1,11 @@ The `google-blogger3` library allows access to all features of the *Google blogger* service. -This documentation was generated from *blogger* crate version *0.1.1+20150208*, where *20150208* is the exact revision of the *blogger:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *blogger* crate version *0.1.2+20150208*, where *20150208* is the exact revision of the *blogger:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *blogger* *v3* API can be found at the [official documentation site](https://developers.google.com/blogger/docs/3.0/getting_started). @@ -39,6 +39,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-blogger3/struct.Blogger.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-blogger3/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-blogger3/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-blogger3/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -48,6 +50,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-blogger3/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -91,7 +95,7 @@ google-blogger3 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-blogger3" as blogger3; -use blogger3::Result; +use blogger3::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use blogger3::Blogger; @@ -125,15 +129,17 @@ let result = hub.posts().list("blogId") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -146,7 +152,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-blogger3/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-blogger3/trait.ResponseResult.html), it will return that by default. @@ -169,8 +175,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-blogger3/trait ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-blogger3/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-blogger3/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-blogger3/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-blogger3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-blogger3/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/blogger3/src/cmn.rs b/gen/blogger3/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/blogger3/src/cmn.rs +++ b/gen/blogger3/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/blogger3/src/lib.rs b/gen/blogger3/src/lib.rs index 5f40deeca2..0ebd4412b8 100644 --- a/gen/blogger3/src/lib.rs +++ b/gen/blogger3/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *blogger* crate version *0.1.1+20150208*, where *20150208* is the exact revision of the *blogger:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *blogger* crate version *0.1.2+20150208*, where *20150208* is the exact revision of the *blogger:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *blogger* *v3* API can be found at the //! [official documentation site](https://developers.google.com/blogger/docs/3.0/getting_started). @@ -39,6 +39,8 @@ //! //! * **[Hub](struct.Blogger.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -48,6 +50,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -91,7 +95,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-blogger3" as blogger3; -//! use blogger3::Result; +//! use blogger3::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -126,15 +130,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -147,7 +153,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -170,8 +176,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -220,7 +227,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -270,7 +277,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-blogger3" as blogger3; -/// use blogger3::Result; +/// use blogger3::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -305,15 +312,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -334,7 +343,7 @@ impl<'a, C, NC, A> Blogger Blogger { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -365,7 +374,7 @@ impl<'a, C, NC, A> Blogger } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -385,7 +394,7 @@ impl<'a, C, NC, A> Blogger /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PostBlog { - /// The identifier of the Blog that contains this Post. + /// The identifier of the Blog that contains this Post. pub id: String, } @@ -399,20 +408,20 @@ impl Part for PostBlog {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct BlogPerUserInfo { - /// True if the user has Admin level access to the blog. + /// True if the user has Admin level access to the blog. #[serde(alias="hasAdminAccess")] pub has_admin_access: bool, - /// The kind of this entity. Always blogger#blogPerUserInfo + /// The kind of this entity. Always blogger#blogPerUserInfo pub kind: String, - /// Access permissions that the user has for the blog (ADMIN, AUTHOR, or READER). + /// Access permissions that the user has for the blog (ADMIN, AUTHOR, or READER). pub role: String, - /// The Photo Album Key for the user when adding photos to the blog + /// The Photo Album Key for the user when adding photos to the blog #[serde(alias="photosAlbumKey")] pub photos_album_key: String, - /// ID of the User + /// ID of the User #[serde(alias="userId")] pub user_id: String, - /// ID of the Blog resource + /// ID of the Blog resource #[serde(alias="blogId")] pub blog_id: String, } @@ -426,18 +435,18 @@ impl Part for BlogPerUserInfo {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PostPerUserInfo { - /// The kind of this entity. Always blogger#postPerUserInfo + /// The kind of this entity. Always blogger#postPerUserInfo pub kind: String, - /// ID of the Post resource. + /// ID of the Post resource. #[serde(alias="postId")] pub post_id: String, - /// ID of the User. + /// ID of the User. #[serde(alias="userId")] pub user_id: String, - /// ID of the Blog that the post resource belongs to. + /// ID of the Blog that the post resource belongs to. #[serde(alias="blogId")] pub blog_id: String, - /// True if the user has Author level access to the post. + /// True if the user has Author level access to the post. #[serde(alias="hasEditAccess")] pub has_edit_access: bool, } @@ -458,33 +467,33 @@ impl Part for PostPerUserInfo {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Blog { - /// The status of the blog. + /// The status of the blog. pub status: String, - /// The kind of this entry. Always blogger#blog + /// The kind of this entry. Always blogger#blog pub kind: String, - /// The description of this blog. This is displayed underneath the title. + /// The description of this blog. This is displayed underneath the title. pub description: String, - /// The locale this Blog is set to. + /// The locale this Blog is set to. pub locale: BlogLocale, - /// The JSON custom meta-data for the Blog + /// The JSON custom meta-data for the Blog #[serde(alias="customMetaData")] pub custom_meta_data: String, - /// The container of posts in this blog. + /// The container of posts in this blog. pub posts: BlogPosts, - /// RFC 3339 date-time when this blog was last updated. + /// RFC 3339 date-time when this blog was last updated. pub updated: String, - /// The identifier for this resource. + /// The identifier for this resource. pub id: String, - /// The URL where this blog is published. + /// The URL where this blog is published. pub url: String, - /// RFC 3339 date-time when this blog was published. + /// RFC 3339 date-time when this blog was published. pub published: String, - /// The container of pages in this blog. + /// The container of pages in this blog. pub pages: BlogPages, - /// The API REST URL to fetch this resource from. + /// The API REST URL to fetch this resource from. #[serde(alias="selfLink")] pub self_link: String, - /// The name of this blog. This is displayed as the title. + /// The name of this blog. This is displayed as the title. pub name: String, } @@ -503,12 +512,12 @@ impl ResponseResult for Blog {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PostUserInfosList { - /// Pagination token to fetch the next page, if one exists. + /// Pagination token to fetch the next page, if one exists. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The list of Posts with User information for the post, for this Blog. + /// The list of Posts with User information for the post, for this Blog. pub items: Vec, - /// The kind of this entity. Always blogger#postList + /// The kind of this entity. Always blogger#postList pub kind: String, } @@ -526,11 +535,11 @@ impl ResponseResult for PostUserInfosList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct BlogUserInfo { - /// The Blog resource. + /// The Blog resource. pub blog: Blog, - /// The kind of this entity. Always blogger#blogUserInfo + /// The kind of this entity. Always blogger#blogUserInfo pub kind: String, - /// Information about a User for the Blog. + /// Information about a User for the Blog. pub blog_user_info: BlogPerUserInfo, } @@ -544,7 +553,7 @@ impl ResponseResult for BlogUserInfo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentInReplyTo { - /// The identified of the parent of this comment. + /// The identified of the parent of this comment. pub id: String, } @@ -558,14 +567,14 @@ impl Part for CommentInReplyTo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentAuthor { - /// The URL of the Comment creator's Profile page. + /// The URL of the Comment creator's Profile page. pub url: String, - /// The comment creator's avatar. + /// The comment creator's avatar. pub image: CommentAuthorImage, - /// The display name. + /// The display name. #[serde(alias="displayName")] pub display_name: String, - /// The identifier of the Comment creator. + /// The identifier of the Comment creator. pub id: String, } @@ -579,7 +588,7 @@ impl Part for CommentAuthor {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PageAuthorImage { - /// The page author's avatar URL. + /// The page author's avatar URL. pub url: String, } @@ -593,7 +602,7 @@ impl Part for PageAuthorImage {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentPost { - /// The identifier of the post containing this comment. + /// The identifier of the post containing this comment. pub id: String, } @@ -607,7 +616,7 @@ impl Part for CommentPost {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UserBlogs { - /// The URL of the Blogs for this user. + /// The URL of the Blogs for this user. #[serde(alias="selfLink")] pub self_link: String, } @@ -622,12 +631,12 @@ impl Part for UserBlogs {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PostReplies { - /// The count of comments on this post. + /// The count of comments on this post. #[serde(alias="totalItems")] pub total_items: String, - /// The List of Comments for this Post. + /// The List of Comments for this Post. pub items: Vec, - /// The URL of the comments on this post. + /// The URL of the comments on this post. #[serde(alias="selfLink")] pub self_link: String, } @@ -642,9 +651,9 @@ impl Part for PostReplies {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PageviewsCounts { - /// Count of page views for the given time range + /// Count of page views for the given time range pub count: String, - /// Time range the given count applies to + /// Time range the given count applies to #[serde(alias="timeRange")] pub time_range: String, } @@ -664,11 +673,11 @@ impl Part for PageviewsCounts {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct BlogList { - /// The list of Blogs this user has Authorship or Admin rights over. + /// The list of Blogs this user has Authorship or Admin rights over. pub items: Vec, - /// The kind of this entity. Always blogger#blogList + /// The kind of this entity. Always blogger#blogList pub kind: String, - /// Admin level list of blog per-user information + /// Admin level list of blog per-user information #[serde(alias="blogUserInfos")] pub blog_user_infos: Vec, } @@ -687,24 +696,24 @@ impl ResponseResult for BlogList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct User { - /// Profile summary information. + /// Profile summary information. pub about: String, - /// The display name. + /// The display name. #[serde(alias="displayName")] pub display_name: String, - /// The timestamp of when this profile was created, in seconds since epoch. + /// The timestamp of when this profile was created, in seconds since epoch. pub created: String, - /// This user's locale + /// This user's locale pub locale: UserLocale, - /// The container of blogs for this user. + /// The container of blogs for this user. pub blogs: UserBlogs, - /// The kind of this entity. Always blogger#user + /// The kind of this entity. Always blogger#user pub kind: String, - /// The user's profile page. + /// The user's profile page. pub url: String, - /// The identifier for this User. + /// The identifier for this User. pub id: String, - /// The API REST URL to fetch this resource from. + /// The API REST URL to fetch this resource from. #[serde(alias="selfLink")] pub self_link: String, } @@ -719,7 +728,7 @@ impl ResponseResult for User {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PostAuthorImage { - /// The Post author's avatar URL. + /// The Post author's avatar URL. pub url: String, } @@ -747,46 +756,46 @@ impl Part for PostAuthorImage {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Post { - /// Status of the post. Only set for admin-level requests + /// Status of the post. Only set for admin-level requests pub status: Option, - /// RFC 3339 date-time when this Post was last updated. + /// RFC 3339 date-time when this Post was last updated. pub updated: Option, - /// Comment control and display setting for readers of this post. + /// Comment control and display setting for readers of this post. #[serde(alias="readerComments")] pub reader_comments: Option, - /// The list of labels this Post was tagged with. + /// The list of labels this Post was tagged with. pub labels: Option>, - /// The container of comments on this Post. + /// The container of comments on this Post. pub replies: Option, - /// Display image for the Post. + /// Display image for the Post. pub images: Option>, - /// The identifier of this Post. + /// The identifier of this Post. pub id: Option, - /// Data about the blog containing this Post. + /// Data about the blog containing this Post. pub blog: Option, - /// The kind of this entity. Always blogger#post + /// The kind of this entity. Always blogger#post pub kind: Option, - /// The title link URL, similar to atom's related link. + /// The title link URL, similar to atom's related link. #[serde(alias="titleLink")] pub title_link: Option, - /// The author of this Post. + /// The author of this Post. pub author: Option, - /// The URL where this Post is displayed. + /// The URL where this Post is displayed. pub url: Option, - /// The title of the Post. + /// The title of the Post. pub title: Option, - /// The JSON meta-data for the Post. + /// The JSON meta-data for the Post. #[serde(alias="customMetaData")] pub custom_meta_data: Option, - /// The content of the Post. May contain HTML markup. + /// The content of the Post. May contain HTML markup. pub content: Option, - /// Etag of the resource. + /// Etag of the resource. pub etag: Option, - /// The location for geotagged posts. + /// The location for geotagged posts. pub location: Option, - /// RFC 3339 date-time when this Post was published. + /// RFC 3339 date-time when this Post was published. pub published: Option, - /// The API REST URL to fetch this resource from. + /// The API REST URL to fetch this resource from. #[serde(alias="selfLink")] pub self_link: Option, } @@ -802,13 +811,13 @@ impl ResponseResult for Post {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PostLocation { - /// Location's latitude. + /// Location's latitude. pub lat: f64, - /// Location's longitude. + /// Location's longitude. pub lng: f64, - /// Location's viewport span. Can be used when rendering a map preview. + /// Location's viewport span. Can be used when rendering a map preview. pub span: String, - /// Location name. + /// Location name. pub name: String, } @@ -822,14 +831,14 @@ impl Part for PostLocation {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PostAuthor { - /// The URL of the Post creator's Profile page. + /// The URL of the Post creator's Profile page. pub url: String, - /// The Post author's avatar. + /// The Post author's avatar. pub image: PostAuthorImage, - /// The display name. + /// The display name. #[serde(alias="displayName")] pub display_name: String, - /// The identifier of the Post creator. + /// The identifier of the Post creator. pub id: String, } @@ -849,14 +858,14 @@ impl Part for PostAuthor {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CommentList { - /// Pagination token to fetch the next page, if one exists. + /// Pagination token to fetch the next page, if one exists. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The List of Comments for a Post. + /// The List of Comments for a Post. pub items: Vec, - /// The kind of this entry. Always blogger#commentList + /// The kind of this entry. Always blogger#commentList pub kind: String, - /// Pagination token to fetch the previous page, if one exists. + /// Pagination token to fetch the previous page, if one exists. #[serde(alias="prevPageToken")] pub prev_page_token: String, } @@ -870,7 +879,7 @@ impl ResponseResult for CommentList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PostImages { - /// no description provided + /// no description provided pub url: String, } @@ -890,12 +899,12 @@ impl Part for PostImages {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PostList { - /// Pagination token to fetch the next page, if one exists. + /// Pagination token to fetch the next page, if one exists. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The list of Posts for this Blog. + /// The list of Posts for this Blog. pub items: Vec, - /// The kind of this entity. Always blogger#postList + /// The kind of this entity. Always blogger#postList pub kind: String, } @@ -908,7 +917,7 @@ impl ResponseResult for PostList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentAuthorImage { - /// The comment creator's avatar URL. + /// The comment creator's avatar URL. pub url: String, } @@ -922,10 +931,10 @@ impl Part for CommentAuthorImage {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct BlogPages { - /// The count of pages in this blog. + /// The count of pages in this blog. #[serde(alias="totalItems")] pub total_items: i32, - /// The URL of the container for pages in this blog. + /// The URL of the container for pages in this blog. #[serde(alias="selfLink")] pub self_link: String, } @@ -940,12 +949,12 @@ impl Part for BlogPages {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct BlogPosts { - /// The count of posts in this blog. + /// The count of posts in this blog. #[serde(alias="totalItems")] pub total_items: i32, - /// The List of Posts for this Blog. + /// The List of Posts for this Blog. pub items: Vec, - /// The URL of the container for posts in this blog. + /// The URL of the container for posts in this blog. #[serde(alias="selfLink")] pub self_link: String, } @@ -972,29 +981,29 @@ impl Part for BlogPosts {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Page { - /// The status of the page for admin resources (either LIVE or DRAFT). + /// The status of the page for admin resources (either LIVE or DRAFT). pub status: Option, - /// Data about the blog containing this Page. + /// Data about the blog containing this Page. pub blog: Option, - /// The kind of this entity. Always blogger#page + /// The kind of this entity. Always blogger#page pub kind: Option, - /// The title of this entity. This is the name displayed in the Admin user interface. + /// The title of this entity. This is the name displayed in the Admin user interface. pub title: Option, - /// The URL that this Page is displayed at. + /// The URL that this Page is displayed at. pub url: Option, - /// The author of this Page. + /// The author of this Page. pub author: Option, - /// RFC 3339 date-time when this Page was last updated. + /// RFC 3339 date-time when this Page was last updated. pub updated: Option, - /// The body content of this Page, in HTML. + /// The body content of this Page, in HTML. pub content: Option, - /// Etag of the resource. + /// Etag of the resource. pub etag: Option, - /// RFC 3339 date-time when this Page was published. + /// RFC 3339 date-time when this Page was published. pub published: Option, - /// The identifier for this resource. + /// The identifier for this resource. pub id: Option, - /// The API REST URL to fetch this resource from. + /// The API REST URL to fetch this resource from. #[serde(alias="selfLink")] pub self_link: Option, } @@ -1021,28 +1030,28 @@ impl ResponseResult for Page {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Comment { - /// The status of the comment (only populated for admin users) + /// The status of the comment (only populated for admin users) pub status: String, - /// Data about the comment this is in reply to. + /// Data about the comment this is in reply to. #[serde(alias="inReplyTo")] pub in_reply_to: CommentInReplyTo, - /// The kind of this entry. Always blogger#comment + /// The kind of this entry. Always blogger#comment pub kind: String, - /// The author of this Comment. + /// The author of this Comment. pub author: CommentAuthor, - /// RFC 3339 date-time when this comment was last updated. + /// RFC 3339 date-time when this comment was last updated. pub updated: String, - /// Data about the blog containing this comment. + /// Data about the blog containing this comment. pub blog: CommentBlog, - /// RFC 3339 date-time when this comment was published. + /// RFC 3339 date-time when this comment was published. pub published: String, - /// Data about the post containing this comment. + /// Data about the post containing this comment. pub post: CommentPost, - /// The actual content of the comment. May include HTML markup. + /// The actual content of the comment. May include HTML markup. pub content: String, - /// The identifier for this resource. + /// The identifier for this resource. pub id: String, - /// The API REST URL to fetch this resource from. + /// The API REST URL to fetch this resource from. #[serde(alias="selfLink")] pub self_link: String, } @@ -1063,11 +1072,11 @@ impl ResponseResult for Comment {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PostUserInfo { - /// The kind of this entity. Always blogger#postUserInfo + /// The kind of this entity. Always blogger#postUserInfo pub kind: String, - /// The Post resource. + /// The Post resource. pub post: Post, - /// Information about a User for the Post. + /// Information about a User for the Post. pub post_user_info: PostPerUserInfo, } @@ -1086,12 +1095,12 @@ impl ResponseResult for PostUserInfo {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Pageviews { - /// The container of posts in this blog. + /// The container of posts in this blog. pub counts: Vec, - /// Blog Id + /// Blog Id #[serde(alias="blogId")] pub blog_id: String, - /// The kind of this entry. Always blogger#page_views + /// The kind of this entry. Always blogger#page_views pub kind: String, } @@ -1104,14 +1113,14 @@ impl ResponseResult for Pageviews {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PageAuthor { - /// The URL of the Page creator's Profile page. + /// The URL of the Page creator's Profile page. pub url: String, - /// The page author's avatar. + /// The page author's avatar. pub image: PageAuthorImage, - /// The display name. + /// The display name. #[serde(alias="displayName")] pub display_name: String, - /// The identifier of the Page creator. + /// The identifier of the Page creator. pub id: String, } @@ -1130,12 +1139,12 @@ impl Part for PageAuthor {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PageList { - /// Pagination token to fetch the next page, if one exists. + /// Pagination token to fetch the next page, if one exists. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The list of Pages for a Blog. + /// The list of Pages for a Blog. pub items: Vec, - /// The kind of this entity. Always blogger#pageList + /// The kind of this entity. Always blogger#pageList pub kind: String, } @@ -1148,11 +1157,11 @@ impl ResponseResult for PageList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UserLocale { - /// The user's country setting. + /// The user's country setting. pub country: String, - /// The user's language variant setting. + /// The user's language variant setting. pub variant: String, - /// The user's language setting. + /// The user's language setting. pub language: String, } @@ -1166,7 +1175,7 @@ impl Part for UserLocale {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CommentBlog { - /// The identifier of the blog containing this comment. + /// The identifier of the blog containing this comment. pub id: String, } @@ -1180,7 +1189,7 @@ impl Part for CommentBlog {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PageBlog { - /// The identifier of the blog containing this page. + /// The identifier of the blog containing this page. pub id: String, } @@ -1194,11 +1203,11 @@ impl Part for PageBlog {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct BlogLocale { - /// The country this blog's locale is set to. + /// The country this blog's locale is set to. pub country: String, - /// The language variant this blog is authored in. + /// The language variant this blog is authored in. pub variant: String, - /// The language this blog is authored in. + /// The language this blog is authored in. pub language: String, } @@ -1245,13 +1254,17 @@ pub struct PageViewMethods<'a, C, NC, A> hub: &'a Blogger, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PageViewMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PageViewMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PageViewMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve pageview stats for a Blog. + /// Retrieve pageview stats for a Blog. + /// + /// # Arguments + /// + /// * `blogId` - The ID of the blog to get. pub fn get(&self, blog_id: &str) -> PageViewGetCall<'a, C, NC, A> { PageViewGetCall { hub: self.hub, @@ -1300,13 +1313,17 @@ pub struct UserMethods<'a, C, NC, A> hub: &'a Blogger, } -impl<'a, C, NC, A> ResourceMethodsBuilder for UserMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for UserMethods<'a, C, NC, A> {} impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one user by ID. + /// Gets one user by ID. + /// + /// # Arguments + /// + /// * `userId` - The ID of the user to get. pub fn get(&self, user_id: &str) -> UserGetCall<'a, C, NC, A> { UserGetCall { hub: self.hub, @@ -1354,13 +1371,17 @@ pub struct BlogMethods<'a, C, NC, A> hub: &'a Blogger, } -impl<'a, C, NC, A> ResourceMethodsBuilder for BlogMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for BlogMethods<'a, C, NC, A> {} impl<'a, C, NC, A> BlogMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of blogs, possibly filtered. + /// Retrieves a list of blogs, possibly filtered. + /// + /// # Arguments + /// + /// * `userId` - ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. pub fn list_by_user(&self, user_id: &str) -> BlogListByUserCall<'a, C, NC, A> { BlogListByUserCall { hub: self.hub, @@ -1377,7 +1398,11 @@ impl<'a, C, NC, A> BlogMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one blog by ID. + /// Gets one blog by ID. + /// + /// # Arguments + /// + /// * `blogId` - The ID of the blog to get. pub fn get(&self, blog_id: &str) -> BlogGetCall<'a, C, NC, A> { BlogGetCall { hub: self.hub, @@ -1392,7 +1417,11 @@ impl<'a, C, NC, A> BlogMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve a Blog by URL. + /// Retrieve a Blog by URL. + /// + /// # Arguments + /// + /// * `url` - The URL of the blog to retrieve. pub fn get_by_url(&self, url: &str) -> BlogGetByUrlCall<'a, C, NC, A> { BlogGetByUrlCall { hub: self.hub, @@ -1441,13 +1470,19 @@ pub struct PostMethods<'a, C, NC, A> hub: &'a Blogger, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PostMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PostMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PostMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update a post. + /// Update a post. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `blogId` - The ID of the Blog. + /// * `postId` - The ID of the Post. pub fn update(&self, request: &Post, blog_id: &str, post_id: &str) -> PostUpdateCall<'a, C, NC, A> { PostUpdateCall { hub: self.hub, @@ -1467,7 +1502,12 @@ impl<'a, C, NC, A> PostMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve a Post by Path. + /// Retrieve a Post by Path. + /// + /// # Arguments + /// + /// * `blogId` - ID of the blog to fetch the post from. + /// * `path` - Path of the Post to retrieve. pub fn get_by_path(&self, blog_id: &str, path: &str) -> PostGetByPathCall<'a, C, NC, A> { PostGetByPathCall { hub: self.hub, @@ -1483,7 +1523,12 @@ impl<'a, C, NC, A> PostMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Get a post by ID. + /// Get a post by ID. + /// + /// # Arguments + /// + /// * `blogId` - ID of the blog to fetch the post from. + /// * `postId` - The ID of the post pub fn get(&self, blog_id: &str, post_id: &str) -> PostGetCall<'a, C, NC, A> { PostGetCall { hub: self.hub, @@ -1501,7 +1546,12 @@ impl<'a, C, NC, A> PostMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Add a post. + /// Add a post. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `blogId` - ID of the blog to add the post to. pub fn insert(&self, request: &Post, blog_id: &str) -> PostInsertCall<'a, C, NC, A> { PostInsertCall { hub: self.hub, @@ -1518,7 +1568,12 @@ impl<'a, C, NC, A> PostMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Publishes a draft post, optionally at the specific time of the given publishDate parameter. + /// Publishes a draft post, optionally at the specific time of the given publishDate parameter. + /// + /// # Arguments + /// + /// * `blogId` - The ID of the Blog. + /// * `postId` - The ID of the Post. pub fn publish(&self, blog_id: &str, post_id: &str) -> PostPublishCall<'a, C, NC, A> { PostPublishCall { hub: self.hub, @@ -1533,7 +1588,12 @@ impl<'a, C, NC, A> PostMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete a post by ID. + /// Delete a post by ID. + /// + /// # Arguments + /// + /// * `blogId` - The ID of the Blog. + /// * `postId` - The ID of the Post. pub fn delete(&self, blog_id: &str, post_id: &str) -> PostDeleteCall<'a, C, NC, A> { PostDeleteCall { hub: self.hub, @@ -1547,7 +1607,12 @@ impl<'a, C, NC, A> PostMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Revert a published or scheduled post to draft state. + /// Revert a published or scheduled post to draft state. + /// + /// # Arguments + /// + /// * `blogId` - The ID of the Blog. + /// * `postId` - The ID of the Post. pub fn revert(&self, blog_id: &str, post_id: &str) -> PostRevertCall<'a, C, NC, A> { PostRevertCall { hub: self.hub, @@ -1561,7 +1626,12 @@ impl<'a, C, NC, A> PostMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Search for a post. + /// Search for a post. + /// + /// # Arguments + /// + /// * `blogId` - ID of the blog to fetch the post from. + /// * `q` - Query terms to search this blog for matching posts. pub fn search(&self, blog_id: &str, q: &str) -> PostSearchCall<'a, C, NC, A> { PostSearchCall { hub: self.hub, @@ -1577,7 +1647,13 @@ impl<'a, C, NC, A> PostMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update a post. This method supports patch semantics. + /// Update a post. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `blogId` - The ID of the Blog. + /// * `postId` - The ID of the Post. pub fn patch(&self, request: &Post, blog_id: &str, post_id: &str) -> PostPatchCall<'a, C, NC, A> { PostPatchCall { hub: self.hub, @@ -1597,7 +1673,11 @@ impl<'a, C, NC, A> PostMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of posts, possibly filtered. + /// Retrieves a list of posts, possibly filtered. + /// + /// # Arguments + /// + /// * `blogId` - ID of the blog to fetch posts from. pub fn list(&self, blog_id: &str) -> PostListCall<'a, C, NC, A> { PostListCall { hub: self.hub, @@ -1655,13 +1735,19 @@ pub struct CommentMethods<'a, C, NC, A> hub: &'a Blogger, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CommentMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CommentMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CommentMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one comment by ID. + /// Gets one comment by ID. + /// + /// # Arguments + /// + /// * `blogId` - ID of the blog to containing the comment. + /// * `postId` - ID of the post to fetch posts from. + /// * `commentId` - The ID of the comment to get. pub fn get(&self, blog_id: &str, post_id: &str, comment_id: &str) -> CommentGetCall<'a, C, NC, A> { CommentGetCall { hub: self.hub, @@ -1677,7 +1763,13 @@ impl<'a, C, NC, A> CommentMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Removes the content of a comment. + /// Removes the content of a comment. + /// + /// # Arguments + /// + /// * `blogId` - The ID of the Blog. + /// * `postId` - The ID of the Post. + /// * `commentId` - The ID of the comment to delete content from. pub fn remove_content(&self, blog_id: &str, post_id: &str, comment_id: &str) -> CommentRemoveContentCall<'a, C, NC, A> { CommentRemoveContentCall { hub: self.hub, @@ -1692,7 +1784,11 @@ impl<'a, C, NC, A> CommentMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the comments for a blog, across all posts, possibly filtered. + /// Retrieves the comments for a blog, across all posts, possibly filtered. + /// + /// # Arguments + /// + /// * `blogId` - ID of the blog to fetch comments from. pub fn list_by_blog(&self, blog_id: &str) -> CommentListByBlogCall<'a, C, NC, A> { CommentListByBlogCall { hub: self.hub, @@ -1711,7 +1807,13 @@ impl<'a, C, NC, A> CommentMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Marks a comment as spam. + /// Marks a comment as spam. + /// + /// # Arguments + /// + /// * `blogId` - The ID of the Blog. + /// * `postId` - The ID of the Post. + /// * `commentId` - The ID of the comment to mark as spam. pub fn mark_as_spam(&self, blog_id: &str, post_id: &str, comment_id: &str) -> CommentMarkAsSpamCall<'a, C, NC, A> { CommentMarkAsSpamCall { hub: self.hub, @@ -1726,7 +1828,12 @@ impl<'a, C, NC, A> CommentMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the comments for a post, possibly filtered. + /// Retrieves the comments for a post, possibly filtered. + /// + /// # Arguments + /// + /// * `blogId` - ID of the blog to fetch comments from. + /// * `postId` - ID of the post to fetch posts from. pub fn list(&self, blog_id: &str, post_id: &str) -> CommentListCall<'a, C, NC, A> { CommentListCall { hub: self.hub, @@ -1747,7 +1854,13 @@ impl<'a, C, NC, A> CommentMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Marks a comment as not spam. + /// Marks a comment as not spam. + /// + /// # Arguments + /// + /// * `blogId` - The ID of the Blog. + /// * `postId` - The ID of the Post. + /// * `commentId` - The ID of the comment to mark as not spam. pub fn approve(&self, blog_id: &str, post_id: &str, comment_id: &str) -> CommentApproveCall<'a, C, NC, A> { CommentApproveCall { hub: self.hub, @@ -1762,7 +1875,13 @@ impl<'a, C, NC, A> CommentMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete a comment by ID. + /// Delete a comment by ID. + /// + /// # Arguments + /// + /// * `blogId` - The ID of the Blog. + /// * `postId` - The ID of the Post. + /// * `commentId` - The ID of the comment to delete. pub fn delete(&self, blog_id: &str, post_id: &str, comment_id: &str) -> CommentDeleteCall<'a, C, NC, A> { CommentDeleteCall { hub: self.hub, @@ -1812,13 +1931,19 @@ pub struct PostUserInfoMethods<'a, C, NC, A> hub: &'a Blogger, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PostUserInfoMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PostUserInfoMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PostUserInfoMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one post and user info pair, by post ID and user ID. The post user info contains per-user information about the post, such as access rights, specific to the user. + /// Gets one post and user info pair, by post ID and user ID. The post user info contains per-user information about the post, such as access rights, specific to the user. + /// + /// # Arguments + /// + /// * `userId` - ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. + /// * `blogId` - The ID of the blog. + /// * `postId` - The ID of the post to get. pub fn get(&self, user_id: &str, blog_id: &str, post_id: &str) -> PostUserInfoGetCall<'a, C, NC, A> { PostUserInfoGetCall { hub: self.hub, @@ -1834,7 +1959,12 @@ impl<'a, C, NC, A> PostUserInfoMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of post and post user info pairs, possibly filtered. The post user info contains per-user information about the post, such as access rights, specific to the user. + /// Retrieves a list of post and post user info pairs, possibly filtered. The post user info contains per-user information about the post, such as access rights, specific to the user. + /// + /// # Arguments + /// + /// * `userId` - ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. + /// * `blogId` - ID of the blog to fetch posts from. pub fn list(&self, user_id: &str, blog_id: &str) -> PostUserInfoListCall<'a, C, NC, A> { PostUserInfoListCall { hub: self.hub, @@ -1892,13 +2022,18 @@ pub struct BlogUserInfoMethods<'a, C, NC, A> hub: &'a Blogger, } -impl<'a, C, NC, A> ResourceMethodsBuilder for BlogUserInfoMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for BlogUserInfoMethods<'a, C, NC, A> {} impl<'a, C, NC, A> BlogUserInfoMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one blog and user info pair by blogId and userId. + /// Gets one blog and user info pair by blogId and userId. + /// + /// # Arguments + /// + /// * `userId` - ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. + /// * `blogId` - The ID of the blog to get. pub fn get(&self, user_id: &str, blog_id: &str) -> BlogUserInfoGetCall<'a, C, NC, A> { BlogUserInfoGetCall { hub: self.hub, @@ -1948,13 +2083,18 @@ pub struct PageMethods<'a, C, NC, A> hub: &'a Blogger, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PageMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PageMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one blog page by ID. + /// Gets one blog page by ID. + /// + /// # Arguments + /// + /// * `blogId` - ID of the blog containing the page. + /// * `pageId` - The ID of the page to get. pub fn get(&self, blog_id: &str, page_id: &str) -> PageGetCall<'a, C, NC, A> { PageGetCall { hub: self.hub, @@ -1969,7 +2109,11 @@ impl<'a, C, NC, A> PageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the pages for a blog, optionally including non-LIVE statuses. + /// Retrieves the pages for a blog, optionally including non-LIVE statuses. + /// + /// # Arguments + /// + /// * `blogId` - ID of the blog to fetch Pages from. pub fn list(&self, blog_id: &str) -> PageListCall<'a, C, NC, A> { PageListCall { hub: self.hub, @@ -1987,7 +2131,12 @@ impl<'a, C, NC, A> PageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Revert a published or scheduled page to draft state. + /// Revert a published or scheduled page to draft state. + /// + /// # Arguments + /// + /// * `blogId` - The ID of the blog. + /// * `pageId` - The ID of the page. pub fn revert(&self, blog_id: &str, page_id: &str) -> PageRevertCall<'a, C, NC, A> { PageRevertCall { hub: self.hub, @@ -2001,7 +2150,12 @@ impl<'a, C, NC, A> PageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Add a page. + /// Add a page. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `blogId` - ID of the blog to add the page to. pub fn insert(&self, request: &Page, blog_id: &str) -> PageInsertCall<'a, C, NC, A> { PageInsertCall { hub: self.hub, @@ -2016,7 +2170,13 @@ impl<'a, C, NC, A> PageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update a page. This method supports patch semantics. + /// Update a page. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `blogId` - The ID of the Blog. + /// * `pageId` - The ID of the Page. pub fn patch(&self, request: &Page, blog_id: &str, page_id: &str) -> PagePatchCall<'a, C, NC, A> { PagePatchCall { hub: self.hub, @@ -2033,7 +2193,12 @@ impl<'a, C, NC, A> PageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Publishes a draft page. + /// Publishes a draft page. + /// + /// # Arguments + /// + /// * `blogId` - The ID of the blog. + /// * `pageId` - The ID of the page. pub fn publish(&self, blog_id: &str, page_id: &str) -> PagePublishCall<'a, C, NC, A> { PagePublishCall { hub: self.hub, @@ -2047,7 +2212,13 @@ impl<'a, C, NC, A> PageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update a page. + /// Update a page. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `blogId` - The ID of the Blog. + /// * `pageId` - The ID of the Page. pub fn update(&self, request: &Page, blog_id: &str, page_id: &str) -> PageUpdateCall<'a, C, NC, A> { PageUpdateCall { hub: self.hub, @@ -2064,7 +2235,12 @@ impl<'a, C, NC, A> PageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete a page by ID. + /// Delete a page by ID. + /// + /// # Arguments + /// + /// * `blogId` - The ID of the Blog. + /// * `pageId` - The ID of the Page. pub fn delete(&self, blog_id: &str, page_id: &str) -> PageDeleteCall<'a, C, NC, A> { PageDeleteCall { hub: self.hub, @@ -2088,7 +2264,7 @@ impl<'a, C, NC, A> PageMethods<'a, C, NC, A> { /// Retrieve pageview stats for a Blog. /// /// A builder for the *get* method supported by a *pageView* resource. -/// It is not used directly, but through a `PageViewMethods`. +/// It is not used directly, but through a `PageViewMethods` instance. /// /// # Example /// @@ -2155,7 +2331,7 @@ impl<'a, C, NC, A> PageViewGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "blogId", "range"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2208,7 +2384,7 @@ impl<'a, C, NC, A> PageViewGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2220,7 +2396,6 @@ impl<'a, C, NC, A> PageViewGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -2230,7 +2405,7 @@ impl<'a, C, NC, A> PageViewGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2241,7 +2416,7 @@ impl<'a, C, NC, A> PageViewGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2250,13 +2425,13 @@ impl<'a, C, NC, A> PageViewGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2268,7 +2443,7 @@ impl<'a, C, NC, A> PageViewGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the blog to get. + /// The ID of the blog to get. pub fn blog_id(mut self, new_value: &str) -> PageViewGetCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -2337,7 +2512,7 @@ impl<'a, C, NC, A> PageViewGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Gets one user by ID. /// /// A builder for the *get* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -2395,7 +2570,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "userId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2448,7 +2623,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2460,7 +2635,6 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -2470,7 +2644,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2481,7 +2655,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2490,13 +2664,13 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2508,7 +2682,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the user to get. + /// The ID of the user to get. pub fn user_id(mut self, new_value: &str) -> UserGetCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -2569,7 +2743,7 @@ impl<'a, C, NC, A> UserGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Retrieves a list of blogs, possibly filtered. /// /// A builder for the *listByUser* method supported by a *blog* resource. -/// It is not used directly, but through a `BlogMethods`. +/// It is not used directly, but through a `BlogMethods` instance. /// /// # Example /// @@ -2655,7 +2829,7 @@ impl<'a, C, NC, A> BlogListByUserCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "userId", "view", "status", "role", "fetchUserInfo"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2708,7 +2882,7 @@ impl<'a, C, NC, A> BlogListByUserCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2720,7 +2894,6 @@ impl<'a, C, NC, A> BlogListByUserCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -2730,7 +2903,7 @@ impl<'a, C, NC, A> BlogListByUserCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2741,7 +2914,7 @@ impl<'a, C, NC, A> BlogListByUserCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2750,13 +2923,13 @@ impl<'a, C, NC, A> BlogListByUserCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2768,7 +2941,7 @@ impl<'a, C, NC, A> BlogListByUserCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. + /// ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. pub fn user_id(mut self, new_value: &str) -> BlogListByUserCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -2776,7 +2949,7 @@ impl<'a, C, NC, A> BlogListByUserCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *view* query property to the given value. /// /// - /// Access level with which to view the blogs. Note that some fields require elevated access. + /// Access level with which to view the blogs. Note that some fields require elevated access. pub fn view(mut self, new_value: &str) -> BlogListByUserCall<'a, C, NC, A> { self._view = Some(new_value.to_string()); self @@ -2785,7 +2958,7 @@ impl<'a, C, NC, A> BlogListByUserCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Blog statuses to include in the result (default: Live blogs only). Note that ADMIN access is required to view deleted blogs. + /// Blog statuses to include in the result (default: Live blogs only). Note that ADMIN access is required to view deleted blogs. pub fn add_status(mut self, new_value: &str) -> BlogListByUserCall<'a, C, NC, A> { self._status.push(new_value.to_string()); self @@ -2794,7 +2967,7 @@ impl<'a, C, NC, A> BlogListByUserCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// User access types for blogs to include in the results, e.g. AUTHOR will return blogs where the user has author level access. If no roles are specified, defaults to ADMIN and AUTHOR roles. + /// User access types for blogs to include in the results, e.g. AUTHOR will return blogs where the user has author level access. If no roles are specified, defaults to ADMIN and AUTHOR roles. pub fn add_role(mut self, new_value: &str) -> BlogListByUserCall<'a, C, NC, A> { self._role.push(new_value.to_string()); self @@ -2802,7 +2975,7 @@ impl<'a, C, NC, A> BlogListByUserCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *fetch user info* query property to the given value. /// /// - /// Whether the response is a list of blogs with per-user information instead of just blogs. + /// Whether the response is a list of blogs with per-user information instead of just blogs. pub fn fetch_user_info(mut self, new_value: bool) -> BlogListByUserCall<'a, C, NC, A> { self._fetch_user_info = Some(new_value); self @@ -2863,7 +3036,7 @@ impl<'a, C, NC, A> BlogListByUserCall<'a, C, NC, A> where NC: hyper::net::Networ /// Gets one blog by ID. /// /// A builder for the *get* method supported by a *blog* resource. -/// It is not used directly, but through a `BlogMethods`. +/// It is not used directly, but through a `BlogMethods` instance. /// /// # Example /// @@ -2931,7 +3104,7 @@ impl<'a, C, NC, A> BlogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "blogId", "view", "maxPosts"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2984,7 +3157,7 @@ impl<'a, C, NC, A> BlogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2996,7 +3169,6 @@ impl<'a, C, NC, A> BlogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -3006,7 +3178,7 @@ impl<'a, C, NC, A> BlogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3017,7 +3189,7 @@ impl<'a, C, NC, A> BlogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3026,13 +3198,13 @@ impl<'a, C, NC, A> BlogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3044,7 +3216,7 @@ impl<'a, C, NC, A> BlogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the blog to get. + /// The ID of the blog to get. pub fn blog_id(mut self, new_value: &str) -> BlogGetCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -3052,7 +3224,7 @@ impl<'a, C, NC, A> BlogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *view* query property to the given value. /// /// - /// Access level with which to view the blog. Note that some fields require elevated access. + /// Access level with which to view the blog. Note that some fields require elevated access. pub fn view(mut self, new_value: &str) -> BlogGetCall<'a, C, NC, A> { self._view = Some(new_value.to_string()); self @@ -3060,7 +3232,7 @@ impl<'a, C, NC, A> BlogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *max posts* query property to the given value. /// /// - /// Maximum number of posts to pull back with the blog. + /// Maximum number of posts to pull back with the blog. pub fn max_posts(mut self, new_value: u32) -> BlogGetCall<'a, C, NC, A> { self._max_posts = Some(new_value); self @@ -3121,7 +3293,7 @@ impl<'a, C, NC, A> BlogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Retrieve a Blog by URL. /// /// A builder for the *getByUrl* method supported by a *blog* resource. -/// It is not used directly, but through a `BlogMethods`. +/// It is not used directly, but through a `BlogMethods` instance. /// /// # Example /// @@ -3184,7 +3356,7 @@ impl<'a, C, NC, A> BlogGetByUrlCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "url", "view"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3213,7 +3385,7 @@ impl<'a, C, NC, A> BlogGetByUrlCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3225,7 +3397,6 @@ impl<'a, C, NC, A> BlogGetByUrlCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -3235,7 +3406,7 @@ impl<'a, C, NC, A> BlogGetByUrlCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3246,7 +3417,7 @@ impl<'a, C, NC, A> BlogGetByUrlCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3255,13 +3426,13 @@ impl<'a, C, NC, A> BlogGetByUrlCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3273,7 +3444,7 @@ impl<'a, C, NC, A> BlogGetByUrlCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The URL of the blog to retrieve. + /// The URL of the blog to retrieve. pub fn url(mut self, new_value: &str) -> BlogGetByUrlCall<'a, C, NC, A> { self._url = new_value.to_string(); self @@ -3281,7 +3452,7 @@ impl<'a, C, NC, A> BlogGetByUrlCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *view* query property to the given value. /// /// - /// Access level with which to view the blog. Note that some fields require elevated access. + /// Access level with which to view the blog. Note that some fields require elevated access. pub fn view(mut self, new_value: &str) -> BlogGetByUrlCall<'a, C, NC, A> { self._view = Some(new_value.to_string()); self @@ -3342,7 +3513,7 @@ impl<'a, C, NC, A> BlogGetByUrlCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Update a post. /// /// A builder for the *update* method supported by a *post* resource. -/// It is not used directly, but through a `PostMethods`. +/// It is not used directly, but through a `PostMethods` instance. /// /// # Example /// @@ -3434,7 +3605,7 @@ impl<'a, C, NC, A> PostUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "blogId", "postId", "revert", "publish", "maxComments", "fetchImages", "fetchBody"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3491,7 +3662,7 @@ impl<'a, C, NC, A> PostUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3507,7 +3678,6 @@ impl<'a, C, NC, A> PostUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -3517,7 +3687,7 @@ impl<'a, C, NC, A> PostUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3528,7 +3698,7 @@ impl<'a, C, NC, A> PostUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3537,13 +3707,13 @@ impl<'a, C, NC, A> PostUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3564,7 +3734,7 @@ impl<'a, C, NC, A> PostUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Blog. + /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PostUpdateCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -3574,7 +3744,7 @@ impl<'a, C, NC, A> PostUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Post. + /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> PostUpdateCall<'a, C, NC, A> { self._post_id = new_value.to_string(); self @@ -3582,7 +3752,7 @@ impl<'a, C, NC, A> PostUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *revert* query property to the given value. /// /// - /// Whether a revert action should be performed when the post is updated (default: false). + /// Whether a revert action should be performed when the post is updated (default: false). pub fn revert(mut self, new_value: bool) -> PostUpdateCall<'a, C, NC, A> { self._revert = Some(new_value); self @@ -3590,7 +3760,7 @@ impl<'a, C, NC, A> PostUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *publish* query property to the given value. /// /// - /// Whether a publish action should be performed when the post is updated (default: false). + /// Whether a publish action should be performed when the post is updated (default: false). pub fn publish(mut self, new_value: bool) -> PostUpdateCall<'a, C, NC, A> { self._publish = Some(new_value); self @@ -3598,7 +3768,7 @@ impl<'a, C, NC, A> PostUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *max comments* query property to the given value. /// /// - /// Maximum number of comments to retrieve with the returned post. + /// Maximum number of comments to retrieve with the returned post. pub fn max_comments(mut self, new_value: u32) -> PostUpdateCall<'a, C, NC, A> { self._max_comments = Some(new_value); self @@ -3606,7 +3776,7 @@ impl<'a, C, NC, A> PostUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *fetch images* query property to the given value. /// /// - /// Whether image URL metadata for each post is included in the returned result (default: false). + /// Whether image URL metadata for each post is included in the returned result (default: false). pub fn fetch_images(mut self, new_value: bool) -> PostUpdateCall<'a, C, NC, A> { self._fetch_images = Some(new_value); self @@ -3614,7 +3784,7 @@ impl<'a, C, NC, A> PostUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *fetch body* query property to the given value. /// /// - /// Whether the body content of the post is included with the result (default: true). + /// Whether the body content of the post is included with the result (default: true). pub fn fetch_body(mut self, new_value: bool) -> PostUpdateCall<'a, C, NC, A> { self._fetch_body = Some(new_value); self @@ -3675,7 +3845,7 @@ impl<'a, C, NC, A> PostUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Retrieve a Post by Path. /// /// A builder for the *getByPath* method supported by a *post* resource. -/// It is not used directly, but through a `PostMethods`. +/// It is not used directly, but through a `PostMethods` instance. /// /// # Example /// @@ -3745,7 +3915,7 @@ impl<'a, C, NC, A> PostGetByPathCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "blogId", "path", "view", "maxComments"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3798,7 +3968,7 @@ impl<'a, C, NC, A> PostGetByPathCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3810,7 +3980,6 @@ impl<'a, C, NC, A> PostGetByPathCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -3820,7 +3989,7 @@ impl<'a, C, NC, A> PostGetByPathCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3831,7 +4000,7 @@ impl<'a, C, NC, A> PostGetByPathCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3840,13 +4009,13 @@ impl<'a, C, NC, A> PostGetByPathCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3858,7 +4027,7 @@ impl<'a, C, NC, A> PostGetByPathCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the blog to fetch the post from. + /// ID of the blog to fetch the post from. pub fn blog_id(mut self, new_value: &str) -> PostGetByPathCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -3868,7 +4037,7 @@ impl<'a, C, NC, A> PostGetByPathCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Path of the Post to retrieve. + /// Path of the Post to retrieve. pub fn path(mut self, new_value: &str) -> PostGetByPathCall<'a, C, NC, A> { self._path = new_value.to_string(); self @@ -3876,7 +4045,7 @@ impl<'a, C, NC, A> PostGetByPathCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *view* query property to the given value. /// /// - /// Access level with which to view the returned result. Note that some fields require elevated access. + /// Access level with which to view the returned result. Note that some fields require elevated access. pub fn view(mut self, new_value: &str) -> PostGetByPathCall<'a, C, NC, A> { self._view = Some(new_value.to_string()); self @@ -3884,7 +4053,7 @@ impl<'a, C, NC, A> PostGetByPathCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *max comments* query property to the given value. /// /// - /// Maximum number of comments to pull back on a post. + /// Maximum number of comments to pull back on a post. pub fn max_comments(mut self, new_value: u32) -> PostGetByPathCall<'a, C, NC, A> { self._max_comments = Some(new_value); self @@ -3945,7 +4114,7 @@ impl<'a, C, NC, A> PostGetByPathCall<'a, C, NC, A> where NC: hyper::net::Network /// Get a post by ID. /// /// A builder for the *get* method supported by a *post* resource. -/// It is not used directly, but through a `PostMethods`. +/// It is not used directly, but through a `PostMethods` instance. /// /// # Example /// @@ -4025,7 +4194,7 @@ impl<'a, C, NC, A> PostGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "blogId", "postId", "view", "maxComments", "fetchImages", "fetchBody"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4078,7 +4247,7 @@ impl<'a, C, NC, A> PostGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4090,7 +4259,6 @@ impl<'a, C, NC, A> PostGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -4100,7 +4268,7 @@ impl<'a, C, NC, A> PostGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4111,7 +4279,7 @@ impl<'a, C, NC, A> PostGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4120,13 +4288,13 @@ impl<'a, C, NC, A> PostGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4138,7 +4306,7 @@ impl<'a, C, NC, A> PostGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the blog to fetch the post from. + /// ID of the blog to fetch the post from. pub fn blog_id(mut self, new_value: &str) -> PostGetCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -4148,7 +4316,7 @@ impl<'a, C, NC, A> PostGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the post + /// The ID of the post pub fn post_id(mut self, new_value: &str) -> PostGetCall<'a, C, NC, A> { self._post_id = new_value.to_string(); self @@ -4156,7 +4324,7 @@ impl<'a, C, NC, A> PostGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *view* query property to the given value. /// /// - /// Access level with which to view the returned result. Note that some fields require elevated access. + /// Access level with which to view the returned result. Note that some fields require elevated access. pub fn view(mut self, new_value: &str) -> PostGetCall<'a, C, NC, A> { self._view = Some(new_value.to_string()); self @@ -4164,7 +4332,7 @@ impl<'a, C, NC, A> PostGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *max comments* query property to the given value. /// /// - /// Maximum number of comments to pull back on a post. + /// Maximum number of comments to pull back on a post. pub fn max_comments(mut self, new_value: u32) -> PostGetCall<'a, C, NC, A> { self._max_comments = Some(new_value); self @@ -4172,7 +4340,7 @@ impl<'a, C, NC, A> PostGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *fetch images* query property to the given value. /// /// - /// Whether image URL metadata for each post is included (default: false). + /// Whether image URL metadata for each post is included (default: false). pub fn fetch_images(mut self, new_value: bool) -> PostGetCall<'a, C, NC, A> { self._fetch_images = Some(new_value); self @@ -4180,7 +4348,7 @@ impl<'a, C, NC, A> PostGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *fetch body* query property to the given value. /// /// - /// Whether the body content of the post is included (default: true). This should be set to false when the post bodies are not required, to help minimize traffic. + /// Whether the body content of the post is included (default: true). This should be set to false when the post bodies are not required, to help minimize traffic. pub fn fetch_body(mut self, new_value: bool) -> PostGetCall<'a, C, NC, A> { self._fetch_body = Some(new_value); self @@ -4241,7 +4409,7 @@ impl<'a, C, NC, A> PostGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Add a post. /// /// A builder for the *insert* method supported by a *post* resource. -/// It is not used directly, but through a `PostMethods`. +/// It is not used directly, but through a `PostMethods` instance. /// /// # Example /// @@ -4321,7 +4489,7 @@ impl<'a, C, NC, A> PostInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "blogId", "isDraft", "fetchImages", "fetchBody"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4378,7 +4546,7 @@ impl<'a, C, NC, A> PostInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4394,7 +4562,6 @@ impl<'a, C, NC, A> PostInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -4404,7 +4571,7 @@ impl<'a, C, NC, A> PostInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4415,7 +4582,7 @@ impl<'a, C, NC, A> PostInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4424,13 +4591,13 @@ impl<'a, C, NC, A> PostInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4451,7 +4618,7 @@ impl<'a, C, NC, A> PostInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the blog to add the post to. + /// ID of the blog to add the post to. pub fn blog_id(mut self, new_value: &str) -> PostInsertCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -4459,7 +4626,7 @@ impl<'a, C, NC, A> PostInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *is draft* query property to the given value. /// /// - /// Whether to create the post as a draft (default: false). + /// Whether to create the post as a draft (default: false). pub fn is_draft(mut self, new_value: bool) -> PostInsertCall<'a, C, NC, A> { self._is_draft = Some(new_value); self @@ -4467,7 +4634,7 @@ impl<'a, C, NC, A> PostInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *fetch images* query property to the given value. /// /// - /// Whether image URL metadata for each post is included in the returned result (default: false). + /// Whether image URL metadata for each post is included in the returned result (default: false). pub fn fetch_images(mut self, new_value: bool) -> PostInsertCall<'a, C, NC, A> { self._fetch_images = Some(new_value); self @@ -4475,7 +4642,7 @@ impl<'a, C, NC, A> PostInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *fetch body* query property to the given value. /// /// - /// Whether the body content of the post is included with the result (default: true). + /// Whether the body content of the post is included with the result (default: true). pub fn fetch_body(mut self, new_value: bool) -> PostInsertCall<'a, C, NC, A> { self._fetch_body = Some(new_value); self @@ -4536,7 +4703,7 @@ impl<'a, C, NC, A> PostInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Publishes a draft post, optionally at the specific time of the given publishDate parameter. /// /// A builder for the *publish* method supported by a *post* resource. -/// It is not used directly, but through a `PostMethods`. +/// It is not used directly, but through a `PostMethods` instance. /// /// # Example /// @@ -4601,7 +4768,7 @@ impl<'a, C, NC, A> PostPublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "blogId", "postId", "publishDate"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4654,7 +4821,7 @@ impl<'a, C, NC, A> PostPublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4666,7 +4833,6 @@ impl<'a, C, NC, A> PostPublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -4676,7 +4842,7 @@ impl<'a, C, NC, A> PostPublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4687,7 +4853,7 @@ impl<'a, C, NC, A> PostPublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4696,13 +4862,13 @@ impl<'a, C, NC, A> PostPublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4714,7 +4880,7 @@ impl<'a, C, NC, A> PostPublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Blog. + /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PostPublishCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -4724,7 +4890,7 @@ impl<'a, C, NC, A> PostPublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Post. + /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> PostPublishCall<'a, C, NC, A> { self._post_id = new_value.to_string(); self @@ -4732,7 +4898,7 @@ impl<'a, C, NC, A> PostPublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *publish date* query property to the given value. /// /// - /// Optional date and time to schedule the publishing of the Blog. If no publishDate parameter is given, the post is either published at the a previously saved schedule date (if present), or the current time. If a future date is given, the post will be scheduled to be published. + /// Optional date and time to schedule the publishing of the Blog. If no publishDate parameter is given, the post is either published at the a previously saved schedule date (if present), or the current time. If a future date is given, the post will be scheduled to be published. pub fn publish_date(mut self, new_value: &str) -> PostPublishCall<'a, C, NC, A> { self._publish_date = Some(new_value.to_string()); self @@ -4793,7 +4959,7 @@ impl<'a, C, NC, A> PostPublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Delete a post by ID. /// /// A builder for the *delete* method supported by a *post* resource. -/// It is not used directly, but through a `PostMethods`. +/// It is not used directly, but through a `PostMethods` instance. /// /// # Example /// @@ -4853,7 +5019,7 @@ impl<'a, C, NC, A> PostDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["blogId", "postId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4905,7 +5071,7 @@ impl<'a, C, NC, A> PostDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4917,7 +5083,6 @@ impl<'a, C, NC, A> PostDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -4927,7 +5092,7 @@ impl<'a, C, NC, A> PostDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4938,12 +5103,12 @@ impl<'a, C, NC, A> PostDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4955,7 +5120,7 @@ impl<'a, C, NC, A> PostDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Blog. + /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PostDeleteCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -4965,7 +5130,7 @@ impl<'a, C, NC, A> PostDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Post. + /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> PostDeleteCall<'a, C, NC, A> { self._post_id = new_value.to_string(); self @@ -5026,7 +5191,7 @@ impl<'a, C, NC, A> PostDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Revert a published or scheduled post to draft state. /// /// A builder for the *revert* method supported by a *post* resource. -/// It is not used directly, but through a `PostMethods`. +/// It is not used directly, but through a `PostMethods` instance. /// /// # Example /// @@ -5086,7 +5251,7 @@ impl<'a, C, NC, A> PostRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "blogId", "postId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5139,7 +5304,7 @@ impl<'a, C, NC, A> PostRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5151,7 +5316,6 @@ impl<'a, C, NC, A> PostRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -5161,7 +5325,7 @@ impl<'a, C, NC, A> PostRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5172,7 +5336,7 @@ impl<'a, C, NC, A> PostRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5181,13 +5345,13 @@ impl<'a, C, NC, A> PostRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5199,7 +5363,7 @@ impl<'a, C, NC, A> PostRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Blog. + /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PostRevertCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -5209,7 +5373,7 @@ impl<'a, C, NC, A> PostRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Post. + /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> PostRevertCall<'a, C, NC, A> { self._post_id = new_value.to_string(); self @@ -5270,7 +5434,7 @@ impl<'a, C, NC, A> PostRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Search for a post. /// /// A builder for the *search* method supported by a *post* resource. -/// It is not used directly, but through a `PostMethods`. +/// It is not used directly, but through a `PostMethods` instance. /// /// # Example /// @@ -5340,7 +5504,7 @@ impl<'a, C, NC, A> PostSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "blogId", "q", "orderBy", "fetchBodies"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5393,7 +5557,7 @@ impl<'a, C, NC, A> PostSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5405,7 +5569,6 @@ impl<'a, C, NC, A> PostSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -5415,7 +5578,7 @@ impl<'a, C, NC, A> PostSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5426,7 +5589,7 @@ impl<'a, C, NC, A> PostSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5435,13 +5598,13 @@ impl<'a, C, NC, A> PostSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5453,7 +5616,7 @@ impl<'a, C, NC, A> PostSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the blog to fetch the post from. + /// ID of the blog to fetch the post from. pub fn blog_id(mut self, new_value: &str) -> PostSearchCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -5463,7 +5626,7 @@ impl<'a, C, NC, A> PostSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Query terms to search this blog for matching posts. + /// Query terms to search this blog for matching posts. pub fn q(mut self, new_value: &str) -> PostSearchCall<'a, C, NC, A> { self._q = new_value.to_string(); self @@ -5471,7 +5634,7 @@ impl<'a, C, NC, A> PostSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *order by* query property to the given value. /// /// - /// Sort search results + /// Sort search results pub fn order_by(mut self, new_value: &str) -> PostSearchCall<'a, C, NC, A> { self._order_by = Some(new_value.to_string()); self @@ -5479,7 +5642,7 @@ impl<'a, C, NC, A> PostSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *fetch bodies* query property to the given value. /// /// - /// Whether the body content of posts is included (default: true). This should be set to false when the post bodies are not required, to help minimize traffic. + /// Whether the body content of posts is included (default: true). This should be set to false when the post bodies are not required, to help minimize traffic. pub fn fetch_bodies(mut self, new_value: bool) -> PostSearchCall<'a, C, NC, A> { self._fetch_bodies = Some(new_value); self @@ -5540,7 +5703,7 @@ impl<'a, C, NC, A> PostSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Update a post. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *post* resource. -/// It is not used directly, but through a `PostMethods`. +/// It is not used directly, but through a `PostMethods` instance. /// /// # Example /// @@ -5632,7 +5795,7 @@ impl<'a, C, NC, A> PostPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "blogId", "postId", "revert", "publish", "maxComments", "fetchImages", "fetchBody"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5689,7 +5852,7 @@ impl<'a, C, NC, A> PostPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5705,7 +5868,6 @@ impl<'a, C, NC, A> PostPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -5715,7 +5877,7 @@ impl<'a, C, NC, A> PostPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5726,7 +5888,7 @@ impl<'a, C, NC, A> PostPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5735,13 +5897,13 @@ impl<'a, C, NC, A> PostPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5762,7 +5924,7 @@ impl<'a, C, NC, A> PostPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Blog. + /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PostPatchCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -5772,7 +5934,7 @@ impl<'a, C, NC, A> PostPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Post. + /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> PostPatchCall<'a, C, NC, A> { self._post_id = new_value.to_string(); self @@ -5780,7 +5942,7 @@ impl<'a, C, NC, A> PostPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *revert* query property to the given value. /// /// - /// Whether a revert action should be performed when the post is updated (default: false). + /// Whether a revert action should be performed when the post is updated (default: false). pub fn revert(mut self, new_value: bool) -> PostPatchCall<'a, C, NC, A> { self._revert = Some(new_value); self @@ -5788,7 +5950,7 @@ impl<'a, C, NC, A> PostPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *publish* query property to the given value. /// /// - /// Whether a publish action should be performed when the post is updated (default: false). + /// Whether a publish action should be performed when the post is updated (default: false). pub fn publish(mut self, new_value: bool) -> PostPatchCall<'a, C, NC, A> { self._publish = Some(new_value); self @@ -5796,7 +5958,7 @@ impl<'a, C, NC, A> PostPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *max comments* query property to the given value. /// /// - /// Maximum number of comments to retrieve with the returned post. + /// Maximum number of comments to retrieve with the returned post. pub fn max_comments(mut self, new_value: u32) -> PostPatchCall<'a, C, NC, A> { self._max_comments = Some(new_value); self @@ -5804,7 +5966,7 @@ impl<'a, C, NC, A> PostPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *fetch images* query property to the given value. /// /// - /// Whether image URL metadata for each post is included in the returned result (default: false). + /// Whether image URL metadata for each post is included in the returned result (default: false). pub fn fetch_images(mut self, new_value: bool) -> PostPatchCall<'a, C, NC, A> { self._fetch_images = Some(new_value); self @@ -5812,7 +5974,7 @@ impl<'a, C, NC, A> PostPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *fetch body* query property to the given value. /// /// - /// Whether the body content of the post is included with the result (default: true). + /// Whether the body content of the post is included with the result (default: true). pub fn fetch_body(mut self, new_value: bool) -> PostPatchCall<'a, C, NC, A> { self._fetch_body = Some(new_value); self @@ -5873,7 +6035,7 @@ impl<'a, C, NC, A> PostPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Retrieves a list of posts, possibly filtered. /// /// A builder for the *list* method supported by a *post* resource. -/// It is not used directly, but through a `PostMethods`. +/// It is not used directly, but through a `PostMethods` instance. /// /// # Example /// @@ -5985,7 +6147,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "blogId", "view", "status", "startDate", "pageToken", "orderBy", "maxResults", "labels", "fetchImages", "fetchBodies", "endDate"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6038,7 +6200,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6050,7 +6212,6 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -6060,7 +6221,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6071,7 +6232,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6080,13 +6241,13 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6098,7 +6259,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the blog to fetch posts from. + /// ID of the blog to fetch posts from. pub fn blog_id(mut self, new_value: &str) -> PostListCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -6106,7 +6267,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *view* query property to the given value. /// /// - /// Access level with which to view the returned result. Note that some fields require escalated access. + /// Access level with which to view the returned result. Note that some fields require escalated access. pub fn view(mut self, new_value: &str) -> PostListCall<'a, C, NC, A> { self._view = Some(new_value.to_string()); self @@ -6115,7 +6276,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Statuses to include in the results. + /// Statuses to include in the results. pub fn add_status(mut self, new_value: &str) -> PostListCall<'a, C, NC, A> { self._status.push(new_value.to_string()); self @@ -6123,7 +6284,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *start date* query property to the given value. /// /// - /// Earliest post date to fetch, a date-time with RFC 3339 formatting. + /// Earliest post date to fetch, a date-time with RFC 3339 formatting. pub fn start_date(mut self, new_value: &str) -> PostListCall<'a, C, NC, A> { self._start_date = Some(new_value.to_string()); self @@ -6131,7 +6292,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *page token* query property to the given value. /// /// - /// Continuation token if the request is paged. + /// Continuation token if the request is paged. pub fn page_token(mut self, new_value: &str) -> PostListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -6139,7 +6300,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *order by* query property to the given value. /// /// - /// Sort search results + /// Sort search results pub fn order_by(mut self, new_value: &str) -> PostListCall<'a, C, NC, A> { self._order_by = Some(new_value.to_string()); self @@ -6147,7 +6308,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of posts to fetch. + /// Maximum number of posts to fetch. pub fn max_results(mut self, new_value: u32) -> PostListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -6155,7 +6316,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *labels* query property to the given value. /// /// - /// Comma-separated list of labels to search for. + /// Comma-separated list of labels to search for. pub fn labels(mut self, new_value: &str) -> PostListCall<'a, C, NC, A> { self._labels = Some(new_value.to_string()); self @@ -6163,7 +6324,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *fetch images* query property to the given value. /// /// - /// Whether image URL metadata for each post is included. + /// Whether image URL metadata for each post is included. pub fn fetch_images(mut self, new_value: bool) -> PostListCall<'a, C, NC, A> { self._fetch_images = Some(new_value); self @@ -6171,7 +6332,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *fetch bodies* query property to the given value. /// /// - /// Whether the body content of posts is included (default: true). This should be set to false when the post bodies are not required, to help minimize traffic. + /// Whether the body content of posts is included (default: true). This should be set to false when the post bodies are not required, to help minimize traffic. pub fn fetch_bodies(mut self, new_value: bool) -> PostListCall<'a, C, NC, A> { self._fetch_bodies = Some(new_value); self @@ -6179,7 +6340,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *end date* query property to the given value. /// /// - /// Latest post date to fetch, a date-time with RFC 3339 formatting. + /// Latest post date to fetch, a date-time with RFC 3339 formatting. pub fn end_date(mut self, new_value: &str) -> PostListCall<'a, C, NC, A> { self._end_date = Some(new_value.to_string()); self @@ -6240,7 +6401,7 @@ impl<'a, C, NC, A> PostListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Gets one comment by ID. /// /// A builder for the *get* method supported by a *comment* resource. -/// It is not used directly, but through a `CommentMethods`. +/// It is not used directly, but through a `CommentMethods` instance. /// /// # Example /// @@ -6307,7 +6468,7 @@ impl<'a, C, NC, A> CommentGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "blogId", "postId", "commentId", "view"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6360,7 +6521,7 @@ impl<'a, C, NC, A> CommentGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6372,7 +6533,6 @@ impl<'a, C, NC, A> CommentGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -6382,7 +6542,7 @@ impl<'a, C, NC, A> CommentGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6393,7 +6553,7 @@ impl<'a, C, NC, A> CommentGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6402,13 +6562,13 @@ impl<'a, C, NC, A> CommentGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6420,7 +6580,7 @@ impl<'a, C, NC, A> CommentGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the blog to containing the comment. + /// ID of the blog to containing the comment. pub fn blog_id(mut self, new_value: &str) -> CommentGetCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -6430,7 +6590,7 @@ impl<'a, C, NC, A> CommentGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the post to fetch posts from. + /// ID of the post to fetch posts from. pub fn post_id(mut self, new_value: &str) -> CommentGetCall<'a, C, NC, A> { self._post_id = new_value.to_string(); self @@ -6440,7 +6600,7 @@ impl<'a, C, NC, A> CommentGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the comment to get. + /// The ID of the comment to get. pub fn comment_id(mut self, new_value: &str) -> CommentGetCall<'a, C, NC, A> { self._comment_id = new_value.to_string(); self @@ -6448,7 +6608,7 @@ impl<'a, C, NC, A> CommentGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *view* query property to the given value. /// /// - /// Access level for the requested comment (default: READER). Note that some comments will require elevated permissions, for example comments where the parent posts which is in a draft state, or comments that are pending moderation. + /// Access level for the requested comment (default: READER). Note that some comments will require elevated permissions, for example comments where the parent posts which is in a draft state, or comments that are pending moderation. pub fn view(mut self, new_value: &str) -> CommentGetCall<'a, C, NC, A> { self._view = Some(new_value.to_string()); self @@ -6509,7 +6669,7 @@ impl<'a, C, NC, A> CommentGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Removes the content of a comment. /// /// A builder for the *removeContent* method supported by a *comment* resource. -/// It is not used directly, but through a `CommentMethods`. +/// It is not used directly, but through a `CommentMethods` instance. /// /// # Example /// @@ -6571,7 +6731,7 @@ impl<'a, C, NC, A> CommentRemoveContentCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "blogId", "postId", "commentId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6624,7 +6784,7 @@ impl<'a, C, NC, A> CommentRemoveContentCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6636,7 +6796,6 @@ impl<'a, C, NC, A> CommentRemoveContentCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -6646,7 +6805,7 @@ impl<'a, C, NC, A> CommentRemoveContentCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6657,7 +6816,7 @@ impl<'a, C, NC, A> CommentRemoveContentCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6666,13 +6825,13 @@ impl<'a, C, NC, A> CommentRemoveContentCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6684,7 +6843,7 @@ impl<'a, C, NC, A> CommentRemoveContentCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Blog. + /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> CommentRemoveContentCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -6694,7 +6853,7 @@ impl<'a, C, NC, A> CommentRemoveContentCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Post. + /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> CommentRemoveContentCall<'a, C, NC, A> { self._post_id = new_value.to_string(); self @@ -6704,7 +6863,7 @@ impl<'a, C, NC, A> CommentRemoveContentCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the comment to delete content from. + /// The ID of the comment to delete content from. pub fn comment_id(mut self, new_value: &str) -> CommentRemoveContentCall<'a, C, NC, A> { self._comment_id = new_value.to_string(); self @@ -6765,7 +6924,7 @@ impl<'a, C, NC, A> CommentRemoveContentCall<'a, C, NC, A> where NC: hyper::net:: /// Retrieves the comments for a blog, across all posts, possibly filtered. /// /// A builder for the *listByBlog* method supported by a *comment* resource. -/// It is not used directly, but through a `CommentMethods`. +/// It is not used directly, but through a `CommentMethods` instance. /// /// # Example /// @@ -6857,7 +7016,7 @@ impl<'a, C, NC, A> CommentListByBlogCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "blogId", "status", "startDate", "pageToken", "maxResults", "fetchBodies", "endDate"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6910,7 +7069,7 @@ impl<'a, C, NC, A> CommentListByBlogCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6922,7 +7081,6 @@ impl<'a, C, NC, A> CommentListByBlogCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -6932,7 +7090,7 @@ impl<'a, C, NC, A> CommentListByBlogCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6943,7 +7101,7 @@ impl<'a, C, NC, A> CommentListByBlogCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6952,13 +7110,13 @@ impl<'a, C, NC, A> CommentListByBlogCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6970,7 +7128,7 @@ impl<'a, C, NC, A> CommentListByBlogCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the blog to fetch comments from. + /// ID of the blog to fetch comments from. pub fn blog_id(mut self, new_value: &str) -> CommentListByBlogCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -6986,7 +7144,7 @@ impl<'a, C, NC, A> CommentListByBlogCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *start date* query property to the given value. /// /// - /// Earliest date of comment to fetch, a date-time with RFC 3339 formatting. + /// Earliest date of comment to fetch, a date-time with RFC 3339 formatting. pub fn start_date(mut self, new_value: &str) -> CommentListByBlogCall<'a, C, NC, A> { self._start_date = Some(new_value.to_string()); self @@ -6994,7 +7152,7 @@ impl<'a, C, NC, A> CommentListByBlogCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *page token* query property to the given value. /// /// - /// Continuation token if request is paged. + /// Continuation token if request is paged. pub fn page_token(mut self, new_value: &str) -> CommentListByBlogCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -7002,7 +7160,7 @@ impl<'a, C, NC, A> CommentListByBlogCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of comments to include in the result. + /// Maximum number of comments to include in the result. pub fn max_results(mut self, new_value: u32) -> CommentListByBlogCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -7010,7 +7168,7 @@ impl<'a, C, NC, A> CommentListByBlogCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *fetch bodies* query property to the given value. /// /// - /// Whether the body content of the comments is included. + /// Whether the body content of the comments is included. pub fn fetch_bodies(mut self, new_value: bool) -> CommentListByBlogCall<'a, C, NC, A> { self._fetch_bodies = Some(new_value); self @@ -7018,7 +7176,7 @@ impl<'a, C, NC, A> CommentListByBlogCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *end date* query property to the given value. /// /// - /// Latest date of comment to fetch, a date-time with RFC 3339 formatting. + /// Latest date of comment to fetch, a date-time with RFC 3339 formatting. pub fn end_date(mut self, new_value: &str) -> CommentListByBlogCall<'a, C, NC, A> { self._end_date = Some(new_value.to_string()); self @@ -7079,7 +7237,7 @@ impl<'a, C, NC, A> CommentListByBlogCall<'a, C, NC, A> where NC: hyper::net::Net /// Marks a comment as spam. /// /// A builder for the *markAsSpam* method supported by a *comment* resource. -/// It is not used directly, but through a `CommentMethods`. +/// It is not used directly, but through a `CommentMethods` instance. /// /// # Example /// @@ -7141,7 +7299,7 @@ impl<'a, C, NC, A> CommentMarkAsSpamCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "blogId", "postId", "commentId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7194,7 +7352,7 @@ impl<'a, C, NC, A> CommentMarkAsSpamCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7206,7 +7364,6 @@ impl<'a, C, NC, A> CommentMarkAsSpamCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -7216,7 +7373,7 @@ impl<'a, C, NC, A> CommentMarkAsSpamCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7227,7 +7384,7 @@ impl<'a, C, NC, A> CommentMarkAsSpamCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7236,13 +7393,13 @@ impl<'a, C, NC, A> CommentMarkAsSpamCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7254,7 +7411,7 @@ impl<'a, C, NC, A> CommentMarkAsSpamCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Blog. + /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> CommentMarkAsSpamCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -7264,7 +7421,7 @@ impl<'a, C, NC, A> CommentMarkAsSpamCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Post. + /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> CommentMarkAsSpamCall<'a, C, NC, A> { self._post_id = new_value.to_string(); self @@ -7274,7 +7431,7 @@ impl<'a, C, NC, A> CommentMarkAsSpamCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the comment to mark as spam. + /// The ID of the comment to mark as spam. pub fn comment_id(mut self, new_value: &str) -> CommentMarkAsSpamCall<'a, C, NC, A> { self._comment_id = new_value.to_string(); self @@ -7335,7 +7492,7 @@ impl<'a, C, NC, A> CommentMarkAsSpamCall<'a, C, NC, A> where NC: hyper::net::Net /// Retrieves the comments for a post, possibly filtered. /// /// A builder for the *list* method supported by a *comment* resource. -/// It is not used directly, but through a `CommentMethods`. +/// It is not used directly, but through a `CommentMethods` instance. /// /// # Example /// @@ -7434,7 +7591,7 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "blogId", "postId", "view", "status", "startDate", "pageToken", "maxResults", "fetchBodies", "endDate"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7487,7 +7644,7 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7499,7 +7656,6 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -7509,7 +7665,7 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7520,7 +7676,7 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7529,13 +7685,13 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7547,7 +7703,7 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the blog to fetch comments from. + /// ID of the blog to fetch comments from. pub fn blog_id(mut self, new_value: &str) -> CommentListCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -7557,7 +7713,7 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the post to fetch posts from. + /// ID of the post to fetch posts from. pub fn post_id(mut self, new_value: &str) -> CommentListCall<'a, C, NC, A> { self._post_id = new_value.to_string(); self @@ -7565,7 +7721,7 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *view* query property to the given value. /// /// - /// Access level with which to view the returned result. Note that some fields require elevated access. + /// Access level with which to view the returned result. Note that some fields require elevated access. pub fn view(mut self, new_value: &str) -> CommentListCall<'a, C, NC, A> { self._view = Some(new_value.to_string()); self @@ -7581,7 +7737,7 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *start date* query property to the given value. /// /// - /// Earliest date of comment to fetch, a date-time with RFC 3339 formatting. + /// Earliest date of comment to fetch, a date-time with RFC 3339 formatting. pub fn start_date(mut self, new_value: &str) -> CommentListCall<'a, C, NC, A> { self._start_date = Some(new_value.to_string()); self @@ -7589,7 +7745,7 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *page token* query property to the given value. /// /// - /// Continuation token if request is paged. + /// Continuation token if request is paged. pub fn page_token(mut self, new_value: &str) -> CommentListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -7597,7 +7753,7 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of comments to include in the result. + /// Maximum number of comments to include in the result. pub fn max_results(mut self, new_value: u32) -> CommentListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -7605,7 +7761,7 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *fetch bodies* query property to the given value. /// /// - /// Whether the body content of the comments is included. + /// Whether the body content of the comments is included. pub fn fetch_bodies(mut self, new_value: bool) -> CommentListCall<'a, C, NC, A> { self._fetch_bodies = Some(new_value); self @@ -7613,7 +7769,7 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *end date* query property to the given value. /// /// - /// Latest date of comment to fetch, a date-time with RFC 3339 formatting. + /// Latest date of comment to fetch, a date-time with RFC 3339 formatting. pub fn end_date(mut self, new_value: &str) -> CommentListCall<'a, C, NC, A> { self._end_date = Some(new_value.to_string()); self @@ -7674,7 +7830,7 @@ impl<'a, C, NC, A> CommentListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Marks a comment as not spam. /// /// A builder for the *approve* method supported by a *comment* resource. -/// It is not used directly, but through a `CommentMethods`. +/// It is not used directly, but through a `CommentMethods` instance. /// /// # Example /// @@ -7736,7 +7892,7 @@ impl<'a, C, NC, A> CommentApproveCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "blogId", "postId", "commentId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7789,7 +7945,7 @@ impl<'a, C, NC, A> CommentApproveCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7801,7 +7957,6 @@ impl<'a, C, NC, A> CommentApproveCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -7811,7 +7966,7 @@ impl<'a, C, NC, A> CommentApproveCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7822,7 +7977,7 @@ impl<'a, C, NC, A> CommentApproveCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7831,13 +7986,13 @@ impl<'a, C, NC, A> CommentApproveCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7849,7 +8004,7 @@ impl<'a, C, NC, A> CommentApproveCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Blog. + /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> CommentApproveCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -7859,7 +8014,7 @@ impl<'a, C, NC, A> CommentApproveCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Post. + /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> CommentApproveCall<'a, C, NC, A> { self._post_id = new_value.to_string(); self @@ -7869,7 +8024,7 @@ impl<'a, C, NC, A> CommentApproveCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the comment to mark as not spam. + /// The ID of the comment to mark as not spam. pub fn comment_id(mut self, new_value: &str) -> CommentApproveCall<'a, C, NC, A> { self._comment_id = new_value.to_string(); self @@ -7930,7 +8085,7 @@ impl<'a, C, NC, A> CommentApproveCall<'a, C, NC, A> where NC: hyper::net::Networ /// Delete a comment by ID. /// /// A builder for the *delete* method supported by a *comment* resource. -/// It is not used directly, but through a `CommentMethods`. +/// It is not used directly, but through a `CommentMethods` instance. /// /// # Example /// @@ -7992,7 +8147,7 @@ impl<'a, C, NC, A> CommentDeleteCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["blogId", "postId", "commentId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8044,7 +8199,7 @@ impl<'a, C, NC, A> CommentDeleteCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8056,7 +8211,6 @@ impl<'a, C, NC, A> CommentDeleteCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -8066,7 +8220,7 @@ impl<'a, C, NC, A> CommentDeleteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8077,12 +8231,12 @@ impl<'a, C, NC, A> CommentDeleteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8094,7 +8248,7 @@ impl<'a, C, NC, A> CommentDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Blog. + /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> CommentDeleteCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -8104,7 +8258,7 @@ impl<'a, C, NC, A> CommentDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Post. + /// The ID of the Post. pub fn post_id(mut self, new_value: &str) -> CommentDeleteCall<'a, C, NC, A> { self._post_id = new_value.to_string(); self @@ -8114,7 +8268,7 @@ impl<'a, C, NC, A> CommentDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the comment to delete. + /// The ID of the comment to delete. pub fn comment_id(mut self, new_value: &str) -> CommentDeleteCall<'a, C, NC, A> { self._comment_id = new_value.to_string(); self @@ -8175,7 +8329,7 @@ impl<'a, C, NC, A> CommentDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Gets one post and user info pair, by post ID and user ID. The post user info contains per-user information about the post, such as access rights, specific to the user. /// /// A builder for the *get* method supported by a *postUserInfo* resource. -/// It is not used directly, but through a `PostUserInfoMethods`. +/// It is not used directly, but through a `PostUserInfoMethods` instance. /// /// # Example /// @@ -8242,7 +8396,7 @@ impl<'a, C, NC, A> PostUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "userId", "blogId", "postId", "maxComments"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8295,7 +8449,7 @@ impl<'a, C, NC, A> PostUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8307,7 +8461,6 @@ impl<'a, C, NC, A> PostUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -8317,7 +8470,7 @@ impl<'a, C, NC, A> PostUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8328,7 +8481,7 @@ impl<'a, C, NC, A> PostUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8337,13 +8490,13 @@ impl<'a, C, NC, A> PostUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8355,7 +8508,7 @@ impl<'a, C, NC, A> PostUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. + /// ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. pub fn user_id(mut self, new_value: &str) -> PostUserInfoGetCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -8365,7 +8518,7 @@ impl<'a, C, NC, A> PostUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the blog. + /// The ID of the blog. pub fn blog_id(mut self, new_value: &str) -> PostUserInfoGetCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -8375,7 +8528,7 @@ impl<'a, C, NC, A> PostUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the post to get. + /// The ID of the post to get. pub fn post_id(mut self, new_value: &str) -> PostUserInfoGetCall<'a, C, NC, A> { self._post_id = new_value.to_string(); self @@ -8383,7 +8536,7 @@ impl<'a, C, NC, A> PostUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *max comments* query property to the given value. /// /// - /// Maximum number of comments to pull back on a post. + /// Maximum number of comments to pull back on a post. pub fn max_comments(mut self, new_value: u32) -> PostUserInfoGetCall<'a, C, NC, A> { self._max_comments = Some(new_value); self @@ -8444,7 +8597,7 @@ impl<'a, C, NC, A> PostUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Retrieves a list of post and post user info pairs, possibly filtered. The post user info contains per-user information about the post, such as access rights, specific to the user. /// /// A builder for the *list* method supported by a *postUserInfo* resource. -/// It is not used directly, but through a `PostUserInfoMethods`. +/// It is not used directly, but through a `PostUserInfoMethods` instance. /// /// # Example /// @@ -8553,7 +8706,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "userId", "blogId", "view", "status", "startDate", "pageToken", "orderBy", "maxResults", "labels", "fetchBodies", "endDate"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8606,7 +8759,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8618,7 +8771,6 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -8628,7 +8780,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8639,7 +8791,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8648,13 +8800,13 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8666,7 +8818,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. + /// ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. pub fn user_id(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -8676,7 +8828,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the blog to fetch posts from. + /// ID of the blog to fetch posts from. pub fn blog_id(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -8684,7 +8836,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *view* query property to the given value. /// /// - /// Access level with which to view the returned result. Note that some fields require elevated access. + /// Access level with which to view the returned result. Note that some fields require elevated access. pub fn view(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, NC, A> { self._view = Some(new_value.to_string()); self @@ -8700,7 +8852,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *start date* query property to the given value. /// /// - /// Earliest post date to fetch, a date-time with RFC 3339 formatting. + /// Earliest post date to fetch, a date-time with RFC 3339 formatting. pub fn start_date(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, NC, A> { self._start_date = Some(new_value.to_string()); self @@ -8708,7 +8860,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *page token* query property to the given value. /// /// - /// Continuation token if the request is paged. + /// Continuation token if the request is paged. pub fn page_token(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -8716,7 +8868,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *order by* query property to the given value. /// /// - /// Sort order applied to search results. Default is published. + /// Sort order applied to search results. Default is published. pub fn order_by(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, NC, A> { self._order_by = Some(new_value.to_string()); self @@ -8724,7 +8876,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of posts to fetch. + /// Maximum number of posts to fetch. pub fn max_results(mut self, new_value: u32) -> PostUserInfoListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -8732,7 +8884,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *labels* query property to the given value. /// /// - /// Comma-separated list of labels to search for. + /// Comma-separated list of labels to search for. pub fn labels(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, NC, A> { self._labels = Some(new_value.to_string()); self @@ -8740,7 +8892,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *fetch bodies* query property to the given value. /// /// - /// Whether the body content of posts is included. Default is false. + /// Whether the body content of posts is included. Default is false. pub fn fetch_bodies(mut self, new_value: bool) -> PostUserInfoListCall<'a, C, NC, A> { self._fetch_bodies = Some(new_value); self @@ -8748,7 +8900,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *end date* query property to the given value. /// /// - /// Latest post date to fetch, a date-time with RFC 3339 formatting. + /// Latest post date to fetch, a date-time with RFC 3339 formatting. pub fn end_date(mut self, new_value: &str) -> PostUserInfoListCall<'a, C, NC, A> { self._end_date = Some(new_value.to_string()); self @@ -8809,7 +8961,7 @@ impl<'a, C, NC, A> PostUserInfoListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Gets one blog and user info pair by blogId and userId. /// /// A builder for the *get* method supported by a *blogUserInfo* resource. -/// It is not used directly, but through a `BlogUserInfoMethods`. +/// It is not used directly, but through a `BlogUserInfoMethods` instance. /// /// # Example /// @@ -8874,7 +9026,7 @@ impl<'a, C, NC, A> BlogUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "userId", "blogId", "maxPosts"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8927,7 +9079,7 @@ impl<'a, C, NC, A> BlogUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8939,7 +9091,6 @@ impl<'a, C, NC, A> BlogUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -8949,7 +9100,7 @@ impl<'a, C, NC, A> BlogUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8960,7 +9111,7 @@ impl<'a, C, NC, A> BlogUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8969,13 +9120,13 @@ impl<'a, C, NC, A> BlogUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8987,7 +9138,7 @@ impl<'a, C, NC, A> BlogUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. + /// ID of the user whose blogs are to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. pub fn user_id(mut self, new_value: &str) -> BlogUserInfoGetCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -8997,7 +9148,7 @@ impl<'a, C, NC, A> BlogUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the blog to get. + /// The ID of the blog to get. pub fn blog_id(mut self, new_value: &str) -> BlogUserInfoGetCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -9005,7 +9156,7 @@ impl<'a, C, NC, A> BlogUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *max posts* query property to the given value. /// /// - /// Maximum number of posts to pull back with the blog. + /// Maximum number of posts to pull back with the blog. pub fn max_posts(mut self, new_value: u32) -> BlogUserInfoGetCall<'a, C, NC, A> { self._max_posts = Some(new_value); self @@ -9066,7 +9217,7 @@ impl<'a, C, NC, A> BlogUserInfoGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Gets one blog page by ID. /// /// A builder for the *get* method supported by a *page* resource. -/// It is not used directly, but through a `PageMethods`. +/// It is not used directly, but through a `PageMethods` instance. /// /// # Example /// @@ -9131,7 +9282,7 @@ impl<'a, C, NC, A> PageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "blogId", "pageId", "view"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9184,7 +9335,7 @@ impl<'a, C, NC, A> PageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9196,7 +9347,6 @@ impl<'a, C, NC, A> PageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -9206,7 +9356,7 @@ impl<'a, C, NC, A> PageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9217,7 +9367,7 @@ impl<'a, C, NC, A> PageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9226,13 +9376,13 @@ impl<'a, C, NC, A> PageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9244,7 +9394,7 @@ impl<'a, C, NC, A> PageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the blog containing the page. + /// ID of the blog containing the page. pub fn blog_id(mut self, new_value: &str) -> PageGetCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -9254,7 +9404,7 @@ impl<'a, C, NC, A> PageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the page to get. + /// The ID of the page to get. pub fn page_id(mut self, new_value: &str) -> PageGetCall<'a, C, NC, A> { self._page_id = new_value.to_string(); self @@ -9322,7 +9472,7 @@ impl<'a, C, NC, A> PageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Retrieves the pages for a blog, optionally including non-LIVE statuses. /// /// A builder for the *list* method supported by a *page* resource. -/// It is not used directly, but through a `PageMethods`. +/// It is not used directly, but through a `PageMethods` instance. /// /// # Example /// @@ -9409,7 +9559,7 @@ impl<'a, C, NC, A> PageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "blogId", "view", "status", "pageToken", "maxResults", "fetchBodies"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9462,7 +9612,7 @@ impl<'a, C, NC, A> PageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9474,7 +9624,6 @@ impl<'a, C, NC, A> PageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -9484,7 +9633,7 @@ impl<'a, C, NC, A> PageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9495,7 +9644,7 @@ impl<'a, C, NC, A> PageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9504,13 +9653,13 @@ impl<'a, C, NC, A> PageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9522,7 +9671,7 @@ impl<'a, C, NC, A> PageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the blog to fetch Pages from. + /// ID of the blog to fetch Pages from. pub fn blog_id(mut self, new_value: &str) -> PageListCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -9530,7 +9679,7 @@ impl<'a, C, NC, A> PageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *view* query property to the given value. /// /// - /// Access level with which to view the returned result. Note that some fields require elevated access. + /// Access level with which to view the returned result. Note that some fields require elevated access. pub fn view(mut self, new_value: &str) -> PageListCall<'a, C, NC, A> { self._view = Some(new_value.to_string()); self @@ -9546,7 +9695,7 @@ impl<'a, C, NC, A> PageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *page token* query property to the given value. /// /// - /// Continuation token if the request is paged. + /// Continuation token if the request is paged. pub fn page_token(mut self, new_value: &str) -> PageListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -9554,7 +9703,7 @@ impl<'a, C, NC, A> PageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of Pages to fetch. + /// Maximum number of Pages to fetch. pub fn max_results(mut self, new_value: u32) -> PageListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -9562,7 +9711,7 @@ impl<'a, C, NC, A> PageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *fetch bodies* query property to the given value. /// /// - /// Whether to retrieve the Page bodies. + /// Whether to retrieve the Page bodies. pub fn fetch_bodies(mut self, new_value: bool) -> PageListCall<'a, C, NC, A> { self._fetch_bodies = Some(new_value); self @@ -9623,7 +9772,7 @@ impl<'a, C, NC, A> PageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Revert a published or scheduled page to draft state. /// /// A builder for the *revert* method supported by a *page* resource. -/// It is not used directly, but through a `PageMethods`. +/// It is not used directly, but through a `PageMethods` instance. /// /// # Example /// @@ -9683,7 +9832,7 @@ impl<'a, C, NC, A> PageRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "blogId", "pageId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9736,7 +9885,7 @@ impl<'a, C, NC, A> PageRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9748,7 +9897,6 @@ impl<'a, C, NC, A> PageRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -9758,7 +9906,7 @@ impl<'a, C, NC, A> PageRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9769,7 +9917,7 @@ impl<'a, C, NC, A> PageRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9778,13 +9926,13 @@ impl<'a, C, NC, A> PageRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9796,7 +9944,7 @@ impl<'a, C, NC, A> PageRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the blog. + /// The ID of the blog. pub fn blog_id(mut self, new_value: &str) -> PageRevertCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -9806,7 +9954,7 @@ impl<'a, C, NC, A> PageRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the page. + /// The ID of the page. pub fn page_id(mut self, new_value: &str) -> PageRevertCall<'a, C, NC, A> { self._page_id = new_value.to_string(); self @@ -9867,7 +10015,7 @@ impl<'a, C, NC, A> PageRevertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Add a page. /// /// A builder for the *insert* method supported by a *page* resource. -/// It is not used directly, but through a `PageMethods`. +/// It is not used directly, but through a `PageMethods` instance. /// /// # Example /// @@ -9937,7 +10085,7 @@ impl<'a, C, NC, A> PageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "blogId", "isDraft"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9994,7 +10142,7 @@ impl<'a, C, NC, A> PageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10010,7 +10158,6 @@ impl<'a, C, NC, A> PageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -10020,7 +10167,7 @@ impl<'a, C, NC, A> PageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10031,7 +10178,7 @@ impl<'a, C, NC, A> PageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10040,13 +10187,13 @@ impl<'a, C, NC, A> PageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10067,7 +10214,7 @@ impl<'a, C, NC, A> PageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the blog to add the page to. + /// ID of the blog to add the page to. pub fn blog_id(mut self, new_value: &str) -> PageInsertCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -10075,7 +10222,7 @@ impl<'a, C, NC, A> PageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *is draft* query property to the given value. /// /// - /// Whether to create the page as a draft (default: false). + /// Whether to create the page as a draft (default: false). pub fn is_draft(mut self, new_value: bool) -> PageInsertCall<'a, C, NC, A> { self._is_draft = Some(new_value); self @@ -10136,7 +10283,7 @@ impl<'a, C, NC, A> PageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Update a page. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *page* resource. -/// It is not used directly, but through a `PageMethods`. +/// It is not used directly, but through a `PageMethods` instance. /// /// # Example /// @@ -10213,7 +10360,7 @@ impl<'a, C, NC, A> PagePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "blogId", "pageId", "revert", "publish"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10270,7 +10417,7 @@ impl<'a, C, NC, A> PagePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10286,7 +10433,6 @@ impl<'a, C, NC, A> PagePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -10296,7 +10442,7 @@ impl<'a, C, NC, A> PagePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10307,7 +10453,7 @@ impl<'a, C, NC, A> PagePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10316,13 +10462,13 @@ impl<'a, C, NC, A> PagePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10343,7 +10489,7 @@ impl<'a, C, NC, A> PagePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Blog. + /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PagePatchCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -10353,7 +10499,7 @@ impl<'a, C, NC, A> PagePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Page. + /// The ID of the Page. pub fn page_id(mut self, new_value: &str) -> PagePatchCall<'a, C, NC, A> { self._page_id = new_value.to_string(); self @@ -10361,7 +10507,7 @@ impl<'a, C, NC, A> PagePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *revert* query property to the given value. /// /// - /// Whether a revert action should be performed when the page is updated (default: false). + /// Whether a revert action should be performed when the page is updated (default: false). pub fn revert(mut self, new_value: bool) -> PagePatchCall<'a, C, NC, A> { self._revert = Some(new_value); self @@ -10369,7 +10515,7 @@ impl<'a, C, NC, A> PagePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *publish* query property to the given value. /// /// - /// Whether a publish action should be performed when the page is updated (default: false). + /// Whether a publish action should be performed when the page is updated (default: false). pub fn publish(mut self, new_value: bool) -> PagePatchCall<'a, C, NC, A> { self._publish = Some(new_value); self @@ -10430,7 +10576,7 @@ impl<'a, C, NC, A> PagePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Publishes a draft page. /// /// A builder for the *publish* method supported by a *page* resource. -/// It is not used directly, but through a `PageMethods`. +/// It is not used directly, but through a `PageMethods` instance. /// /// # Example /// @@ -10490,7 +10636,7 @@ impl<'a, C, NC, A> PagePublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "blogId", "pageId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10543,7 +10689,7 @@ impl<'a, C, NC, A> PagePublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10555,7 +10701,6 @@ impl<'a, C, NC, A> PagePublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -10565,7 +10710,7 @@ impl<'a, C, NC, A> PagePublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10576,7 +10721,7 @@ impl<'a, C, NC, A> PagePublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10585,13 +10730,13 @@ impl<'a, C, NC, A> PagePublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10603,7 +10748,7 @@ impl<'a, C, NC, A> PagePublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the blog. + /// The ID of the blog. pub fn blog_id(mut self, new_value: &str) -> PagePublishCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -10613,7 +10758,7 @@ impl<'a, C, NC, A> PagePublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the page. + /// The ID of the page. pub fn page_id(mut self, new_value: &str) -> PagePublishCall<'a, C, NC, A> { self._page_id = new_value.to_string(); self @@ -10674,7 +10819,7 @@ impl<'a, C, NC, A> PagePublishCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Update a page. /// /// A builder for the *update* method supported by a *page* resource. -/// It is not used directly, but through a `PageMethods`. +/// It is not used directly, but through a `PageMethods` instance. /// /// # Example /// @@ -10751,7 +10896,7 @@ impl<'a, C, NC, A> PageUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "blogId", "pageId", "revert", "publish"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10808,7 +10953,7 @@ impl<'a, C, NC, A> PageUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10824,7 +10969,6 @@ impl<'a, C, NC, A> PageUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -10834,7 +10978,7 @@ impl<'a, C, NC, A> PageUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10845,7 +10989,7 @@ impl<'a, C, NC, A> PageUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10854,13 +10998,13 @@ impl<'a, C, NC, A> PageUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10881,7 +11025,7 @@ impl<'a, C, NC, A> PageUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Blog. + /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PageUpdateCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -10891,7 +11035,7 @@ impl<'a, C, NC, A> PageUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Page. + /// The ID of the Page. pub fn page_id(mut self, new_value: &str) -> PageUpdateCall<'a, C, NC, A> { self._page_id = new_value.to_string(); self @@ -10899,7 +11043,7 @@ impl<'a, C, NC, A> PageUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *revert* query property to the given value. /// /// - /// Whether a revert action should be performed when the page is updated (default: false). + /// Whether a revert action should be performed when the page is updated (default: false). pub fn revert(mut self, new_value: bool) -> PageUpdateCall<'a, C, NC, A> { self._revert = Some(new_value); self @@ -10907,7 +11051,7 @@ impl<'a, C, NC, A> PageUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *publish* query property to the given value. /// /// - /// Whether a publish action should be performed when the page is updated (default: false). + /// Whether a publish action should be performed when the page is updated (default: false). pub fn publish(mut self, new_value: bool) -> PageUpdateCall<'a, C, NC, A> { self._publish = Some(new_value); self @@ -10968,7 +11112,7 @@ impl<'a, C, NC, A> PageUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Delete a page by ID. /// /// A builder for the *delete* method supported by a *page* resource. -/// It is not used directly, but through a `PageMethods`. +/// It is not used directly, but through a `PageMethods` instance. /// /// # Example /// @@ -11028,7 +11172,7 @@ impl<'a, C, NC, A> PageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["blogId", "pageId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11080,7 +11224,7 @@ impl<'a, C, NC, A> PageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11092,7 +11236,6 @@ impl<'a, C, NC, A> PageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -11102,7 +11245,7 @@ impl<'a, C, NC, A> PageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11113,12 +11256,12 @@ impl<'a, C, NC, A> PageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11130,7 +11273,7 @@ impl<'a, C, NC, A> PageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Blog. + /// The ID of the Blog. pub fn blog_id(mut self, new_value: &str) -> PageDeleteCall<'a, C, NC, A> { self._blog_id = new_value.to_string(); self @@ -11140,7 +11283,7 @@ impl<'a, C, NC, A> PageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the Page. + /// The ID of the Page. pub fn page_id(mut self, new_value: &str) -> PageDeleteCall<'a, C, NC, A> { self._page_id = new_value.to_string(); self diff --git a/gen/books1/Cargo.toml b/gen/books1/Cargo.toml index 1db0b1716a..ac9fa05577 100644 --- a/gen/books1/Cargo.toml +++ b/gen/books1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-books1" -version = "0.1.1+20150309" +version = "0.1.2+20150309" authors = ["Sebastian Thiel "] description = "A complete library to interact with books (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/books1" @@ -16,7 +16,7 @@ keywords = ["books", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/books1/README.md b/gen/books1/README.md index a09dc6f078..088d98447e 100644 --- a/gen/books1/README.md +++ b/gen/books1/README.md @@ -1,11 +1,11 @@ The `google-books1` library allows access to all features of the *Google books* service. -This documentation was generated from *books* crate version *0.1.1+20150309*, where *20150309* is the exact revision of the *books:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *books* crate version *0.1.2+20150309*, where *20150309* is the exact revision of the *books:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *books* *v1* API can be found at the [official documentation site](https://developers.google.com/books/docs/v1/getting_started). @@ -41,6 +41,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-books1/struct.Books.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-books1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-books1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-books1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -50,6 +52,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-books1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -91,7 +95,7 @@ google-books1 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-books1" as books1; -use books1::Result; +use books1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use books1::Books; @@ -127,15 +131,17 @@ let result = hub.volumes().list("q") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -148,7 +154,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-books1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-books1/trait.ResponseResult.html), it will return that by default. @@ -171,8 +177,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-books1/trait.D ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-books1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-books1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-books1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-books1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-books1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/books1/src/cmn.rs b/gen/books1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/books1/src/cmn.rs +++ b/gen/books1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/books1/src/lib.rs b/gen/books1/src/lib.rs index 97c9aa0c53..cc01b8c58c 100644 --- a/gen/books1/src/lib.rs +++ b/gen/books1/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *books* crate version *0.1.1+20150309*, where *20150309* is the exact revision of the *books:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *books* crate version *0.1.2+20150309*, where *20150309* is the exact revision of the *books:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *books* *v1* API can be found at the //! [official documentation site](https://developers.google.com/books/docs/v1/getting_started). @@ -41,6 +41,8 @@ //! //! * **[Hub](struct.Books.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -50,6 +52,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -91,7 +95,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-books1" as books1; -//! use books1::Result; +//! use books1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -128,15 +132,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -149,7 +155,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -172,8 +178,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -222,7 +229,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -268,7 +275,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-books1" as books1; -/// use books1::Result; +/// use books1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -305,15 +312,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -334,7 +343,7 @@ impl<'a, C, NC, A> Books Books { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -368,7 +377,7 @@ impl<'a, C, NC, A> Books } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -393,9 +402,9 @@ impl<'a, C, NC, A> Books /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Category { - /// A list of onboarding categories. + /// A list of onboarding categories. pub items: Vec, - /// Resource type. + /// Resource type. pub kind: String, } @@ -408,13 +417,13 @@ impl ResponseResult for Category {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CategoryItems { - /// no description provided + /// no description provided #[serde(alias="badgeUrl")] pub badge_url: String, - /// no description provided + /// no description provided #[serde(alias="categoryId")] pub category_id: String, - /// no description provided + /// no description provided pub name: String, } @@ -428,32 +437,32 @@ impl Part for CategoryItems {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ConcurrentAccessRestriction { - /// Client nonce for verification. Download access and client-validation only. + /// Client nonce for verification. Download access and client-validation only. pub nonce: String, - /// Resource type. + /// Resource type. pub kind: String, - /// Whether this volume has any concurrent access restrictions. + /// Whether this volume has any concurrent access restrictions. pub restricted: bool, - /// Identifies the volume for which this entry applies. + /// Identifies the volume for which this entry applies. #[serde(alias="volumeId")] pub volume_id: String, - /// The maximum number of concurrent access licenses for this volume. + /// The maximum number of concurrent access licenses for this volume. #[serde(alias="maxConcurrentDevices")] pub max_concurrent_devices: i32, - /// Whether access is granted for this (user, device, volume). + /// Whether access is granted for this (user, device, volume). #[serde(alias="deviceAllowed")] pub device_allowed: bool, - /// Client app identifier for verification. Download access and client-validation only. + /// Client app identifier for verification. Download access and client-validation only. pub source: String, - /// Time in seconds for license auto-expiration. + /// Time in seconds for license auto-expiration. #[serde(alias="timeWindowSeconds")] pub time_window_seconds: i32, - /// Response signature. + /// Response signature. pub signature: String, - /// Error/warning reason code. + /// Error/warning reason code. #[serde(alias="reasonCode")] pub reason_code: String, - /// Error/warning message. + /// Error/warning message. pub message: String, } @@ -466,11 +475,11 @@ impl Part for ConcurrentAccessRestriction {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeVolumeInfoDimensions { - /// Width of this volume (in cm). + /// Width of this volume (in cm). pub width: String, - /// Height or length of this volume (in cm). + /// Height or length of this volume (in cm). pub height: String, - /// Thickness of this volume (in cm). + /// Thickness of this volume (in cm). pub thickness: String, } @@ -484,65 +493,65 @@ impl Part for VolumeVolumeInfoDimensions {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeVolumeInfo { - /// Volume subtitle. (In LITE projection.) + /// Volume subtitle. (In LITE projection.) pub subtitle: String, - /// A synopsis of the volume. The text of the description is formatted in HTML and includes simple formatting elements, such as b, i, and br tags. (In LITE projection.) + /// A synopsis of the volume. The text of the description is formatted in HTML and includes simple formatting elements, such as b, i, and br tags. (In LITE projection.) pub description: String, - /// Total number of pages as per publisher metadata. + /// Total number of pages as per publisher metadata. #[serde(alias="pageCount")] pub page_count: i32, - /// A list of image links for all the sizes that are available. (In LITE projection.) + /// A list of image links for all the sizes that are available. (In LITE projection.) #[serde(alias="imageLinks")] pub image_links: VolumeVolumeInfoImageLinks, - /// The number of review ratings for this volume. + /// The number of review ratings for this volume. #[serde(alias="ratingsCount")] pub ratings_count: i32, - /// The main category to which this volume belongs. It will be the category from the categories list returned below that has the highest weight. + /// The main category to which this volume belongs. It will be the category from the categories list returned below that has the highest weight. #[serde(alias="mainCategory")] pub main_category: String, - /// The names of the authors and/or editors for this volume. (In LITE projection) + /// The names of the authors and/or editors for this volume. (In LITE projection) pub authors: Vec, - /// A list of subject categories, such as "Fiction", "Suspense", etc. + /// A list of subject categories, such as "Fiction", "Suspense", etc. pub categories: Vec, - /// Publisher of this volume. (In LITE projection.) + /// Publisher of this volume. (In LITE projection.) pub publisher: String, - /// Physical dimensions of this volume. + /// Physical dimensions of this volume. pub dimensions: VolumeVolumeInfoDimensions, - /// Best language for this volume (based on content). It is the two-letter ISO 639-1 code such as 'fr', 'en', etc. + /// Best language for this volume (based on content). It is the two-letter ISO 639-1 code such as 'fr', 'en', etc. pub language: String, - /// URL to preview this volume on the Google Books site. + /// URL to preview this volume on the Google Books site. #[serde(alias="previewLink")] pub preview_link: String, - /// The reading modes available for this volume. + /// The reading modes available for this volume. #[serde(alias="readingModes")] pub reading_modes: String, - /// Date of publication. (In LITE projection.) + /// Date of publication. (In LITE projection.) #[serde(alias="publishedDate")] pub published_date: String, - /// Type of publication of this volume. Possible values are BOOK or MAGAZINE. + /// Type of publication of this volume. Possible values are BOOK or MAGAZINE. #[serde(alias="printType")] pub print_type: String, - /// Total number of sample pages as per publisher metadata. + /// Total number of sample pages as per publisher metadata. #[serde(alias="samplePageCount")] pub sample_page_count: i32, - /// An identifier for the version of the volume content (text & images). (In LITE projection) + /// An identifier for the version of the volume content (text & images). (In LITE projection) #[serde(alias="contentVersion")] pub content_version: String, - /// Total number of printed pages in generated pdf representation. + /// Total number of printed pages in generated pdf representation. #[serde(alias="printedPageCount")] pub printed_page_count: i32, - /// Industry standard identifiers for this volume. + /// Industry standard identifiers for this volume. #[serde(alias="industryIdentifiers")] pub industry_identifiers: Vec, - /// Volume title. (In LITE projection.) + /// Volume title. (In LITE projection.) pub title: String, - /// The mean review rating for this volume. (min = 1.0, max = 5.0) + /// The mean review rating for this volume. (min = 1.0, max = 5.0) #[serde(alias="averageRating")] pub average_rating: f64, - /// URL to view information about this volume on the Google Books site. (In LITE projection) + /// URL to view information about this volume on the Google Books site. (In LITE projection) #[serde(alias="infoLink")] pub info_link: String, - /// Canonical URL for a volume. (In LITE projection.) + /// Canonical URL for a volume. (In LITE projection.) #[serde(alias="canonicalVolumeLink")] pub canonical_volume_link: String, } @@ -557,19 +566,19 @@ impl Part for VolumeVolumeInfo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AnnotationClientVersionRanges { - /// Range in image CFI format for this annotation sent by client. + /// Range in image CFI format for this annotation sent by client. #[serde(alias="imageCfiRange")] pub image_cfi_range: BooksAnnotationsRange, - /// Range in GB text format for this annotation sent by client. + /// Range in GB text format for this annotation sent by client. #[serde(alias="gbTextRange")] pub gb_text_range: BooksAnnotationsRange, - /// Content version the client sent in. + /// Content version the client sent in. #[serde(alias="contentVersion")] pub content_version: String, - /// Range in CFI format for this annotation sent by client. + /// Range in CFI format for this annotation sent by client. #[serde(alias="cfiRange")] pub cfi_range: BooksAnnotationsRange, - /// Range in GB image format for this annotation sent by client. + /// Range in GB image format for this annotation sent by client. #[serde(alias="gbImageRange")] pub gb_image_range: BooksAnnotationsRange, } @@ -589,12 +598,12 @@ impl Part for AnnotationClientVersionRanges {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct RequestAccess { - /// A download access response. + /// A download access response. #[serde(alias="downloadAccess")] pub download_access: DownloadAccessRestriction, - /// Resource type. + /// Resource type. pub kind: String, - /// A concurrent access response. + /// A concurrent access response. #[serde(alias="concurrentAccess")] pub concurrent_access: ConcurrentAccessRestriction, } @@ -608,19 +617,19 @@ impl ResponseResult for RequestAccess {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OffersItemsItems { - /// no description provided + /// no description provided pub description: String, - /// no description provided + /// no description provided pub author: String, - /// no description provided + /// no description provided pub title: String, - /// no description provided + /// no description provided #[serde(alias="coverUrl")] pub cover_url: String, - /// no description provided + /// no description provided #[serde(alias="volumeId")] pub volume_id: String, - /// no description provided + /// no description provided #[serde(alias="canonicalVolumeLink")] pub canonical_volume_link: String, } @@ -640,14 +649,14 @@ impl Part for OffersItemsItems {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Annotations { - /// Token to pass in for pagination for the next page. This will not be present if this request does not have more results. + /// Token to pass in for pagination for the next page. This will not be present if this request does not have more results. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of annotations. + /// A list of annotations. pub items: Vec, - /// Resource type. + /// Resource type. pub kind: String, - /// Total number of annotations found. This may be greater than the number of notes returned in this response if results have been paginated. + /// Total number of annotations found. This may be greater than the number of notes returned in this response if results have been paginated. #[serde(alias="totalItems")] pub total_items: i32, } @@ -661,16 +670,16 @@ impl ResponseResult for Annotations {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeSaleInfoOffers { - /// The rental duration (for rental offers only). + /// The rental duration (for rental offers only). #[serde(alias="rentalDuration")] pub rental_duration: VolumeSaleInfoOffersRentalDuration, - /// Offer retail (=discounted) price in Micros + /// Offer retail (=discounted) price in Micros #[serde(alias="retailPrice")] pub retail_price: VolumeSaleInfoOffersRetailPrice, - /// Offer list (=undiscounted) price in Micros. + /// Offer list (=undiscounted) price in Micros. #[serde(alias="listPrice")] pub list_price: VolumeSaleInfoOffersListPrice, - /// The finsky offer type (e.g., PURCHASE=0 RENTAL=3) + /// The finsky offer type (e.g., PURCHASE=0 RENTAL=3) #[serde(alias="finskyOfferType")] pub finsky_offer_type: i32, } @@ -690,9 +699,9 @@ impl Part for VolumeSaleInfoOffers {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Metadata { - /// A list of offline dictionary metadata. + /// A list of offline dictionary metadata. pub items: Vec, - /// Resource type. + /// Resource type. pub kind: String, } @@ -716,34 +725,34 @@ impl ResponseResult for Metadata {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Volume { - /// Resource type for a volume. (In LITE projection.) + /// Resource type for a volume. (In LITE projection.) pub kind: String, - /// Any information about a volume related to reading or obtaining that volume text. This information can depend on country (books may be public domain in one country but not in another, e.g.). + /// Any information about a volume related to reading or obtaining that volume text. This information can depend on country (books may be public domain in one country but not in another, e.g.). #[serde(alias="accessInfo")] pub access_info: VolumeAccessInfo, - /// Search result information related to this volume. + /// Search result information related to this volume. #[serde(alias="searchInfo")] pub search_info: VolumeSearchInfo, - /// Any information about a volume related to the eBookstore and/or purchaseability. This information can depend on the country where the request originates from (i.e. books may not be for sale in certain countries). + /// Any information about a volume related to the eBookstore and/or purchaseability. This information can depend on the country where the request originates from (i.e. books may not be for sale in certain countries). #[serde(alias="saleInfo")] pub sale_info: VolumeSaleInfo, - /// Opaque identifier for a specific version of a volume resource. (In LITE projection) + /// Opaque identifier for a specific version of a volume resource. (In LITE projection) pub etag: String, - /// What layers exist in this volume and high level information about them. + /// What layers exist in this volume and high level information about them. #[serde(alias="layerInfo")] pub layer_info: VolumeLayerInfo, - /// General volume information. + /// General volume information. #[serde(alias="volumeInfo")] pub volume_info: VolumeVolumeInfo, - /// Recommendation related information for this volume. + /// Recommendation related information for this volume. #[serde(alias="recommendedInfo")] pub recommended_info: VolumeRecommendedInfo, - /// Unique identifier for a volume. (In LITE projection.) + /// Unique identifier for a volume. (In LITE projection.) pub id: String, - /// URL to this resource. (In LITE projection.) + /// URL to this resource. (In LITE projection.) #[serde(alias="selfLink")] pub self_link: String, - /// User specific information related to this volume. (e.g. page this user last read or whether they purchased this book) + /// User specific information related to this volume. (e.g. page this user last read or whether they purchased this book) #[serde(alias="userInfo")] pub user_info: VolumeUserInfo, } @@ -758,7 +767,7 @@ impl ResponseResult for Volume {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeLayerInfo { - /// A layer should appear here if and only if the layer exists for this book. + /// A layer should appear here if and only if the layer exists for this book. pub layers: Vec, } @@ -778,9 +787,9 @@ impl Part for VolumeLayerInfo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Usersettings { - /// Resource type. + /// Resource type. pub kind: Option, - /// User settings in sub-objects, each for different purposes. + /// User settings in sub-objects, each for different purposes. #[serde(alias="notesExport")] pub notes_export: Option, } @@ -795,7 +804,7 @@ impl ResponseResult for Usersettings {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeRecommendedInfo { - /// A text explaining why this volume is recommended. + /// A text explaining why this volume is recommended. pub explanation: String, } @@ -809,15 +818,15 @@ impl Part for VolumeRecommendedInfo {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct MetadataItems { - /// no description provided + /// no description provided pub encrypted_key: String, - /// no description provided + /// no description provided pub version: String, - /// no description provided + /// no description provided pub download_url: String, - /// no description provided + /// no description provided pub language: String, - /// no description provided + /// no description provided pub size: String, } @@ -831,7 +840,7 @@ impl Part for MetadataItems {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReviewAuthor { - /// Name of this person. + /// Name of this person. #[serde(alias="displayName")] pub display_name: String, } @@ -852,27 +861,27 @@ impl Part for ReviewAuthor {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Bookshelf { - /// Resource type for bookshelf metadata. + /// Resource type for bookshelf metadata. pub kind: String, - /// Description of this bookshelf. + /// Description of this bookshelf. pub description: String, - /// Title of this bookshelf. + /// Title of this bookshelf. pub title: String, - /// Number of volumes in this bookshelf. + /// Number of volumes in this bookshelf. #[serde(alias="volumeCount")] pub volume_count: i32, - /// Created time for this bookshelf (formatted UTC timestamp with millisecond resolution). + /// Created time for this bookshelf (formatted UTC timestamp with millisecond resolution). pub created: String, - /// Last modified time of this bookshelf (formatted UTC timestamp with millisecond resolution). + /// Last modified time of this bookshelf (formatted UTC timestamp with millisecond resolution). pub updated: String, - /// Whether this bookshelf is PUBLIC or PRIVATE. + /// Whether this bookshelf is PUBLIC or PRIVATE. pub access: String, - /// Last time a volume was added or removed from this bookshelf (formatted UTC timestamp with millisecond resolution). + /// Last time a volume was added or removed from this bookshelf (formatted UTC timestamp with millisecond resolution). #[serde(alias="volumesLastUpdated")] pub volumes_last_updated: String, - /// Id of this bookshelf, only unique by user. + /// Id of this bookshelf, only unique by user. pub id: i32, - /// URL to this resource. + /// URL to this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -886,10 +895,10 @@ impl ResponseResult for Bookshelf {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UsersettingsNotesExport { - /// no description provided + /// no description provided #[serde(alias="isEnabled")] pub is_enabled: bool, - /// no description provided + /// no description provided #[serde(alias="folderName")] pub folder_name: String, } @@ -910,49 +919,49 @@ impl Part for UsersettingsNotesExport {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Annotation { - /// Timestamp for the last time this annotation was modified. + /// Timestamp for the last time this annotation was modified. pub updated: Option, - /// Indicates that this annotation is deleted. + /// Indicates that this annotation is deleted. pub deleted: Option, - /// Selection ranges for the most recent content version. + /// Selection ranges for the most recent content version. #[serde(alias="currentVersionRanges")] pub current_version_ranges: Option, - /// Anchor text after excerpt. For requests, if the user bookmarked a screen that has no flowing text on it, then this field should be empty. + /// Anchor text after excerpt. For requests, if the user bookmarked a screen that has no flowing text on it, then this field should be empty. #[serde(alias="afterSelectedText")] pub after_selected_text: Option, - /// The volume that this annotation belongs to. + /// The volume that this annotation belongs to. #[serde(alias="volumeId")] pub volume_id: Option, - /// Excerpt from the volume. + /// Excerpt from the volume. #[serde(alias="selectedText")] pub selected_text: Option, - /// User-created data for this annotation. + /// User-created data for this annotation. pub data: Option, - /// Id of this annotation, in the form of a GUID. + /// Id of this annotation, in the form of a GUID. pub id: Option, - /// Resource type. + /// Resource type. pub kind: Option, - /// Timestamp for the created time of this annotation. + /// Timestamp for the created time of this annotation. pub created: Option, - /// Anchor text before excerpt. For requests, if the user bookmarked a screen that has no flowing text on it, then this field should be empty. + /// Anchor text before excerpt. For requests, if the user bookmarked a screen that has no flowing text on it, then this field should be empty. #[serde(alias="beforeSelectedText")] pub before_selected_text: Option, - /// Selection ranges sent from the client. + /// Selection ranges sent from the client. #[serde(alias="clientVersionRanges")] pub client_version_ranges: Option, - /// Pages that this annotation spans. + /// Pages that this annotation spans. #[serde(alias="pageIds")] pub page_ids: Option>, - /// The layer this annotation is for. + /// The layer this annotation is for. #[serde(alias="layerId")] pub layer_id: Option, - /// The highlight style for this annotation. + /// The highlight style for this annotation. #[serde(alias="highlightStyle")] pub highlight_style: Option, - /// no description provided + /// no description provided #[serde(alias="layerSummary")] pub layer_summary: Option, - /// URL to this resource. + /// URL to this resource. #[serde(alias="selfLink")] pub self_link: Option, } @@ -967,27 +976,27 @@ impl ResponseResult for Annotation {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Review { - /// Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, FIVE or NOT_RATED. + /// Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, FIVE or NOT_RATED. pub rating: String, - /// Resource type for a review. + /// Resource type for a review. pub kind: String, - /// Title for this review. + /// Title for this review. pub title: String, - /// Author of this review. + /// Author of this review. pub author: ReviewAuthor, - /// Volume that this review is for. + /// Volume that this review is for. #[serde(alias="volumeId")] pub volume_id: String, - /// Review text. + /// Review text. pub content: String, - /// Information regarding the source of this review, when the review is not from a Google Books user. + /// Information regarding the source of this review, when the review is not from a Google Books user. pub source: ReviewSource, - /// Date of this review. + /// Date of this review. pub date: String, - /// Source type for this review. Possible values are EDITORIAL, WEB_USER or GOOGLE_USER. + /// Source type for this review. Possible values are EDITORIAL, WEB_USER or GOOGLE_USER. #[serde(alias="type")] pub type_: String, - /// URL for the full review text, for reviews gathered from the web. + /// URL for the full review text, for reviews gathered from the web. #[serde(alias="fullTextUrl")] pub full_text_url: String, } @@ -1001,35 +1010,35 @@ impl Part for Review {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DownloadAccessRestriction { - /// Client nonce for verification. Download access and client-validation only. + /// Client nonce for verification. Download access and client-validation only. pub nonce: String, - /// Resource type. + /// Resource type. pub kind: String, - /// If deviceAllowed, whether access was just acquired with this request. + /// If deviceAllowed, whether access was just acquired with this request. #[serde(alias="justAcquired")] pub just_acquired: bool, - /// If restricted, the maximum number of content download licenses for this volume. + /// If restricted, the maximum number of content download licenses for this volume. #[serde(alias="maxDownloadDevices")] pub max_download_devices: i32, - /// If restricted, the number of content download licenses already acquired (including the requesting client, if licensed). + /// If restricted, the number of content download licenses already acquired (including the requesting client, if licensed). #[serde(alias="downloadsAcquired")] pub downloads_acquired: i32, - /// Identifies the volume for which this entry applies. + /// Identifies the volume for which this entry applies. #[serde(alias="volumeId")] pub volume_id: String, - /// If restricted, whether access is granted for this (user, device, volume). + /// If restricted, whether access is granted for this (user, device, volume). #[serde(alias="deviceAllowed")] pub device_allowed: bool, - /// Client app identifier for verification. Download access and client-validation only. + /// Client app identifier for verification. Download access and client-validation only. pub source: String, - /// Response signature. + /// Response signature. pub signature: String, - /// Error/warning reason code. Additional codes may be added in the future. 0 OK 100 ACCESS_DENIED_PUBLISHER_LIMIT 101 ACCESS_DENIED_LIMIT 200 WARNING_USED_LAST_ACCESS + /// Error/warning reason code. Additional codes may be added in the future. 0 OK 100 ACCESS_DENIED_PUBLISHER_LIMIT 101 ACCESS_DENIED_LIMIT 200 WARNING_USED_LAST_ACCESS #[serde(alias="reasonCode")] pub reason_code: String, - /// Error/warning message. + /// Error/warning message. pub message: String, - /// Whether this volume has any download access restrictions. + /// Whether this volume has any download access restrictions. pub restricted: bool, } @@ -1047,10 +1056,10 @@ impl Part for DownloadAccessRestriction {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DownloadAccesses { - /// A list of download access responses. + /// A list of download access responses. #[serde(alias="downloadAccessList")] pub download_access_list: Vec, - /// Resource type. + /// Resource type. pub kind: String, } @@ -1063,12 +1072,12 @@ impl ResponseResult for DownloadAccesses {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReviewSource { - /// Extra text about the source of the review. + /// Extra text about the source of the review. #[serde(alias="extraDescription")] pub extra_description: String, - /// URL of the source of the review. + /// URL of the source of the review. pub url: String, - /// Name of the source. + /// Name of the source. pub description: String, } @@ -1087,23 +1096,23 @@ impl Part for ReviewSource {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReadingPosition { - /// Position in a PDF file. + /// Position in a PDF file. #[serde(alias="pdfPosition")] pub pdf_position: String, - /// Resource type for a reading position. + /// Resource type for a reading position. pub kind: String, - /// Position in a volume for image-based content. + /// Position in a volume for image-based content. #[serde(alias="gbImagePosition")] pub gb_image_position: String, - /// Position in a volume for text-based content. + /// Position in a volume for text-based content. #[serde(alias="gbTextPosition")] pub gb_text_position: String, - /// Position in an EPUB as a CFI. + /// Position in an EPUB as a CFI. #[serde(alias="epubCfiPosition")] pub epub_cfi_position: String, - /// Timestamp when this reading position was last updated (formatted UTC timestamp with millisecond resolution). + /// Timestamp when this reading position was last updated (formatted UTC timestamp with millisecond resolution). pub updated: String, - /// Volume id associated with this reading position. + /// Volume id associated with this reading position. #[serde(alias="volumeId")] pub volume_id: String, } @@ -1117,10 +1126,10 @@ impl ResponseResult for ReadingPosition {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeSaleInfoOffersRetailPrice { - /// no description provided + /// no description provided #[serde(alias="currencyCode")] pub currency_code: String, - /// no description provided + /// no description provided #[serde(alias="amountInMicros")] pub amount_in_micros: f64, } @@ -1135,7 +1144,7 @@ impl Part for VolumeSaleInfoOffersRetailPrice {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeSearchInfo { - /// A text snippet containing the search query. + /// A text snippet containing the search query. #[serde(alias="textSnippet")] pub text_snippet: String, } @@ -1150,18 +1159,18 @@ impl Part for VolumeSearchInfo {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AnnotationsSummaryLayers { - /// no description provided + /// no description provided #[serde(alias="limitType")] pub limit_type: String, - /// no description provided + /// no description provided #[serde(alias="remainingCharacterCount")] pub remaining_character_count: i32, - /// no description provided + /// no description provided pub updated: String, - /// no description provided + /// no description provided #[serde(alias="allowedCharacterCount")] pub allowed_character_count: i32, - /// no description provided + /// no description provided #[serde(alias="layerId")] pub layer_id: String, } @@ -1181,26 +1190,26 @@ impl Part for AnnotationsSummaryLayers {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Annotationdata { - /// The type of annotation this data is for. + /// The type of annotation this data is for. #[serde(alias="annotationType")] pub annotation_type: String, - /// Resource Type + /// Resource Type pub kind: String, - /// Timestamp for the last time this data was updated. (RFC 3339 UTC date-time format). + /// Timestamp for the last time this data was updated. (RFC 3339 UTC date-time format). pub updated: String, - /// The volume id for this data. * + /// The volume id for this data. * #[serde(alias="volumeId")] pub volume_id: String, - /// Base64 encoded data for this annotation data. + /// Base64 encoded data for this annotation data. pub encoded_data: String, - /// The Layer id for this data. * + /// The Layer id for this data. * #[serde(alias="layerId")] pub layer_id: String, - /// no description provided + /// no description provided pub data: String, - /// Unique id for this annotation data. + /// Unique id for this annotation data. pub id: String, - /// URL for this resource. * + /// URL for this resource. * #[serde(alias="selfLink")] pub self_link: String, } @@ -1214,19 +1223,19 @@ impl ResponseResult for Annotationdata {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeVolumeInfoImageLinks { - /// Image link for large size (width of ~800 pixels). (In LITE projection) + /// Image link for large size (width of ~800 pixels). (In LITE projection) pub large: String, - /// Image link for extra large size (width of ~1280 pixels). (In LITE projection) + /// Image link for extra large size (width of ~1280 pixels). (In LITE projection) #[serde(alias="extraLarge")] pub extra_large: String, - /// Image link for medium size (width of ~575 pixels). (In LITE projection) + /// Image link for medium size (width of ~575 pixels). (In LITE projection) pub medium: String, - /// Image link for small thumbnail size (width of ~80 pixels). (In LITE projection) + /// Image link for small thumbnail size (width of ~80 pixels). (In LITE projection) #[serde(alias="smallThumbnail")] pub small_thumbnail: String, - /// Image link for small size (width of ~300 pixels). (In LITE projection) + /// Image link for small size (width of ~300 pixels). (In LITE projection) pub small: String, - /// Image link for thumbnail size (width of ~128 pixels). (In LITE projection) + /// Image link for thumbnail size (width of ~128 pixels). (In LITE projection) pub thumbnail: String, } @@ -1240,9 +1249,9 @@ impl Part for VolumeVolumeInfoImageLinks {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeSaleInfoRetailPrice { - /// Amount in the currency listed below. (In LITE projection.) + /// Amount in the currency listed below. (In LITE projection.) pub amount: f64, - /// An ISO 4217, three-letter currency code. (In LITE projection.) + /// An ISO 4217, three-letter currency code. (In LITE projection.) #[serde(alias="currencyCode")] pub currency_code: String, } @@ -1262,40 +1271,40 @@ impl Part for VolumeSaleInfoRetailPrice {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Layersummary { - /// Resource Type + /// Resource Type pub kind: String, - /// The number of annotations for this layer. + /// The number of annotations for this layer. #[serde(alias="annotationCount")] pub annotation_count: i32, - /// The number of data items for this layer. + /// The number of data items for this layer. #[serde(alias="dataCount")] pub data_count: i32, - /// The list of annotation types contained for this layer. + /// The list of annotation types contained for this layer. #[serde(alias="annotationTypes")] pub annotation_types: Vec, - /// Timestamp for the last time an item in this layer was updated. (RFC 3339 UTC date-time format). + /// Timestamp for the last time an item in this layer was updated. (RFC 3339 UTC date-time format). pub updated: String, - /// The volume id this resource is for. + /// The volume id this resource is for. #[serde(alias="volumeId")] pub volume_id: String, - /// Link to get data for this annotation. + /// Link to get data for this annotation. #[serde(alias="annotationsDataLink")] pub annotations_data_link: String, - /// The link to get the annotations for this layer. + /// The link to get the annotations for this layer. #[serde(alias="annotationsLink")] pub annotations_link: String, - /// The content version this resource is for. + /// The content version this resource is for. #[serde(alias="contentVersion")] pub content_version: String, - /// The layer id for this summary. + /// The layer id for this summary. #[serde(alias="layerId")] pub layer_id: String, - /// The current version of this layer's volume annotations. Note that this version applies only to the data in the books.layers.volumeAnnotations.* responses. The actual annotation data is versioned separately. + /// The current version of this layer's volume annotations. Note that this version applies only to the data in the books.layers.volumeAnnotations.* responses. The actual annotation data is versioned separately. #[serde(alias="volumeAnnotationsVersion")] pub volume_annotations_version: String, - /// Unique id of this layer summary. + /// Unique id of this layer summary. pub id: String, - /// URL to this resource. + /// URL to this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -1309,10 +1318,10 @@ impl ResponseResult for Layersummary {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeSaleInfoOffersListPrice { - /// no description provided + /// no description provided #[serde(alias="currencyCode")] pub currency_code: String, - /// no description provided + /// no description provided #[serde(alias="amountInMicros")] pub amount_in_micros: f64, } @@ -1332,41 +1341,41 @@ impl Part for VolumeSaleInfoOffersListPrice {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Volumeannotation { - /// The type of annotation this is. + /// The type of annotation this is. #[serde(alias="annotationType")] pub annotation_type: String, - /// Resource Type + /// Resource Type pub kind: String, - /// Indicates that this annotation is deleted. + /// Indicates that this annotation is deleted. pub deleted: bool, - /// The content ranges to identify the selected text. + /// The content ranges to identify the selected text. #[serde(alias="contentRanges")] pub content_ranges: VolumeannotationContentRanges, - /// Timestamp for the last time this anntoation was updated. (RFC 3339 UTC date-time format). + /// Timestamp for the last time this anntoation was updated. (RFC 3339 UTC date-time format). pub updated: String, - /// The Volume this annotation is for. + /// The Volume this annotation is for. #[serde(alias="volumeId")] pub volume_id: String, - /// The annotation data id for this volume annotation. + /// The annotation data id for this volume annotation. #[serde(alias="annotationDataId")] pub annotation_data_id: String, - /// Link to get data for this annotation. + /// Link to get data for this annotation. #[serde(alias="annotationDataLink")] pub annotation_data_link: String, - /// Pages the annotation spans. + /// Pages the annotation spans. #[serde(alias="pageIds")] pub page_ids: Vec, - /// The Layer this annotation is for. + /// The Layer this annotation is for. #[serde(alias="layerId")] pub layer_id: String, - /// Excerpt from the volume. + /// Excerpt from the volume. #[serde(alias="selectedText")] pub selected_text: String, - /// Data for this annotation. + /// Data for this annotation. pub data: String, - /// Unique id of this volume annotation. + /// Unique id of this volume annotation. pub id: String, - /// URL to this resource. + /// URL to this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -1385,16 +1394,16 @@ impl ResponseResult for Volumeannotation {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Volumeannotations { - /// Token to pass in for pagination for the next page. This will not be present if this request does not have more results. + /// Token to pass in for pagination for the next page. This will not be present if this request does not have more results. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of volume annotations. + /// A list of volume annotations. pub items: Vec, - /// Resource type + /// Resource type pub kind: String, - /// The version string for all of the volume annotations in this layer (not just the ones in this response). Note: the version string doesn't apply to the annotation data, just the information in this response (e.g. the location of annotations in the book). + /// The version string for all of the volume annotations in this layer (not just the ones in this response). Note: the version string doesn't apply to the annotation data, just the information in this response (e.g. the location of annotations in the book). pub version: String, - /// The total number of volume annotations found. + /// The total number of volume annotations found. #[serde(alias="totalItems")] pub total_items: i32, } @@ -1413,14 +1422,14 @@ impl ResponseResult for Volumeannotations {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Annotationsdata { - /// Token to pass in for pagination for the next page. This will not be present if this request does not have more results. + /// Token to pass in for pagination for the next page. This will not be present if this request does not have more results. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of Annotation Data. + /// A list of Annotation Data. pub items: Vec, - /// Resource type + /// Resource type pub kind: String, - /// The total number of volume annotations found. + /// The total number of volume annotations found. #[serde(alias="totalItems")] pub total_items: i32, } @@ -1434,9 +1443,9 @@ impl ResponseResult for Annotationsdata {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeVolumeInfoIndustryIdentifiers { - /// Industry specific volume identifier. + /// Industry specific volume identifier. pub identifier: String, - /// Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and OTHER. + /// Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and OTHER. #[serde(alias="type")] pub type_: String, } @@ -1451,13 +1460,13 @@ impl Part for VolumeVolumeInfoIndustryIdentifiers {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AnnotationLayerSummary { - /// Type of limitation on this layer. "limited" or "unlimited" for the "copy" layer. + /// Type of limitation on this layer. "limited" or "unlimited" for the "copy" layer. #[serde(alias="limitType")] pub limit_type: String, - /// Remaining allowed characters on this layer, especially for the "copy" layer. + /// Remaining allowed characters on this layer, especially for the "copy" layer. #[serde(alias="remainingCharacterCount")] pub remaining_character_count: i32, - /// Maximum allowed characters on this layer, especially for the "copy" layer. + /// Maximum allowed characters on this layer, especially for the "copy" layer. #[serde(alias="allowedCharacterCount")] pub allowed_character_count: i32, } @@ -1477,9 +1486,9 @@ impl Part for AnnotationLayerSummary {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Offers { - /// A list of offers. + /// A list of offers. pub items: Vec, - /// Resource type. + /// Resource type. pub kind: String, } @@ -1492,13 +1501,13 @@ impl ResponseResult for Offers {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeAccessInfoEpub { - /// Is a flowing text epub available either as public domain or for purchase. (In LITE projection.) + /// Is a flowing text epub available either as public domain or for purchase. (In LITE projection.) #[serde(alias="isAvailable")] pub is_available: bool, - /// URL to download epub. (In LITE projection.) + /// URL to download epub. (In LITE projection.) #[serde(alias="downloadLink")] pub download_link: String, - /// URL to retrieve ACS token for epub download. (In LITE projection.) + /// URL to retrieve ACS token for epub download. (In LITE projection.) #[serde(alias="acsTokenLink")] pub acs_token_link: String, } @@ -1518,12 +1527,12 @@ impl Part for VolumeAccessInfoEpub {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Volume2 { - /// no description provided + /// no description provided #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of volumes. + /// A list of volumes. pub items: Vec, - /// Resource type. + /// Resource type. pub kind: String, } @@ -1536,13 +1545,13 @@ impl ResponseResult for Volume2 {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeAccessInfoPdf { - /// Is a scanned image pdf available either as public domain or for purchase. (In LITE projection.) + /// Is a scanned image pdf available either as public domain or for purchase. (In LITE projection.) #[serde(alias="isAvailable")] pub is_available: bool, - /// URL to download pdf. (In LITE projection.) + /// URL to download pdf. (In LITE projection.) #[serde(alias="downloadLink")] pub download_link: String, - /// URL to retrieve ACS token for pdf download. (In LITE projection.) + /// URL to retrieve ACS token for pdf download. (In LITE projection.) #[serde(alias="acsTokenLink")] pub acs_token_link: String, } @@ -1562,9 +1571,9 @@ impl Part for VolumeAccessInfoPdf {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AnnotationsSummary { - /// no description provided + /// no description provided pub layers: Vec, - /// no description provided + /// no description provided pub kind: String, } @@ -1583,9 +1592,9 @@ impl ResponseResult for AnnotationsSummary {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Bookshelves { - /// A list of bookshelves. + /// A list of bookshelves. pub items: Vec, - /// Resource type. + /// Resource type. pub kind: String, } @@ -1598,10 +1607,10 @@ impl ResponseResult for Bookshelves {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeLayerInfoLayers { - /// The current version of this layer's volume annotations. Note that this version applies only to the data in the books.layers.volumeAnnotations.* responses. The actual annotation data is versioned separately. + /// The current version of this layer's volume annotations. Note that this version applies only to the data in the books.layers.volumeAnnotations.* responses. The actual annotation data is versioned separately. #[serde(alias="volumeAnnotationsVersion")] pub volume_annotations_version: String, - /// The layer id of this layer (e.g. "geo"). + /// The layer id of this layer (e.g. "geo"). #[serde(alias="layerId")] pub layer_id: String, } @@ -1621,12 +1630,12 @@ impl Part for VolumeLayerInfoLayers {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Layersummaries { - /// The total number of layer summaries found. + /// The total number of layer summaries found. #[serde(alias="totalItems")] pub total_items: i32, - /// A list of layer summary items. + /// A list of layer summary items. pub items: Vec, - /// Resource type. + /// Resource type. pub kind: String, } @@ -1639,15 +1648,15 @@ impl ResponseResult for Layersummaries {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OffersItems { - /// no description provided + /// no description provided #[serde(alias="gservicesKey")] pub gservices_key: String, - /// no description provided + /// no description provided pub items: Vec, - /// no description provided + /// no description provided #[serde(alias="artUrl")] pub art_url: String, - /// no description provided + /// no description provided pub id: String, } @@ -1661,15 +1670,15 @@ impl Part for OffersItems {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeUserInfoCopy { - /// no description provided + /// no description provided #[serde(alias="limitType")] pub limit_type: String, - /// no description provided + /// no description provided #[serde(alias="remainingCharacterCount")] pub remaining_character_count: i32, - /// no description provided + /// no description provided pub updated: String, - /// no description provided + /// no description provided #[serde(alias="allowedCharacterCount")] pub allowed_character_count: i32, } @@ -1689,7 +1698,7 @@ impl Part for VolumeUserInfoCopy {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct BooksVolumesRecommendedRateResponse { - /// no description provided + /// no description provided pub consistency_token: String, } @@ -1702,34 +1711,34 @@ impl ResponseResult for BooksVolumesRecommendedRateResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeUserInfo { - /// Whether or not this volume is currently in "my books." + /// Whether or not this volume is currently in "my books." #[serde(alias="isInMyBooks")] pub is_in_my_books: bool, - /// Period during this book is/was a valid rental. + /// Period during this book is/was a valid rental. #[serde(alias="rentalPeriod")] pub rental_period: VolumeUserInfoRentalPeriod, - /// Timestamp when this volume was last modified by a user action, such as a reading position update, volume purchase or writing a review. (RFC 3339 UTC date-time format). + /// Timestamp when this volume was last modified by a user action, such as a reading position update, volume purchase or writing a review. (RFC 3339 UTC date-time format). pub updated: String, - /// no description provided + /// no description provided #[serde(alias="userUploadedVolumeInfo")] pub user_uploaded_volume_info: VolumeUserInfoUserUploadedVolumeInfo, - /// Whether this book is an active or an expired rental. + /// Whether this book is an active or an expired rental. #[serde(alias="rentalState")] pub rental_state: String, - /// Whether or not this volume was purchased by the authenticated user making the request. (In LITE projection.) + /// Whether or not this volume was purchased by the authenticated user making the request. (In LITE projection.) #[serde(alias="isPurchased")] pub is_purchased: bool, - /// The user's current reading position in the volume, if one is available. (In LITE projection.) + /// The user's current reading position in the volume, if one is available. (In LITE projection.) #[serde(alias="readingPosition")] pub reading_position: ReadingPosition, - /// Whether or not this volume was pre-ordered by the authenticated user making the request. (In LITE projection.) + /// Whether or not this volume was pre-ordered by the authenticated user making the request. (In LITE projection.) #[serde(alias="isPreordered")] pub is_preordered: bool, - /// Copy/Paste accounting information. + /// Copy/Paste accounting information. pub copy: VolumeUserInfoCopy, - /// This user's review of this volume, if one exists. + /// This user's review of this volume, if one exists. pub review: Review, - /// Whether or not this volume was user uploaded. + /// Whether or not this volume was user uploaded. #[serde(alias="isUploaded")] pub is_uploaded: bool, } @@ -1750,15 +1759,15 @@ impl Part for VolumeUserInfo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BooksCloudloadingResource { - /// no description provided + /// no description provided pub author: Option, - /// no description provided + /// no description provided #[serde(alias="processingState")] pub processing_state: Option, - /// no description provided + /// no description provided #[serde(alias="volumeId")] pub volume_id: Option, - /// no description provided + /// no description provided pub title: Option, } @@ -1772,7 +1781,7 @@ impl ResponseResult for BooksCloudloadingResource {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeUserInfoUserUploadedVolumeInfo { - /// no description provided + /// no description provided #[serde(alias="processingState")] pub processing_state: String, } @@ -1787,9 +1796,9 @@ impl Part for VolumeUserInfoUserUploadedVolumeInfo {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeSaleInfoListPrice { - /// Amount in the currency listed below. (In LITE projection.) + /// Amount in the currency listed below. (In LITE projection.) pub amount: f64, - /// An ISO 4217, three-letter currency code. (In LITE projection.) + /// An ISO 4217, three-letter currency code. (In LITE projection.) #[serde(alias="currencyCode")] pub currency_code: String, } @@ -1804,16 +1813,16 @@ impl Part for VolumeSaleInfoListPrice {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BooksAnnotationsRange { - /// The starting position for the range. + /// The starting position for the range. #[serde(alias="startPosition")] pub start_position: String, - /// The ending position for the range. + /// The ending position for the range. #[serde(alias="endPosition")] pub end_position: String, - /// The offset from the starting position. + /// The offset from the starting position. #[serde(alias="startOffset")] pub start_offset: String, - /// The offset from the ending position. + /// The offset from the ending position. #[serde(alias="endOffset")] pub end_offset: String, } @@ -1827,41 +1836,41 @@ impl Part for BooksAnnotationsRange {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeAccessInfo { - /// URL to read this volume on the Google Books site. Link will not allow users to read non-viewable volumes. + /// URL to read this volume on the Google Books site. Link will not allow users to read non-viewable volumes. #[serde(alias="webReaderLink")] pub web_reader_link: String, - /// Whether or not this book is public domain in the country listed above. + /// Whether or not this book is public domain in the country listed above. #[serde(alias="publicDomain")] pub public_domain: bool, - /// Whether this volume requires that the client explicitly request offline download license rather than have it done automatically when loading the content, if the client supports it. + /// Whether this volume requires that the client explicitly request offline download license rather than have it done automatically when loading the content, if the client supports it. #[serde(alias="explicitOfflineLicenseManagement")] pub explicit_offline_license_management: bool, - /// Whether this volume can be embedded in a viewport using the Embedded Viewer API. + /// Whether this volume can be embedded in a viewport using the Embedded Viewer API. pub embeddable: bool, - /// Information about a volume's download license access restrictions. + /// Information about a volume's download license access restrictions. #[serde(alias="downloadAccess")] pub download_access: DownloadAccessRestriction, - /// The two-letter ISO_3166-1 country code for which this access information is valid. (In LITE projection.) + /// The two-letter ISO_3166-1 country code for which this access information is valid. (In LITE projection.) pub country: String, - /// For ordered but not yet processed orders, we give a URL that can be used to go to the appropriate Google Wallet page. + /// For ordered but not yet processed orders, we give a URL that can be used to go to the appropriate Google Wallet page. #[serde(alias="viewOrderUrl")] pub view_order_url: String, - /// Whether text-to-speech is permitted for this volume. Values can be ALLOWED, ALLOWED_FOR_ACCESSIBILITY, or NOT_ALLOWED. + /// Whether text-to-speech is permitted for this volume. Values can be ALLOWED, ALLOWED_FOR_ACCESSIBILITY, or NOT_ALLOWED. #[serde(alias="textToSpeechPermission")] pub text_to_speech_permission: String, - /// URL to the Google Drive viewer if this volume is uploaded by the user by selecting the file from Google Drive. + /// URL to the Google Drive viewer if this volume is uploaded by the user by selecting the file from Google Drive. #[serde(alias="driveImportedContentLink")] pub drive_imported_content_link: String, - /// Information about pdf content. (In LITE projection.) + /// Information about pdf content. (In LITE projection.) pub pdf: VolumeAccessInfoPdf, - /// Whether quote sharing is allowed for this volume. + /// Whether quote sharing is allowed for this volume. #[serde(alias="quoteSharingAllowed")] pub quote_sharing_allowed: bool, - /// The read access of a volume. Possible values are PARTIAL, ALL_PAGES, NO_PAGES or UNKNOWN. This value depends on the country listed above. A value of PARTIAL means that the publisher has allowed some portion of the volume to be viewed publicly, without purchase. This can apply to eBooks as well as non-eBooks. Public domain books will always have a value of ALL_PAGES. + /// The read access of a volume. Possible values are PARTIAL, ALL_PAGES, NO_PAGES or UNKNOWN. This value depends on the country listed above. A value of PARTIAL means that the publisher has allowed some portion of the volume to be viewed publicly, without purchase. This can apply to eBooks as well as non-eBooks. Public domain books will always have a value of ALL_PAGES. pub viewability: String, - /// Information about epub content. (In LITE projection.) + /// Information about epub content. (In LITE projection.) pub epub: VolumeAccessInfoEpub, - /// Combines the access and viewability of this volume into a single status field for this user. Values can be FULL_PURCHASED, FULL_PUBLIC_DOMAIN, SAMPLE or NONE. (In LITE projection.) + /// Combines the access and viewability of this volume into a single status field for this user. Values can be FULL_PURCHASED, FULL_PUBLIC_DOMAIN, SAMPLE or NONE. (In LITE projection.) #[serde(alias="accessViewStatus")] pub access_view_status: String, } @@ -1876,19 +1885,19 @@ impl Part for VolumeAccessInfo {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AnnotationCurrentVersionRanges { - /// Range in image CFI format for this annotation for version above. + /// Range in image CFI format for this annotation for version above. #[serde(alias="imageCfiRange")] pub image_cfi_range: BooksAnnotationsRange, - /// Range in GB text format for this annotation for version above. + /// Range in GB text format for this annotation for version above. #[serde(alias="gbTextRange")] pub gb_text_range: BooksAnnotationsRange, - /// Content version applicable to ranges below. + /// Content version applicable to ranges below. #[serde(alias="contentVersion")] pub content_version: String, - /// Range in CFI format for this annotation for version above. + /// Range in CFI format for this annotation for version above. #[serde(alias="cfiRange")] pub cfi_range: BooksAnnotationsRange, - /// Range in GB image format for this annotation for version above. + /// Range in GB image format for this annotation for version above. #[serde(alias="gbImageRange")] pub gb_image_range: BooksAnnotationsRange, } @@ -1903,25 +1912,25 @@ impl Part for AnnotationCurrentVersionRanges {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeSaleInfo { - /// The two-letter ISO_3166-1 country code for which this sale information is valid. (In LITE projection.) + /// The two-letter ISO_3166-1 country code for which this sale information is valid. (In LITE projection.) pub country: String, - /// The actual selling price of the book. This is the same as the suggested retail or list price unless there are offers or discounts on this volume. (In LITE projection.) + /// The actual selling price of the book. This is the same as the suggested retail or list price unless there are offers or discounts on this volume. (In LITE projection.) #[serde(alias="retailPrice")] pub retail_price: VolumeSaleInfoRetailPrice, - /// Whether or not this volume is an eBook (can be added to the My eBooks shelf). + /// Whether or not this volume is an eBook (can be added to the My eBooks shelf). #[serde(alias="isEbook")] pub is_ebook: bool, - /// Offers available for this volume (sales and rentals). + /// Offers available for this volume (sales and rentals). pub offers: Vec, - /// Whether or not this book is available for sale or offered for free in the Google eBookstore for the country listed above. Possible values are FOR_SALE, FOR_RENTAL_ONLY, FOR_SALE_AND_RENTAL, FREE, NOT_FOR_SALE, or FOR_PREORDER. + /// Whether or not this book is available for sale or offered for free in the Google eBookstore for the country listed above. Possible values are FOR_SALE, FOR_RENTAL_ONLY, FOR_SALE_AND_RENTAL, FREE, NOT_FOR_SALE, or FOR_PREORDER. pub saleability: String, - /// URL to purchase this volume on the Google Books site. (In LITE projection) + /// URL to purchase this volume on the Google Books site. (In LITE projection) #[serde(alias="buyLink")] pub buy_link: String, - /// The date on which this book is available for sale. + /// The date on which this book is available for sale. #[serde(alias="onSaleDate")] pub on_sale_date: String, - /// Suggested retail price. (In LITE projection.) + /// Suggested retail price. (In LITE projection.) #[serde(alias="listPrice")] pub list_price: VolumeSaleInfoListPrice, } @@ -1948,12 +1957,12 @@ impl Part for VolumeSaleInfo {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Volumes { - /// Total number of volumes found. This might be greater than the number of volumes returned in this response if results have been paginated. + /// Total number of volumes found. This might be greater than the number of volumes returned in this response if results have been paginated. #[serde(alias="totalItems")] pub total_items: i32, - /// A list of volumes. + /// A list of volumes. pub items: Vec, - /// Resource type. + /// Resource type. pub kind: String, } @@ -1966,10 +1975,10 @@ impl ResponseResult for Volumes {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeUserInfoRentalPeriod { - /// no description provided + /// no description provided #[serde(alias="startUtcSec")] pub start_utc_sec: String, - /// no description provided + /// no description provided #[serde(alias="endUtcSec")] pub end_utc_sec: String, } @@ -1984,16 +1993,16 @@ impl Part for VolumeUserInfoRentalPeriod {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeannotationContentRanges { - /// Range in GB image format for this annotation for version above. + /// Range in GB image format for this annotation for version above. #[serde(alias="gbImageRange")] pub gb_image_range: BooksAnnotationsRange, - /// Range in GB text format for this annotation for version above. + /// Range in GB text format for this annotation for version above. #[serde(alias="gbTextRange")] pub gb_text_range: BooksAnnotationsRange, - /// Content version applicable to ranges below. + /// Content version applicable to ranges below. #[serde(alias="contentVersion")] pub content_version: String, - /// Range in CFI format for this annotation for version above. + /// Range in CFI format for this annotation for version above. #[serde(alias="cfiRange")] pub cfi_range: BooksAnnotationsRange, } @@ -2008,9 +2017,9 @@ impl Part for VolumeannotationContentRanges {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct VolumeSaleInfoOffersRentalDuration { - /// no description provided + /// no description provided pub count: f64, - /// no description provided + /// no description provided pub unit: String, } @@ -2057,13 +2066,20 @@ pub struct LayerMethods<'a, C, NC, A> hub: &'a Books, } -impl<'a, C, NC, A> ResourceMethodsBuilder for LayerMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for LayerMethods<'a, C, NC, A> {} impl<'a, C, NC, A> LayerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the annotation data. + /// Gets the annotation data. + /// + /// # Arguments + /// + /// * `volumeId` - The volume to retrieve annotations for. + /// * `layerId` - The ID for the layer to get the annotations. + /// * `annotationDataId` - The ID of the annotation data to retrieve. + /// * `contentVersion` - The content version for the volume you are trying to retrieve. pub fn annotation_data_get(&self, volume_id: &str, layer_id: &str, annotation_data_id: &str, content_version: &str) -> LayerAnnotationDataGetCall<'a, C, NC, A> { LayerAnnotationDataGetCall { hub: self.hub, @@ -2085,7 +2101,13 @@ impl<'a, C, NC, A> LayerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the volume annotation. + /// Gets the volume annotation. + /// + /// # Arguments + /// + /// * `volumeId` - The volume to retrieve annotations for. + /// * `layerId` - The ID for the layer to get the annotations. + /// * `annotationId` - The ID of the volume annotation to retrieve. pub fn volume_annotations_get(&self, volume_id: &str, layer_id: &str, annotation_id: &str) -> LayerVolumeAnnotationGetCall<'a, C, NC, A> { LayerVolumeAnnotationGetCall { hub: self.hub, @@ -2102,7 +2124,11 @@ impl<'a, C, NC, A> LayerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List the layer summaries for a volume. + /// List the layer summaries for a volume. + /// + /// # Arguments + /// + /// * `volumeId` - The volume to retrieve layers for. pub fn list(&self, volume_id: &str) -> LayerListCall<'a, C, NC, A> { LayerListCall { hub: self.hub, @@ -2119,7 +2145,12 @@ impl<'a, C, NC, A> LayerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the layer summary for a volume. + /// Gets the layer summary for a volume. + /// + /// # Arguments + /// + /// * `volumeId` - The volume to retrieve layers for. + /// * `summaryId` - The ID for the layer to get the summary for. pub fn get(&self, volume_id: &str, summary_id: &str) -> LayerGetCall<'a, C, NC, A> { LayerGetCall { hub: self.hub, @@ -2135,7 +2166,13 @@ impl<'a, C, NC, A> LayerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the volume annotations for a volume and layer. + /// Gets the volume annotations for a volume and layer. + /// + /// # Arguments + /// + /// * `volumeId` - The volume to retrieve annotations for. + /// * `layerId` - The ID for the layer to get the annotations. + /// * `contentVersion` - The content version for the requested volume. pub fn volume_annotations_list(&self, volume_id: &str, layer_id: &str, content_version: &str) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { LayerVolumeAnnotationListCall { hub: self.hub, @@ -2162,7 +2199,13 @@ impl<'a, C, NC, A> LayerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the annotation data for a volume and layer. + /// Gets the annotation data for a volume and layer. + /// + /// # Arguments + /// + /// * `volumeId` - The volume to retrieve annotation data for. + /// * `layerId` - The ID for the layer to get the annotation data. + /// * `contentVersion` - The content version for the requested volume. pub fn annotation_data_list(&self, volume_id: &str, layer_id: &str, content_version: &str) -> LayerAnnotationDataListCall<'a, C, NC, A> { LayerAnnotationDataListCall { hub: self.hub, @@ -2222,13 +2265,18 @@ pub struct VolumeMethods<'a, C, NC, A> hub: &'a Books, } -impl<'a, C, NC, A> ResourceMethodsBuilder for VolumeMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for VolumeMethods<'a, C, NC, A> {} impl<'a, C, NC, A> VolumeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Rate a recommended book for the current user. + /// Rate a recommended book for the current user. + /// + /// # Arguments + /// + /// * `rating` - Rating to be given to the volume. + /// * `volumeId` - ID of the source volume. pub fn recommended_rate(&self, rating: &str, volume_id: &str) -> VolumeRecommendedRateCall<'a, C, NC, A> { VolumeRecommendedRateCall { hub: self.hub, @@ -2244,7 +2292,7 @@ impl<'a, C, NC, A> VolumeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Return a list of books in My Library. + /// Return a list of books in My Library. pub fn mybooks_list(&self) -> VolumeMybookListCall<'a, C, NC, A> { VolumeMybookListCall { hub: self.hub, @@ -2262,7 +2310,11 @@ impl<'a, C, NC, A> VolumeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Performs a book search. + /// Performs a book search. + /// + /// # Arguments + /// + /// * `q` - Full-text search query string. pub fn list(&self, q: &str) -> VolumeListCall<'a, C, NC, A> { VolumeListCall { hub: self.hub, @@ -2287,7 +2339,7 @@ impl<'a, C, NC, A> VolumeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Return a list of books uploaded by the current user. + /// Return a list of books uploaded by the current user. pub fn useruploaded_list(&self) -> VolumeUseruploadedListCall<'a, C, NC, A> { VolumeUseruploadedListCall { hub: self.hub, @@ -2305,7 +2357,11 @@ impl<'a, C, NC, A> VolumeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Return a list of associated books. + /// Return a list of associated books. + /// + /// # Arguments + /// + /// * `volumeId` - ID of the source volume. pub fn associated_list(&self, volume_id: &str) -> VolumeAssociatedListCall<'a, C, NC, A> { VolumeAssociatedListCall { hub: self.hub, @@ -2321,7 +2377,11 @@ impl<'a, C, NC, A> VolumeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets volume information for a single volume. + /// Gets volume information for a single volume. + /// + /// # Arguments + /// + /// * `volumeId` - ID of volume to retrieve. pub fn get(&self, volume_id: &str) -> VolumeGetCall<'a, C, NC, A> { VolumeGetCall { hub: self.hub, @@ -2339,7 +2399,7 @@ impl<'a, C, NC, A> VolumeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Return a list of recommended books for the current user. + /// Return a list of recommended books for the current user. pub fn recommended_list(&self) -> VolumeRecommendedListCall<'a, C, NC, A> { VolumeRecommendedListCall { hub: self.hub, @@ -2388,13 +2448,17 @@ pub struct DictionaryMethods<'a, C, NC, A> hub: &'a Books, } -impl<'a, C, NC, A> ResourceMethodsBuilder for DictionaryMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for DictionaryMethods<'a, C, NC, A> {} impl<'a, C, NC, A> DictionaryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns a list of offline dictionary meatadata available + /// Returns a list of offline dictionary meatadata available + /// + /// # Arguments + /// + /// * `cpksver` - The device/version ID from which to request the data. pub fn list_offline_metadata(&self, cpksver: &str) -> DictionaryListOfflineMetadataCall<'a, C, NC, A> { DictionaryListOfflineMetadataCall { hub: self.hub, @@ -2442,13 +2506,18 @@ pub struct BookshelveMethods<'a, C, NC, A> hub: &'a Books, } -impl<'a, C, NC, A> ResourceMethodsBuilder for BookshelveMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for BookshelveMethods<'a, C, NC, A> {} impl<'a, C, NC, A> BookshelveMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves volumes in a specific bookshelf for the specified user. + /// Retrieves volumes in a specific bookshelf for the specified user. + /// + /// # Arguments + /// + /// * `userId` - ID of user for whom to retrieve bookshelf volumes. + /// * `shelf` - ID of bookshelf to retrieve volumes. pub fn volumes_list(&self, user_id: &str, shelf: &str) -> BookshelveVolumeListCall<'a, C, NC, A> { BookshelveVolumeListCall { hub: self.hub, @@ -2466,7 +2535,11 @@ impl<'a, C, NC, A> BookshelveMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of public bookshelves for the specified user. + /// Retrieves a list of public bookshelves for the specified user. + /// + /// # Arguments + /// + /// * `userId` - ID of user for whom to retrieve bookshelves. pub fn list(&self, user_id: &str) -> BookshelveListCall<'a, C, NC, A> { BookshelveListCall { hub: self.hub, @@ -2480,7 +2553,12 @@ impl<'a, C, NC, A> BookshelveMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves metadata for a specific bookshelf for the specified user. + /// Retrieves metadata for a specific bookshelf for the specified user. + /// + /// # Arguments + /// + /// * `userId` - ID of user for whom to retrieve bookshelves. + /// * `shelf` - ID of bookshelf to retrieve. pub fn get(&self, user_id: &str, shelf: &str) -> BookshelveGetCall<'a, C, NC, A> { BookshelveGetCall { hub: self.hub, @@ -2530,13 +2608,13 @@ pub struct PromoofferMethods<'a, C, NC, A> hub: &'a Books, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PromoofferMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PromoofferMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PromoofferMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// + /// pub fn accept(&self) -> PromoofferAcceptCall<'a, C, NC, A> { PromoofferAcceptCall { hub: self.hub, @@ -2556,7 +2634,7 @@ impl<'a, C, NC, A> PromoofferMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// + /// pub fn dismiss(&self) -> PromoofferDismisCall<'a, C, NC, A> { PromoofferDismisCall { hub: self.hub, @@ -2575,7 +2653,7 @@ impl<'a, C, NC, A> PromoofferMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns a list of promo offers available to the user + /// Returns a list of promo offers available to the user pub fn get(&self) -> PromoofferGetCall<'a, C, NC, A> { PromoofferGetCall { hub: self.hub, @@ -2628,13 +2706,13 @@ pub struct OnboardingMethods<'a, C, NC, A> hub: &'a Books, } -impl<'a, C, NC, A> ResourceMethodsBuilder for OnboardingMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for OnboardingMethods<'a, C, NC, A> {} impl<'a, C, NC, A> OnboardingMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List categories for onboarding experience. + /// List categories for onboarding experience. pub fn list_categories(&self) -> OnboardingListCategoryCall<'a, C, NC, A> { OnboardingListCategoryCall { hub: self.hub, @@ -2647,7 +2725,7 @@ impl<'a, C, NC, A> OnboardingMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List available volumes under categories for onboarding experience. + /// List available volumes under categories for onboarding experience. pub fn list_category_volumes(&self) -> OnboardingListCategoryVolumeCall<'a, C, NC, A> { OnboardingListCategoryVolumeCall { hub: self.hub, @@ -2698,13 +2776,20 @@ pub struct MyconfigMethods<'a, C, NC, A> hub: &'a Books, } -impl<'a, C, NC, A> ResourceMethodsBuilder for MyconfigMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for MyconfigMethods<'a, C, NC, A> {} impl<'a, C, NC, A> MyconfigMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Request concurrent and download access restrictions. + /// Request concurrent and download access restrictions. + /// + /// # Arguments + /// + /// * `source` - String to identify the originator of this request. + /// * `volumeId` - The volume to request concurrent/download restrictions for. + /// * `nonce` - The client nonce value. + /// * `cpksver` - The device/version ID from which to request the restrictions. pub fn request_access(&self, source: &str, volume_id: &str, nonce: &str, cpksver: &str) -> MyconfigRequestAccesCall<'a, C, NC, A> { MyconfigRequestAccesCall { hub: self.hub, @@ -2722,7 +2807,12 @@ impl<'a, C, NC, A> MyconfigMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Release downloaded content access restriction. + /// Release downloaded content access restriction. + /// + /// # Arguments + /// + /// * `volumeIds` - The volume(s) to release restrictions for. + /// * `cpksver` - The device/version ID from which to release the restriction. pub fn release_download_access(&self, volume_ids: &Vec, cpksver: &str) -> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> { MyconfigReleaseDownloadAccesCall { hub: self.hub, @@ -2738,7 +2828,13 @@ impl<'a, C, NC, A> MyconfigMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Request downloaded content access for specified volumes on the My eBooks shelf. + /// Request downloaded content access for specified volumes on the My eBooks shelf. + /// + /// # Arguments + /// + /// * `source` - String to identify the originator of this request. + /// * `nonce` - The client nonce value. + /// * `cpksver` - The device/version ID from which to release the restriction. pub fn sync_volume_licenses(&self, source: &str, nonce: &str, cpksver: &str) -> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> { MyconfigSyncVolumeLicenseCall { hub: self.hub, @@ -2757,7 +2853,7 @@ impl<'a, C, NC, A> MyconfigMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the current settings for the user. + /// Gets the current settings for the user. pub fn get_user_settings(&self) -> MyconfigGetUserSettingCall<'a, C, NC, A> { MyconfigGetUserSettingCall { hub: self.hub, @@ -2769,7 +2865,11 @@ impl<'a, C, NC, A> MyconfigMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Sets the settings for the user. Unspecified sub-objects will retain the existing value. + /// Sets the settings for the user. Unspecified sub-objects will retain the existing value. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn update_user_settings(&self, request: &Usersettings) -> MyconfigUpdateUserSettingCall<'a, C, NC, A> { MyconfigUpdateUserSettingCall { hub: self.hub, @@ -2817,13 +2917,17 @@ pub struct MylibraryMethods<'a, C, NC, A> hub: &'a Books, } -impl<'a, C, NC, A> ResourceMethodsBuilder for MylibraryMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for MylibraryMethods<'a, C, NC, A> {} impl<'a, C, NC, A> MylibraryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Clears all volumes from a bookshelf. + /// Clears all volumes from a bookshelf. + /// + /// # Arguments + /// + /// * `shelf` - ID of bookshelf from which to remove a volume. pub fn bookshelves_clear_volumes(&self, shelf: &str) -> MylibraryBookshelveClearVolumeCall<'a, C, NC, A> { MylibraryBookshelveClearVolumeCall { hub: self.hub, @@ -2837,7 +2941,13 @@ impl<'a, C, NC, A> MylibraryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Moves a volume within a bookshelf. + /// Moves a volume within a bookshelf. + /// + /// # Arguments + /// + /// * `shelf` - ID of bookshelf with the volume. + /// * `volumeId` - ID of volume to move. + /// * `volumePosition` - Position on shelf to move the item (0 puts the item before the current first item, 1 puts it between the first and the second and so on.) pub fn bookshelves_move_volume(&self, shelf: &str, volume_id: &str, volume_position: i32) -> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> { MylibraryBookshelveMoveVolumeCall { hub: self.hub, @@ -2853,7 +2963,11 @@ impl<'a, C, NC, A> MylibraryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets volume information for volumes on a bookshelf. + /// Gets volume information for volumes on a bookshelf. + /// + /// # Arguments + /// + /// * `shelf` - The bookshelf ID or name retrieve volumes for. pub fn bookshelves_volumes_list(&self, shelf: &str) -> MylibraryBookshelveVolumeListCall<'a, C, NC, A> { MylibraryBookshelveVolumeListCall { hub: self.hub, @@ -2873,7 +2987,12 @@ impl<'a, C, NC, A> MylibraryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the summary of specified layers. + /// Gets the summary of specified layers. + /// + /// # Arguments + /// + /// * `layerIds` - Array of layer IDs to get the summary for. + /// * `volumeId` - Volume id to get the summary for. pub fn annotations_summary(&self, layer_ids: &Vec, volume_id: &str) -> MylibraryAnnotationSummaryCall<'a, C, NC, A> { MylibraryAnnotationSummaryCall { hub: self.hub, @@ -2887,7 +3006,11 @@ impl<'a, C, NC, A> MylibraryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an annotation. + /// Deletes an annotation. + /// + /// # Arguments + /// + /// * `annotationId` - The ID for the annotation to delete. pub fn annotations_delete(&self, annotation_id: &str) -> MylibraryAnnotationDeleteCall<'a, C, NC, A> { MylibraryAnnotationDeleteCall { hub: self.hub, @@ -2901,7 +3024,12 @@ impl<'a, C, NC, A> MylibraryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Adds a volume to a bookshelf. + /// Adds a volume to a bookshelf. + /// + /// # Arguments + /// + /// * `shelf` - ID of bookshelf to which to add a volume. + /// * `volumeId` - ID of volume to add. pub fn bookshelves_add_volume(&self, shelf: &str, volume_id: &str) -> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> { MylibraryBookshelveAddVolumeCall { hub: self.hub, @@ -2917,7 +3045,11 @@ impl<'a, C, NC, A> MylibraryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new annotation. + /// Inserts a new annotation. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn annotations_insert(&self, request: &Annotation) -> MylibraryAnnotationInsertCall<'a, C, NC, A> { MylibraryAnnotationInsertCall { hub: self.hub, @@ -2933,7 +3065,12 @@ impl<'a, C, NC, A> MylibraryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Removes a volume from a bookshelf. + /// Removes a volume from a bookshelf. + /// + /// # Arguments + /// + /// * `shelf` - ID of bookshelf from which to remove a volume. + /// * `volumeId` - ID of volume to remove. pub fn bookshelves_remove_volume(&self, shelf: &str, volume_id: &str) -> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> { MylibraryBookshelveRemoveVolumeCall { hub: self.hub, @@ -2949,7 +3086,7 @@ impl<'a, C, NC, A> MylibraryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of annotations, possibly filtered. + /// Retrieves a list of annotations, possibly filtered. pub fn annotations_list(&self) -> MylibraryAnnotationListCall<'a, C, NC, A> { MylibraryAnnotationListCall { hub: self.hub, @@ -2971,7 +3108,12 @@ impl<'a, C, NC, A> MylibraryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing annotation. + /// Updates an existing annotation. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `annotationId` - The ID for the annotation to update. pub fn annotations_update(&self, request: &Annotation, annotation_id: &str) -> MylibraryAnnotationUpdateCall<'a, C, NC, A> { MylibraryAnnotationUpdateCall { hub: self.hub, @@ -2986,7 +3128,13 @@ impl<'a, C, NC, A> MylibraryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Sets my reading position information for a volume. + /// Sets my reading position information for a volume. + /// + /// # Arguments + /// + /// * `volumeId` - ID of volume for which to update the reading position. + /// * `timestamp` - RFC 3339 UTC format timestamp associated with this reading position. + /// * `position` - Position string for the new volume reading position. pub fn readingpositions_set_position(&self, volume_id: &str, timestamp: &str, position: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> { MylibraryReadingpositionSetPositionCall { hub: self.hub, @@ -3005,7 +3153,11 @@ impl<'a, C, NC, A> MylibraryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves metadata for a specific bookshelf belonging to the authenticated user. + /// Retrieves metadata for a specific bookshelf belonging to the authenticated user. + /// + /// # Arguments + /// + /// * `shelf` - ID of bookshelf to retrieve. pub fn bookshelves_get(&self, shelf: &str) -> MylibraryBookshelveGetCall<'a, C, NC, A> { MylibraryBookshelveGetCall { hub: self.hub, @@ -3019,7 +3171,7 @@ impl<'a, C, NC, A> MylibraryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of bookshelves belonging to the authenticated user. + /// Retrieves a list of bookshelves belonging to the authenticated user. pub fn bookshelves_list(&self) -> MylibraryBookshelveListCall<'a, C, NC, A> { MylibraryBookshelveListCall { hub: self.hub, @@ -3032,7 +3184,11 @@ impl<'a, C, NC, A> MylibraryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves my reading position information for a volume. + /// Retrieves my reading position information for a volume. + /// + /// # Arguments + /// + /// * `volumeId` - ID of volume for which to retrieve a reading position. pub fn readingpositions_get(&self, volume_id: &str) -> MylibraryReadingpositionGetCall<'a, C, NC, A> { MylibraryReadingpositionGetCall { hub: self.hub, @@ -3082,13 +3238,13 @@ pub struct CloudloadingMethods<'a, C, NC, A> hub: &'a Books, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CloudloadingMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CloudloadingMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CloudloadingMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// + /// pub fn add_book(&self) -> CloudloadingAddBookCall<'a, C, NC, A> { CloudloadingAddBookCall { hub: self.hub, @@ -3104,7 +3260,11 @@ impl<'a, C, NC, A> CloudloadingMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// + /// + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn update_book(&self, request: &BooksCloudloadingResource) -> CloudloadingUpdateBookCall<'a, C, NC, A> { CloudloadingUpdateBookCall { hub: self.hub, @@ -3117,7 +3277,11 @@ impl<'a, C, NC, A> CloudloadingMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Remove the book and its contents + /// Remove the book and its contents + /// + /// # Arguments + /// + /// * `volumeId` - The id of the book to be removed. pub fn delete_book(&self, volume_id: &str) -> CloudloadingDeleteBookCall<'a, C, NC, A> { CloudloadingDeleteBookCall { hub: self.hub, @@ -3140,7 +3304,7 @@ impl<'a, C, NC, A> CloudloadingMethods<'a, C, NC, A> { /// Gets the annotation data. /// /// A builder for the *annotationData.get* method supported by a *layer* resource. -/// It is not used directly, but through a `LayerMethods`. +/// It is not used directly, but through a `LayerMethods` instance. /// /// # Example /// @@ -3234,7 +3398,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "volumeId", "layerId", "annotationDataId", "contentVersion", "w", "source", "scale", "locale", "h", "allowWebDefinitions"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3287,7 +3451,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3299,7 +3463,6 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -3309,7 +3472,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3320,7 +3483,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3329,13 +3492,13 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3347,7 +3510,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The volume to retrieve annotations for. + /// The volume to retrieve annotations for. pub fn volume_id(mut self, new_value: &str) -> LayerAnnotationDataGetCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -3357,7 +3520,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID for the layer to get the annotations. + /// The ID for the layer to get the annotations. pub fn layer_id(mut self, new_value: &str) -> LayerAnnotationDataGetCall<'a, C, NC, A> { self._layer_id = new_value.to_string(); self @@ -3367,7 +3530,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the annotation data to retrieve. + /// The ID of the annotation data to retrieve. pub fn annotation_data_id(mut self, new_value: &str) -> LayerAnnotationDataGetCall<'a, C, NC, A> { self._annotation_data_id = new_value.to_string(); self @@ -3377,7 +3540,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The content version for the volume you are trying to retrieve. + /// The content version for the volume you are trying to retrieve. pub fn content_version(mut self, new_value: &str) -> LayerAnnotationDataGetCall<'a, C, NC, A> { self._content_version = new_value.to_string(); self @@ -3385,7 +3548,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net /// Sets the *w* query property to the given value. /// /// - /// The requested pixel width for any images. If width is provided height must also be provided. + /// The requested pixel width for any images. If width is provided height must also be provided. pub fn w(mut self, new_value: i32) -> LayerAnnotationDataGetCall<'a, C, NC, A> { self._w = Some(new_value); self @@ -3393,7 +3556,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> LayerAnnotationDataGetCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -3401,7 +3564,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net /// Sets the *scale* query property to the given value. /// /// - /// The requested scale for the image. + /// The requested scale for the image. pub fn scale(mut self, new_value: i32) -> LayerAnnotationDataGetCall<'a, C, NC, A> { self._scale = Some(new_value); self @@ -3409,7 +3572,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net /// Sets the *locale* query property to the given value. /// /// - /// The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. + /// The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. pub fn locale(mut self, new_value: &str) -> LayerAnnotationDataGetCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -3417,7 +3580,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net /// Sets the *h* query property to the given value. /// /// - /// The requested pixel height for any images. If height is provided width must also be provided. + /// The requested pixel height for any images. If height is provided width must also be provided. pub fn h(mut self, new_value: i32) -> LayerAnnotationDataGetCall<'a, C, NC, A> { self._h = Some(new_value); self @@ -3425,7 +3588,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net /// Sets the *allow web definitions* query property to the given value. /// /// - /// For the dictionary layer. Whether or not to allow web definitions. + /// For the dictionary layer. Whether or not to allow web definitions. pub fn allow_web_definitions(mut self, new_value: bool) -> LayerAnnotationDataGetCall<'a, C, NC, A> { self._allow_web_definitions = Some(new_value); self @@ -3486,7 +3649,7 @@ impl<'a, C, NC, A> LayerAnnotationDataGetCall<'a, C, NC, A> where NC: hyper::net /// Gets the volume annotation. /// /// A builder for the *volumeAnnotations.get* method supported by a *layer* resource. -/// It is not used directly, but through a `LayerMethods`. +/// It is not used directly, but through a `LayerMethods` instance. /// /// # Example /// @@ -3558,7 +3721,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationGetCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "volumeId", "layerId", "annotationId", "source", "locale"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3611,7 +3774,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationGetCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3623,7 +3786,6 @@ impl<'a, C, NC, A> LayerVolumeAnnotationGetCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -3633,7 +3795,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationGetCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3644,7 +3806,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationGetCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3653,13 +3815,13 @@ impl<'a, C, NC, A> LayerVolumeAnnotationGetCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3671,7 +3833,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationGetCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The volume to retrieve annotations for. + /// The volume to retrieve annotations for. pub fn volume_id(mut self, new_value: &str) -> LayerVolumeAnnotationGetCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -3681,7 +3843,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationGetCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID for the layer to get the annotations. + /// The ID for the layer to get the annotations. pub fn layer_id(mut self, new_value: &str) -> LayerVolumeAnnotationGetCall<'a, C, NC, A> { self._layer_id = new_value.to_string(); self @@ -3691,7 +3853,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationGetCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the volume annotation to retrieve. + /// The ID of the volume annotation to retrieve. pub fn annotation_id(mut self, new_value: &str) -> LayerVolumeAnnotationGetCall<'a, C, NC, A> { self._annotation_id = new_value.to_string(); self @@ -3699,7 +3861,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationGetCall<'a, C, NC, A> where NC: hyper::n /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> LayerVolumeAnnotationGetCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -3707,7 +3869,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationGetCall<'a, C, NC, A> where NC: hyper::n /// Sets the *locale* query property to the given value. /// /// - /// The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. + /// The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. pub fn locale(mut self, new_value: &str) -> LayerVolumeAnnotationGetCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -3768,7 +3930,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationGetCall<'a, C, NC, A> where NC: hyper::n /// List the layer summaries for a volume. /// /// A builder for the *list* method supported by a *layer* resource. -/// It is not used directly, but through a `LayerMethods`. +/// It is not used directly, but through a `LayerMethods` instance. /// /// # Example /// @@ -3846,7 +4008,7 @@ impl<'a, C, NC, A> LayerListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "volumeId", "source", "pageToken", "maxResults", "contentVersion"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3899,7 +4061,7 @@ impl<'a, C, NC, A> LayerListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3911,7 +4073,6 @@ impl<'a, C, NC, A> LayerListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -3921,7 +4082,7 @@ impl<'a, C, NC, A> LayerListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3932,7 +4093,7 @@ impl<'a, C, NC, A> LayerListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3941,13 +4102,13 @@ impl<'a, C, NC, A> LayerListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3959,7 +4120,7 @@ impl<'a, C, NC, A> LayerListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The volume to retrieve layers for. + /// The volume to retrieve layers for. pub fn volume_id(mut self, new_value: &str) -> LayerListCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -3967,7 +4128,7 @@ impl<'a, C, NC, A> LayerListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> LayerListCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -3975,7 +4136,7 @@ impl<'a, C, NC, A> LayerListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *page token* query property to the given value. /// /// - /// The value of the nextToken from the previous page. + /// The value of the nextToken from the previous page. pub fn page_token(mut self, new_value: &str) -> LayerListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -3983,7 +4144,7 @@ impl<'a, C, NC, A> LayerListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return + /// Maximum number of results to return pub fn max_results(mut self, new_value: u32) -> LayerListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -3991,7 +4152,7 @@ impl<'a, C, NC, A> LayerListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *content version* query property to the given value. /// /// - /// The content version for the requested volume. + /// The content version for the requested volume. pub fn content_version(mut self, new_value: &str) -> LayerListCall<'a, C, NC, A> { self._content_version = Some(new_value.to_string()); self @@ -4052,7 +4213,7 @@ impl<'a, C, NC, A> LayerListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Gets the layer summary for a volume. /// /// A builder for the *get* method supported by a *layer* resource. -/// It is not used directly, but through a `LayerMethods`. +/// It is not used directly, but through a `LayerMethods` instance. /// /// # Example /// @@ -4122,7 +4283,7 @@ impl<'a, C, NC, A> LayerGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "volumeId", "summaryId", "source", "contentVersion"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4175,7 +4336,7 @@ impl<'a, C, NC, A> LayerGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4187,7 +4348,6 @@ impl<'a, C, NC, A> LayerGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -4197,7 +4357,7 @@ impl<'a, C, NC, A> LayerGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4208,7 +4368,7 @@ impl<'a, C, NC, A> LayerGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4217,13 +4377,13 @@ impl<'a, C, NC, A> LayerGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4235,7 +4395,7 @@ impl<'a, C, NC, A> LayerGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The volume to retrieve layers for. + /// The volume to retrieve layers for. pub fn volume_id(mut self, new_value: &str) -> LayerGetCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -4245,7 +4405,7 @@ impl<'a, C, NC, A> LayerGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID for the layer to get the summary for. + /// The ID for the layer to get the summary for. pub fn summary_id(mut self, new_value: &str) -> LayerGetCall<'a, C, NC, A> { self._summary_id = new_value.to_string(); self @@ -4253,7 +4413,7 @@ impl<'a, C, NC, A> LayerGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> LayerGetCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -4261,7 +4421,7 @@ impl<'a, C, NC, A> LayerGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *content version* query property to the given value. /// /// - /// The content version for the requested volume. + /// The content version for the requested volume. pub fn content_version(mut self, new_value: &str) -> LayerGetCall<'a, C, NC, A> { self._content_version = Some(new_value.to_string()); self @@ -4322,7 +4482,7 @@ impl<'a, C, NC, A> LayerGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Gets the volume annotations for a volume and layer. /// /// A builder for the *volumeAnnotations.list* method supported by a *layer* resource. -/// It is not used directly, but through a `LayerMethods`. +/// It is not used directly, but through a `LayerMethods` instance. /// /// # Example /// @@ -4444,7 +4604,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt", "volumeId", "layerId", "contentVersion", "volumeAnnotationsVersion", "updatedMin", "updatedMax", "startPosition", "startOffset", "source", "showDeleted", "pageToken", "maxResults", "locale", "endPosition", "endOffset"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4497,7 +4657,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4509,7 +4669,6 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -4519,7 +4678,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4530,7 +4689,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4539,13 +4698,13 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4557,7 +4716,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The volume to retrieve annotations for. + /// The volume to retrieve annotations for. pub fn volume_id(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -4567,7 +4726,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID for the layer to get the annotations. + /// The ID for the layer to get the annotations. pub fn layer_id(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._layer_id = new_value.to_string(); self @@ -4577,7 +4736,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The content version for the requested volume. + /// The content version for the requested volume. pub fn content_version(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._content_version = new_value.to_string(); self @@ -4585,7 +4744,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *volume annotations version* query property to the given value. /// /// - /// The version of the volume annotations that you are requesting. + /// The version of the volume annotations that you are requesting. pub fn volume_annotations_version(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._volume_annotations_version = Some(new_value.to_string()); self @@ -4593,7 +4752,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *updated min* query property to the given value. /// /// - /// RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive). + /// RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive). pub fn updated_min(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._updated_min = Some(new_value.to_string()); self @@ -4601,7 +4760,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *updated max* query property to the given value. /// /// - /// RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive). + /// RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive). pub fn updated_max(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._updated_max = Some(new_value.to_string()); self @@ -4609,7 +4768,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *start position* query property to the given value. /// /// - /// The start position to start retrieving data from. + /// The start position to start retrieving data from. pub fn start_position(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._start_position = Some(new_value.to_string()); self @@ -4617,7 +4776,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *start offset* query property to the given value. /// /// - /// The start offset to start retrieving data from. + /// The start offset to start retrieving data from. pub fn start_offset(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._start_offset = Some(new_value.to_string()); self @@ -4625,7 +4784,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -4633,7 +4792,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *show deleted* query property to the given value. /// /// - /// Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false. + /// Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false. pub fn show_deleted(mut self, new_value: bool) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._show_deleted = Some(new_value); self @@ -4641,7 +4800,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *page token* query property to the given value. /// /// - /// The value of the nextToken from the previous page. + /// The value of the nextToken from the previous page. pub fn page_token(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -4649,7 +4808,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return + /// Maximum number of results to return pub fn max_results(mut self, new_value: u32) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -4657,7 +4816,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *locale* query property to the given value. /// /// - /// The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. + /// The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. pub fn locale(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -4665,7 +4824,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *end position* query property to the given value. /// /// - /// The end position to end retrieving data from. + /// The end position to end retrieving data from. pub fn end_position(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._end_position = Some(new_value.to_string()); self @@ -4673,7 +4832,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *end offset* query property to the given value. /// /// - /// The end offset to end retrieving data from. + /// The end offset to end retrieving data from. pub fn end_offset(mut self, new_value: &str) -> LayerVolumeAnnotationListCall<'a, C, NC, A> { self._end_offset = Some(new_value.to_string()); self @@ -4734,7 +4893,7 @@ impl<'a, C, NC, A> LayerVolumeAnnotationListCall<'a, C, NC, A> where NC: hyper:: /// Gets the annotation data for a volume and layer. /// /// A builder for the *annotationData.list* method supported by a *layer* resource. -/// It is not used directly, but through a `LayerMethods`. +/// It is not used directly, but through a `LayerMethods` instance. /// /// # Example /// @@ -4850,7 +5009,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "volumeId", "layerId", "contentVersion", "w", "updatedMin", "updatedMax", "source", "scale", "pageToken", "maxResults", "locale", "h", "annotationDataId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4903,7 +5062,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4915,7 +5074,6 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -4925,7 +5083,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4936,7 +5094,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4945,13 +5103,13 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4963,7 +5121,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The volume to retrieve annotation data for. + /// The volume to retrieve annotation data for. pub fn volume_id(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -4973,7 +5131,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID for the layer to get the annotation data. + /// The ID for the layer to get the annotation data. pub fn layer_id(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, NC, A> { self._layer_id = new_value.to_string(); self @@ -4983,7 +5141,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The content version for the requested volume. + /// The content version for the requested volume. pub fn content_version(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, NC, A> { self._content_version = new_value.to_string(); self @@ -4991,7 +5149,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *w* query property to the given value. /// /// - /// The requested pixel width for any images. If width is provided height must also be provided. + /// The requested pixel width for any images. If width is provided height must also be provided. pub fn w(mut self, new_value: i32) -> LayerAnnotationDataListCall<'a, C, NC, A> { self._w = Some(new_value); self @@ -4999,7 +5157,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *updated min* query property to the given value. /// /// - /// RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive). + /// RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive). pub fn updated_min(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, NC, A> { self._updated_min = Some(new_value.to_string()); self @@ -5007,7 +5165,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *updated max* query property to the given value. /// /// - /// RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive). + /// RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive). pub fn updated_max(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, NC, A> { self._updated_max = Some(new_value.to_string()); self @@ -5015,7 +5173,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -5023,7 +5181,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *scale* query property to the given value. /// /// - /// The requested scale for the image. + /// The requested scale for the image. pub fn scale(mut self, new_value: i32) -> LayerAnnotationDataListCall<'a, C, NC, A> { self._scale = Some(new_value); self @@ -5031,7 +5189,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *page token* query property to the given value. /// /// - /// The value of the nextToken from the previous page. + /// The value of the nextToken from the previous page. pub fn page_token(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -5039,7 +5197,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return + /// Maximum number of results to return pub fn max_results(mut self, new_value: u32) -> LayerAnnotationDataListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -5047,7 +5205,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *locale* query property to the given value. /// /// - /// The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. + /// The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. pub fn locale(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -5055,7 +5213,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *h* query property to the given value. /// /// - /// The requested pixel height for any images. If height is provided width must also be provided. + /// The requested pixel height for any images. If height is provided width must also be provided. pub fn h(mut self, new_value: i32) -> LayerAnnotationDataListCall<'a, C, NC, A> { self._h = Some(new_value); self @@ -5064,7 +5222,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// The list of Annotation Data Ids to retrieve. Pagination is ignored if this is set. + /// The list of Annotation Data Ids to retrieve. Pagination is ignored if this is set. pub fn add_annotation_data_id(mut self, new_value: &str) -> LayerAnnotationDataListCall<'a, C, NC, A> { self._annotation_data_id.push(new_value.to_string()); self @@ -5125,7 +5283,7 @@ impl<'a, C, NC, A> LayerAnnotationDataListCall<'a, C, NC, A> where NC: hyper::ne /// Rate a recommended book for the current user. /// /// A builder for the *recommended.rate* method supported by a *volume* resource. -/// It is not used directly, but through a `VolumeMethods`. +/// It is not used directly, but through a `VolumeMethods` instance. /// /// # Example /// @@ -5195,7 +5353,7 @@ impl<'a, C, NC, A> VolumeRecommendedRateCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "rating", "volumeId", "source", "locale"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5224,7 +5382,7 @@ impl<'a, C, NC, A> VolumeRecommendedRateCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5236,7 +5394,6 @@ impl<'a, C, NC, A> VolumeRecommendedRateCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -5246,7 +5403,7 @@ impl<'a, C, NC, A> VolumeRecommendedRateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5257,7 +5414,7 @@ impl<'a, C, NC, A> VolumeRecommendedRateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5266,13 +5423,13 @@ impl<'a, C, NC, A> VolumeRecommendedRateCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5284,7 +5441,7 @@ impl<'a, C, NC, A> VolumeRecommendedRateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Rating to be given to the volume. + /// Rating to be given to the volume. pub fn rating(mut self, new_value: &str) -> VolumeRecommendedRateCall<'a, C, NC, A> { self._rating = new_value.to_string(); self @@ -5294,7 +5451,7 @@ impl<'a, C, NC, A> VolumeRecommendedRateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the source volume. + /// ID of the source volume. pub fn volume_id(mut self, new_value: &str) -> VolumeRecommendedRateCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -5302,7 +5459,7 @@ impl<'a, C, NC, A> VolumeRecommendedRateCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> VolumeRecommendedRateCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -5310,7 +5467,7 @@ impl<'a, C, NC, A> VolumeRecommendedRateCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *locale* query property to the given value. /// /// - /// ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. + /// ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. pub fn locale(mut self, new_value: &str) -> VolumeRecommendedRateCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -5371,7 +5528,7 @@ impl<'a, C, NC, A> VolumeRecommendedRateCall<'a, C, NC, A> where NC: hyper::net: /// Return a list of books in My Library. /// /// A builder for the *mybooks.list* method supported by a *volume* resource. -/// It is not used directly, but through a `VolumeMethods`. +/// It is not used directly, but through a `VolumeMethods` instance. /// /// # Example /// @@ -5465,7 +5622,7 @@ impl<'a, C, NC, A> VolumeMybookListCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "startIndex", "source", "processingState", "maxResults", "locale", "acquireMethod"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5494,7 +5651,7 @@ impl<'a, C, NC, A> VolumeMybookListCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5506,7 +5663,6 @@ impl<'a, C, NC, A> VolumeMybookListCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -5516,7 +5672,7 @@ impl<'a, C, NC, A> VolumeMybookListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5527,7 +5683,7 @@ impl<'a, C, NC, A> VolumeMybookListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5536,13 +5692,13 @@ impl<'a, C, NC, A> VolumeMybookListCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5552,7 +5708,7 @@ impl<'a, C, NC, A> VolumeMybookListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *start index* query property to the given value. /// /// - /// Index of the first result to return (starts at 0) + /// Index of the first result to return (starts at 0) pub fn start_index(mut self, new_value: u32) -> VolumeMybookListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -5560,7 +5716,7 @@ impl<'a, C, NC, A> VolumeMybookListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> VolumeMybookListCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -5569,7 +5725,7 @@ impl<'a, C, NC, A> VolumeMybookListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// The processing state of the user uploaded volumes to be returned. Applicable only if the UPLOADED is specified in the acquireMethod. + /// The processing state of the user uploaded volumes to be returned. Applicable only if the UPLOADED is specified in the acquireMethod. pub fn add_processing_state(mut self, new_value: &str) -> VolumeMybookListCall<'a, C, NC, A> { self._processing_state.push(new_value.to_string()); self @@ -5577,7 +5733,7 @@ impl<'a, C, NC, A> VolumeMybookListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: u32) -> VolumeMybookListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -5585,7 +5741,7 @@ impl<'a, C, NC, A> VolumeMybookListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *locale* query property to the given value. /// /// - /// ISO-639-1 language and ISO-3166-1 country code. Ex:'en_US'. Used for generating recommendations. + /// ISO-639-1 language and ISO-3166-1 country code. Ex:'en_US'. Used for generating recommendations. pub fn locale(mut self, new_value: &str) -> VolumeMybookListCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -5594,7 +5750,7 @@ impl<'a, C, NC, A> VolumeMybookListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// How the book was aquired + /// How the book was aquired pub fn add_acquire_method(mut self, new_value: &str) -> VolumeMybookListCall<'a, C, NC, A> { self._acquire_method.push(new_value.to_string()); self @@ -5655,7 +5811,7 @@ impl<'a, C, NC, A> VolumeMybookListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Performs a book search. /// /// A builder for the *list* method supported by a *volume* resource. -/// It is not used directly, but through a `VolumeMethods`. +/// It is not used directly, but through a `VolumeMethods` instance. /// /// # Example /// @@ -5773,7 +5929,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "q", "startIndex", "source", "showPreorders", "projection", "printType", "partner", "orderBy", "maxResults", "libraryRestrict", "langRestrict", "filter", "download"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5802,7 +5958,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5814,7 +5970,6 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -5824,7 +5979,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5835,7 +5990,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5844,13 +5999,13 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5862,7 +6017,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Full-text search query string. + /// Full-text search query string. pub fn q(mut self, new_value: &str) -> VolumeListCall<'a, C, NC, A> { self._q = new_value.to_string(); self @@ -5870,7 +6025,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *start index* query property to the given value. /// /// - /// Index of the first result to return (starts at 0) + /// Index of the first result to return (starts at 0) pub fn start_index(mut self, new_value: u32) -> VolumeListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -5878,7 +6033,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> VolumeListCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -5886,7 +6041,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *show preorders* query property to the given value. /// /// - /// Set to true to show books available for preorder. Defaults to false. + /// Set to true to show books available for preorder. Defaults to false. pub fn show_preorders(mut self, new_value: bool) -> VolumeListCall<'a, C, NC, A> { self._show_preorders = Some(new_value); self @@ -5894,7 +6049,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *projection* query property to the given value. /// /// - /// Restrict information returned to a set of selected fields. + /// Restrict information returned to a set of selected fields. pub fn projection(mut self, new_value: &str) -> VolumeListCall<'a, C, NC, A> { self._projection = Some(new_value.to_string()); self @@ -5902,7 +6057,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *print type* query property to the given value. /// /// - /// Restrict to books or magazines. + /// Restrict to books or magazines. pub fn print_type(mut self, new_value: &str) -> VolumeListCall<'a, C, NC, A> { self._print_type = Some(new_value.to_string()); self @@ -5910,7 +6065,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *partner* query property to the given value. /// /// - /// Restrict and brand results for partner ID. + /// Restrict and brand results for partner ID. pub fn partner(mut self, new_value: &str) -> VolumeListCall<'a, C, NC, A> { self._partner = Some(new_value.to_string()); self @@ -5918,7 +6073,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *order by* query property to the given value. /// /// - /// Sort search results. + /// Sort search results. pub fn order_by(mut self, new_value: &str) -> VolumeListCall<'a, C, NC, A> { self._order_by = Some(new_value.to_string()); self @@ -5926,7 +6081,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: u32) -> VolumeListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -5934,7 +6089,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *library restrict* query property to the given value. /// /// - /// Restrict search to this user's library. + /// Restrict search to this user's library. pub fn library_restrict(mut self, new_value: &str) -> VolumeListCall<'a, C, NC, A> { self._library_restrict = Some(new_value.to_string()); self @@ -5942,7 +6097,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *lang restrict* query property to the given value. /// /// - /// Restrict results to books with this language code. + /// Restrict results to books with this language code. pub fn lang_restrict(mut self, new_value: &str) -> VolumeListCall<'a, C, NC, A> { self._lang_restrict = Some(new_value.to_string()); self @@ -5950,7 +6105,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *filter* query property to the given value. /// /// - /// Filter search results. + /// Filter search results. pub fn filter(mut self, new_value: &str) -> VolumeListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -5958,7 +6113,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *download* query property to the given value. /// /// - /// Restrict to volumes by download availability. + /// Restrict to volumes by download availability. pub fn download(mut self, new_value: &str) -> VolumeListCall<'a, C, NC, A> { self._download = Some(new_value.to_string()); self @@ -6019,7 +6174,7 @@ impl<'a, C, NC, A> VolumeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Return a list of books uploaded by the current user. /// /// A builder for the *useruploaded.list* method supported by a *volume* resource. -/// It is not used directly, but through a `VolumeMethods`. +/// It is not used directly, but through a `VolumeMethods` instance. /// /// # Example /// @@ -6113,7 +6268,7 @@ impl<'a, C, NC, A> VolumeUseruploadedListCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "volumeId", "startIndex", "source", "processingState", "maxResults", "locale"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6142,7 +6297,7 @@ impl<'a, C, NC, A> VolumeUseruploadedListCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6154,7 +6309,6 @@ impl<'a, C, NC, A> VolumeUseruploadedListCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -6164,7 +6318,7 @@ impl<'a, C, NC, A> VolumeUseruploadedListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6175,7 +6329,7 @@ impl<'a, C, NC, A> VolumeUseruploadedListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6184,13 +6338,13 @@ impl<'a, C, NC, A> VolumeUseruploadedListCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6201,7 +6355,7 @@ impl<'a, C, NC, A> VolumeUseruploadedListCall<'a, C, NC, A> where NC: hyper::net /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// The ids of the volumes to be returned. If not specified all that match the processingState are returned. + /// The ids of the volumes to be returned. If not specified all that match the processingState are returned. pub fn add_volume_id(mut self, new_value: &str) -> VolumeUseruploadedListCall<'a, C, NC, A> { self._volume_id.push(new_value.to_string()); self @@ -6209,7 +6363,7 @@ impl<'a, C, NC, A> VolumeUseruploadedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *start index* query property to the given value. /// /// - /// Index of the first result to return (starts at 0) + /// Index of the first result to return (starts at 0) pub fn start_index(mut self, new_value: u32) -> VolumeUseruploadedListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -6217,7 +6371,7 @@ impl<'a, C, NC, A> VolumeUseruploadedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> VolumeUseruploadedListCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -6226,7 +6380,7 @@ impl<'a, C, NC, A> VolumeUseruploadedListCall<'a, C, NC, A> where NC: hyper::net /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// The processing state of the user uploaded volumes to be returned. + /// The processing state of the user uploaded volumes to be returned. pub fn add_processing_state(mut self, new_value: &str) -> VolumeUseruploadedListCall<'a, C, NC, A> { self._processing_state.push(new_value.to_string()); self @@ -6234,7 +6388,7 @@ impl<'a, C, NC, A> VolumeUseruploadedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: u32) -> VolumeUseruploadedListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -6242,7 +6396,7 @@ impl<'a, C, NC, A> VolumeUseruploadedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *locale* query property to the given value. /// /// - /// ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. + /// ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. pub fn locale(mut self, new_value: &str) -> VolumeUseruploadedListCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -6303,7 +6457,7 @@ impl<'a, C, NC, A> VolumeUseruploadedListCall<'a, C, NC, A> where NC: hyper::net /// Return a list of associated books. /// /// A builder for the *associated.list* method supported by a *volume* resource. -/// It is not used directly, but through a `VolumeMethods`. +/// It is not used directly, but through a `VolumeMethods` instance. /// /// # Example /// @@ -6376,7 +6530,7 @@ impl<'a, C, NC, A> VolumeAssociatedListCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "volumeId", "source", "locale", "association"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6429,7 +6583,7 @@ impl<'a, C, NC, A> VolumeAssociatedListCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6441,7 +6595,6 @@ impl<'a, C, NC, A> VolumeAssociatedListCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -6451,7 +6604,7 @@ impl<'a, C, NC, A> VolumeAssociatedListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6462,7 +6615,7 @@ impl<'a, C, NC, A> VolumeAssociatedListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6471,13 +6624,13 @@ impl<'a, C, NC, A> VolumeAssociatedListCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6489,7 +6642,7 @@ impl<'a, C, NC, A> VolumeAssociatedListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the source volume. + /// ID of the source volume. pub fn volume_id(mut self, new_value: &str) -> VolumeAssociatedListCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -6497,7 +6650,7 @@ impl<'a, C, NC, A> VolumeAssociatedListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> VolumeAssociatedListCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -6505,7 +6658,7 @@ impl<'a, C, NC, A> VolumeAssociatedListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *locale* query property to the given value. /// /// - /// ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. + /// ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. pub fn locale(mut self, new_value: &str) -> VolumeAssociatedListCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -6513,7 +6666,7 @@ impl<'a, C, NC, A> VolumeAssociatedListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *association* query property to the given value. /// /// - /// Association type. + /// Association type. pub fn association(mut self, new_value: &str) -> VolumeAssociatedListCall<'a, C, NC, A> { self._association = Some(new_value.to_string()); self @@ -6574,7 +6727,7 @@ impl<'a, C, NC, A> VolumeAssociatedListCall<'a, C, NC, A> where NC: hyper::net:: /// Gets volume information for a single volume. /// /// A builder for the *get* method supported by a *volume* resource. -/// It is not used directly, but through a `VolumeMethods`. +/// It is not used directly, but through a `VolumeMethods` instance. /// /// # Example /// @@ -6657,7 +6810,7 @@ impl<'a, C, NC, A> VolumeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "volumeId", "user_library_consistent_read", "source", "projection", "partner", "country"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6710,7 +6863,7 @@ impl<'a, C, NC, A> VolumeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6722,7 +6875,6 @@ impl<'a, C, NC, A> VolumeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -6732,7 +6884,7 @@ impl<'a, C, NC, A> VolumeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6743,7 +6895,7 @@ impl<'a, C, NC, A> VolumeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6752,13 +6904,13 @@ impl<'a, C, NC, A> VolumeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6770,7 +6922,7 @@ impl<'a, C, NC, A> VolumeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of volume to retrieve. + /// ID of volume to retrieve. pub fn volume_id(mut self, new_value: &str) -> VolumeGetCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -6785,7 +6937,7 @@ impl<'a, C, NC, A> VolumeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> VolumeGetCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -6793,7 +6945,7 @@ impl<'a, C, NC, A> VolumeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *projection* query property to the given value. /// /// - /// Restrict information returned to a set of selected fields. + /// Restrict information returned to a set of selected fields. pub fn projection(mut self, new_value: &str) -> VolumeGetCall<'a, C, NC, A> { self._projection = Some(new_value.to_string()); self @@ -6801,7 +6953,7 @@ impl<'a, C, NC, A> VolumeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *partner* query property to the given value. /// /// - /// Brand results for partner ID. + /// Brand results for partner ID. pub fn partner(mut self, new_value: &str) -> VolumeGetCall<'a, C, NC, A> { self._partner = Some(new_value.to_string()); self @@ -6809,7 +6961,7 @@ impl<'a, C, NC, A> VolumeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *country* query property to the given value. /// /// - /// ISO-3166-1 code to override the IP-based location. + /// ISO-3166-1 code to override the IP-based location. pub fn country(mut self, new_value: &str) -> VolumeGetCall<'a, C, NC, A> { self._country = Some(new_value.to_string()); self @@ -6870,7 +7022,7 @@ impl<'a, C, NC, A> VolumeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Return a list of recommended books for the current user. /// /// A builder for the *recommended.list* method supported by a *volume* resource. -/// It is not used directly, but through a `VolumeMethods`. +/// It is not used directly, but through a `VolumeMethods` instance. /// /// # Example /// @@ -6936,7 +7088,7 @@ impl<'a, C, NC, A> VolumeRecommendedListCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "source", "locale"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6965,7 +7117,7 @@ impl<'a, C, NC, A> VolumeRecommendedListCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6977,7 +7129,6 @@ impl<'a, C, NC, A> VolumeRecommendedListCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -6987,7 +7138,7 @@ impl<'a, C, NC, A> VolumeRecommendedListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6998,7 +7149,7 @@ impl<'a, C, NC, A> VolumeRecommendedListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7007,13 +7158,13 @@ impl<'a, C, NC, A> VolumeRecommendedListCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7023,7 +7174,7 @@ impl<'a, C, NC, A> VolumeRecommendedListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> VolumeRecommendedListCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -7031,7 +7182,7 @@ impl<'a, C, NC, A> VolumeRecommendedListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *locale* query property to the given value. /// /// - /// ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. + /// ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations. pub fn locale(mut self, new_value: &str) -> VolumeRecommendedListCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -7092,7 +7243,7 @@ impl<'a, C, NC, A> VolumeRecommendedListCall<'a, C, NC, A> where NC: hyper::net: /// Returns a list of offline dictionary meatadata available /// /// A builder for the *listOfflineMetadata* method supported by a *dictionary* resource. -/// It is not used directly, but through a `DictionaryMethods`. +/// It is not used directly, but through a `DictionaryMethods` instance. /// /// # Example /// @@ -7150,7 +7301,7 @@ impl<'a, C, NC, A> DictionaryListOfflineMetadataCall<'a, C, NC, A> where NC: hyp for &field in ["alt", "cpksver"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7179,7 +7330,7 @@ impl<'a, C, NC, A> DictionaryListOfflineMetadataCall<'a, C, NC, A> where NC: hyp } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7191,7 +7342,6 @@ impl<'a, C, NC, A> DictionaryListOfflineMetadataCall<'a, C, NC, A> where NC: hyp dlg.pre_request(); req.send() - }; match req_result { @@ -7201,7 +7351,7 @@ impl<'a, C, NC, A> DictionaryListOfflineMetadataCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7212,7 +7362,7 @@ impl<'a, C, NC, A> DictionaryListOfflineMetadataCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7221,13 +7371,13 @@ impl<'a, C, NC, A> DictionaryListOfflineMetadataCall<'a, C, NC, A> where NC: hyp Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7239,7 +7389,7 @@ impl<'a, C, NC, A> DictionaryListOfflineMetadataCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The device/version ID from which to request the data. + /// The device/version ID from which to request the data. pub fn cpksver(mut self, new_value: &str) -> DictionaryListOfflineMetadataCall<'a, C, NC, A> { self._cpksver = new_value.to_string(); self @@ -7300,7 +7450,7 @@ impl<'a, C, NC, A> DictionaryListOfflineMetadataCall<'a, C, NC, A> where NC: hyp /// Retrieves volumes in a specific bookshelf for the specified user. /// /// A builder for the *volumes.list* method supported by a *bookshelve* resource. -/// It is not used directly, but through a `BookshelveMethods`. +/// It is not used directly, but through a `BookshelveMethods` instance. /// /// # Example /// @@ -7380,7 +7530,7 @@ impl<'a, C, NC, A> BookshelveVolumeListCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "userId", "shelf", "startIndex", "source", "showPreorders", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7433,7 +7583,7 @@ impl<'a, C, NC, A> BookshelveVolumeListCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7445,7 +7595,6 @@ impl<'a, C, NC, A> BookshelveVolumeListCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -7455,7 +7604,7 @@ impl<'a, C, NC, A> BookshelveVolumeListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7466,7 +7615,7 @@ impl<'a, C, NC, A> BookshelveVolumeListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7475,13 +7624,13 @@ impl<'a, C, NC, A> BookshelveVolumeListCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7493,7 +7642,7 @@ impl<'a, C, NC, A> BookshelveVolumeListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of user for whom to retrieve bookshelf volumes. + /// ID of user for whom to retrieve bookshelf volumes. pub fn user_id(mut self, new_value: &str) -> BookshelveVolumeListCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -7503,7 +7652,7 @@ impl<'a, C, NC, A> BookshelveVolumeListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of bookshelf to retrieve volumes. + /// ID of bookshelf to retrieve volumes. pub fn shelf(mut self, new_value: &str) -> BookshelveVolumeListCall<'a, C, NC, A> { self._shelf = new_value.to_string(); self @@ -7511,7 +7660,7 @@ impl<'a, C, NC, A> BookshelveVolumeListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *start index* query property to the given value. /// /// - /// Index of the first element to return (starts at 0) + /// Index of the first element to return (starts at 0) pub fn start_index(mut self, new_value: u32) -> BookshelveVolumeListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -7519,7 +7668,7 @@ impl<'a, C, NC, A> BookshelveVolumeListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> BookshelveVolumeListCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -7527,7 +7676,7 @@ impl<'a, C, NC, A> BookshelveVolumeListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *show preorders* query property to the given value. /// /// - /// Set to true to show pre-ordered books. Defaults to false. + /// Set to true to show pre-ordered books. Defaults to false. pub fn show_preorders(mut self, new_value: bool) -> BookshelveVolumeListCall<'a, C, NC, A> { self._show_preorders = Some(new_value); self @@ -7535,7 +7684,7 @@ impl<'a, C, NC, A> BookshelveVolumeListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return + /// Maximum number of results to return pub fn max_results(mut self, new_value: u32) -> BookshelveVolumeListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -7596,7 +7745,7 @@ impl<'a, C, NC, A> BookshelveVolumeListCall<'a, C, NC, A> where NC: hyper::net:: /// Retrieves a list of public bookshelves for the specified user. /// /// A builder for the *list* method supported by a *bookshelve* resource. -/// It is not used directly, but through a `BookshelveMethods`. +/// It is not used directly, but through a `BookshelveMethods` instance. /// /// # Example /// @@ -7659,7 +7808,7 @@ impl<'a, C, NC, A> BookshelveListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "userId", "source"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7712,7 +7861,7 @@ impl<'a, C, NC, A> BookshelveListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7724,7 +7873,6 @@ impl<'a, C, NC, A> BookshelveListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -7734,7 +7882,7 @@ impl<'a, C, NC, A> BookshelveListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7745,7 +7893,7 @@ impl<'a, C, NC, A> BookshelveListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7754,13 +7902,13 @@ impl<'a, C, NC, A> BookshelveListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7772,7 +7920,7 @@ impl<'a, C, NC, A> BookshelveListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of user for whom to retrieve bookshelves. + /// ID of user for whom to retrieve bookshelves. pub fn user_id(mut self, new_value: &str) -> BookshelveListCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -7780,7 +7928,7 @@ impl<'a, C, NC, A> BookshelveListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> BookshelveListCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -7841,7 +7989,7 @@ impl<'a, C, NC, A> BookshelveListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieves metadata for a specific bookshelf for the specified user. /// /// A builder for the *get* method supported by a *bookshelve* resource. -/// It is not used directly, but through a `BookshelveMethods`. +/// It is not used directly, but through a `BookshelveMethods` instance. /// /// # Example /// @@ -7906,7 +8054,7 @@ impl<'a, C, NC, A> BookshelveGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "userId", "shelf", "source"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7959,7 +8107,7 @@ impl<'a, C, NC, A> BookshelveGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7971,7 +8119,6 @@ impl<'a, C, NC, A> BookshelveGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -7981,7 +8128,7 @@ impl<'a, C, NC, A> BookshelveGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7992,7 +8139,7 @@ impl<'a, C, NC, A> BookshelveGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8001,13 +8148,13 @@ impl<'a, C, NC, A> BookshelveGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8019,7 +8166,7 @@ impl<'a, C, NC, A> BookshelveGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of user for whom to retrieve bookshelves. + /// ID of user for whom to retrieve bookshelves. pub fn user_id(mut self, new_value: &str) -> BookshelveGetCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -8029,7 +8176,7 @@ impl<'a, C, NC, A> BookshelveGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of bookshelf to retrieve. + /// ID of bookshelf to retrieve. pub fn shelf(mut self, new_value: &str) -> BookshelveGetCall<'a, C, NC, A> { self._shelf = new_value.to_string(); self @@ -8037,7 +8184,7 @@ impl<'a, C, NC, A> BookshelveGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> BookshelveGetCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -8098,7 +8245,7 @@ impl<'a, C, NC, A> BookshelveGetCall<'a, C, NC, A> where NC: hyper::net::Network /// /// /// A builder for the *accept* method supported by a *promooffer* resource. -/// It is not used directly, but through a `PromoofferMethods`. +/// It is not used directly, but through a `PromoofferMethods` instance. /// /// # Example /// @@ -8194,7 +8341,7 @@ impl<'a, C, NC, A> PromoofferAcceptCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["volumeId", "serial", "product", "offerId", "model", "manufacturer", "device", "androidId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8222,7 +8369,7 @@ impl<'a, C, NC, A> PromoofferAcceptCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8234,7 +8381,6 @@ impl<'a, C, NC, A> PromoofferAcceptCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -8244,7 +8390,7 @@ impl<'a, C, NC, A> PromoofferAcceptCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8255,12 +8401,12 @@ impl<'a, C, NC, A> PromoofferAcceptCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8270,7 +8416,7 @@ impl<'a, C, NC, A> PromoofferAcceptCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *volume id* query property to the given value. /// /// - /// Volume id to exercise the offer + /// Volume id to exercise the offer pub fn volume_id(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, NC, A> { self._volume_id = Some(new_value.to_string()); self @@ -8278,7 +8424,7 @@ impl<'a, C, NC, A> PromoofferAcceptCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *serial* query property to the given value. /// /// - /// device serial + /// device serial pub fn serial(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, NC, A> { self._serial = Some(new_value.to_string()); self @@ -8286,7 +8432,7 @@ impl<'a, C, NC, A> PromoofferAcceptCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *product* query property to the given value. /// /// - /// device product + /// device product pub fn product(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, NC, A> { self._product = Some(new_value.to_string()); self @@ -8301,7 +8447,7 @@ impl<'a, C, NC, A> PromoofferAcceptCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *model* query property to the given value. /// /// - /// device model + /// device model pub fn model(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, NC, A> { self._model = Some(new_value.to_string()); self @@ -8309,7 +8455,7 @@ impl<'a, C, NC, A> PromoofferAcceptCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *manufacturer* query property to the given value. /// /// - /// device manufacturer + /// device manufacturer pub fn manufacturer(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, NC, A> { self._manufacturer = Some(new_value.to_string()); self @@ -8317,7 +8463,7 @@ impl<'a, C, NC, A> PromoofferAcceptCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *device* query property to the given value. /// /// - /// device device + /// device device pub fn device(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, NC, A> { self._device = Some(new_value.to_string()); self @@ -8325,7 +8471,7 @@ impl<'a, C, NC, A> PromoofferAcceptCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *android id* query property to the given value. /// /// - /// device android_id + /// device android_id pub fn android_id(mut self, new_value: &str) -> PromoofferAcceptCall<'a, C, NC, A> { self._android_id = Some(new_value.to_string()); self @@ -8386,7 +8532,7 @@ impl<'a, C, NC, A> PromoofferAcceptCall<'a, C, NC, A> where NC: hyper::net::Netw /// /// /// A builder for the *dismiss* method supported by a *promooffer* resource. -/// It is not used directly, but through a `PromoofferMethods`. +/// It is not used directly, but through a `PromoofferMethods` instance. /// /// # Example /// @@ -8477,7 +8623,7 @@ impl<'a, C, NC, A> PromoofferDismisCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["serial", "product", "offerId", "model", "manufacturer", "device", "androidId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8505,7 +8651,7 @@ impl<'a, C, NC, A> PromoofferDismisCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8517,7 +8663,6 @@ impl<'a, C, NC, A> PromoofferDismisCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -8527,7 +8672,7 @@ impl<'a, C, NC, A> PromoofferDismisCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8538,12 +8683,12 @@ impl<'a, C, NC, A> PromoofferDismisCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8553,7 +8698,7 @@ impl<'a, C, NC, A> PromoofferDismisCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *serial* query property to the given value. /// /// - /// device serial + /// device serial pub fn serial(mut self, new_value: &str) -> PromoofferDismisCall<'a, C, NC, A> { self._serial = Some(new_value.to_string()); self @@ -8561,7 +8706,7 @@ impl<'a, C, NC, A> PromoofferDismisCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *product* query property to the given value. /// /// - /// device product + /// device product pub fn product(mut self, new_value: &str) -> PromoofferDismisCall<'a, C, NC, A> { self._product = Some(new_value.to_string()); self @@ -8569,7 +8714,7 @@ impl<'a, C, NC, A> PromoofferDismisCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *offer id* query property to the given value. /// /// - /// Offer to dimiss + /// Offer to dimiss pub fn offer_id(mut self, new_value: &str) -> PromoofferDismisCall<'a, C, NC, A> { self._offer_id = Some(new_value.to_string()); self @@ -8577,7 +8722,7 @@ impl<'a, C, NC, A> PromoofferDismisCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *model* query property to the given value. /// /// - /// device model + /// device model pub fn model(mut self, new_value: &str) -> PromoofferDismisCall<'a, C, NC, A> { self._model = Some(new_value.to_string()); self @@ -8585,7 +8730,7 @@ impl<'a, C, NC, A> PromoofferDismisCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *manufacturer* query property to the given value. /// /// - /// device manufacturer + /// device manufacturer pub fn manufacturer(mut self, new_value: &str) -> PromoofferDismisCall<'a, C, NC, A> { self._manufacturer = Some(new_value.to_string()); self @@ -8593,7 +8738,7 @@ impl<'a, C, NC, A> PromoofferDismisCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *device* query property to the given value. /// /// - /// device device + /// device device pub fn device(mut self, new_value: &str) -> PromoofferDismisCall<'a, C, NC, A> { self._device = Some(new_value.to_string()); self @@ -8601,7 +8746,7 @@ impl<'a, C, NC, A> PromoofferDismisCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *android id* query property to the given value. /// /// - /// device android_id + /// device android_id pub fn android_id(mut self, new_value: &str) -> PromoofferDismisCall<'a, C, NC, A> { self._android_id = Some(new_value.to_string()); self @@ -8662,7 +8807,7 @@ impl<'a, C, NC, A> PromoofferDismisCall<'a, C, NC, A> where NC: hyper::net::Netw /// Returns a list of promo offers available to the user /// /// A builder for the *get* method supported by a *promooffer* resource. -/// It is not used directly, but through a `PromoofferMethods`. +/// It is not used directly, but through a `PromoofferMethods` instance. /// /// # Example /// @@ -8748,7 +8893,7 @@ impl<'a, C, NC, A> PromoofferGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "serial", "product", "model", "manufacturer", "device", "androidId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8777,7 +8922,7 @@ impl<'a, C, NC, A> PromoofferGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8789,7 +8934,6 @@ impl<'a, C, NC, A> PromoofferGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -8799,7 +8943,7 @@ impl<'a, C, NC, A> PromoofferGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8810,7 +8954,7 @@ impl<'a, C, NC, A> PromoofferGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8819,13 +8963,13 @@ impl<'a, C, NC, A> PromoofferGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8835,7 +8979,7 @@ impl<'a, C, NC, A> PromoofferGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *serial* query property to the given value. /// /// - /// device serial + /// device serial pub fn serial(mut self, new_value: &str) -> PromoofferGetCall<'a, C, NC, A> { self._serial = Some(new_value.to_string()); self @@ -8843,7 +8987,7 @@ impl<'a, C, NC, A> PromoofferGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *product* query property to the given value. /// /// - /// device product + /// device product pub fn product(mut self, new_value: &str) -> PromoofferGetCall<'a, C, NC, A> { self._product = Some(new_value.to_string()); self @@ -8851,7 +8995,7 @@ impl<'a, C, NC, A> PromoofferGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *model* query property to the given value. /// /// - /// device model + /// device model pub fn model(mut self, new_value: &str) -> PromoofferGetCall<'a, C, NC, A> { self._model = Some(new_value.to_string()); self @@ -8859,7 +9003,7 @@ impl<'a, C, NC, A> PromoofferGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *manufacturer* query property to the given value. /// /// - /// device manufacturer + /// device manufacturer pub fn manufacturer(mut self, new_value: &str) -> PromoofferGetCall<'a, C, NC, A> { self._manufacturer = Some(new_value.to_string()); self @@ -8867,7 +9011,7 @@ impl<'a, C, NC, A> PromoofferGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *device* query property to the given value. /// /// - /// device device + /// device device pub fn device(mut self, new_value: &str) -> PromoofferGetCall<'a, C, NC, A> { self._device = Some(new_value.to_string()); self @@ -8875,7 +9019,7 @@ impl<'a, C, NC, A> PromoofferGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *android id* query property to the given value. /// /// - /// device android_id + /// device android_id pub fn android_id(mut self, new_value: &str) -> PromoofferGetCall<'a, C, NC, A> { self._android_id = Some(new_value.to_string()); self @@ -8936,7 +9080,7 @@ impl<'a, C, NC, A> PromoofferGetCall<'a, C, NC, A> where NC: hyper::net::Network /// List categories for onboarding experience. /// /// A builder for the *listCategories* method supported by a *onboarding* resource. -/// It is not used directly, but through a `OnboardingMethods`. +/// It is not used directly, but through a `OnboardingMethods` instance. /// /// # Example /// @@ -8997,7 +9141,7 @@ impl<'a, C, NC, A> OnboardingListCategoryCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "locale"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9026,7 +9170,7 @@ impl<'a, C, NC, A> OnboardingListCategoryCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9038,7 +9182,6 @@ impl<'a, C, NC, A> OnboardingListCategoryCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -9048,7 +9191,7 @@ impl<'a, C, NC, A> OnboardingListCategoryCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9059,7 +9202,7 @@ impl<'a, C, NC, A> OnboardingListCategoryCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9068,13 +9211,13 @@ impl<'a, C, NC, A> OnboardingListCategoryCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9084,7 +9227,7 @@ impl<'a, C, NC, A> OnboardingListCategoryCall<'a, C, NC, A> where NC: hyper::net /// Sets the *locale* query property to the given value. /// /// - /// ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset. + /// ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset. pub fn locale(mut self, new_value: &str) -> OnboardingListCategoryCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -9145,7 +9288,7 @@ impl<'a, C, NC, A> OnboardingListCategoryCall<'a, C, NC, A> where NC: hyper::net /// List available volumes under categories for onboarding experience. /// /// A builder for the *listCategoryVolumes* method supported by a *onboarding* resource. -/// It is not used directly, but through a `OnboardingMethods`. +/// It is not used directly, but through a `OnboardingMethods` instance. /// /// # Example /// @@ -9225,7 +9368,7 @@ impl<'a, C, NC, A> OnboardingListCategoryVolumeCall<'a, C, NC, A> where NC: hype for &field in ["alt", "pageToken", "pageSize", "locale", "categoryId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9254,7 +9397,7 @@ impl<'a, C, NC, A> OnboardingListCategoryVolumeCall<'a, C, NC, A> where NC: hype } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9266,7 +9409,6 @@ impl<'a, C, NC, A> OnboardingListCategoryVolumeCall<'a, C, NC, A> where NC: hype dlg.pre_request(); req.send() - }; match req_result { @@ -9276,7 +9418,7 @@ impl<'a, C, NC, A> OnboardingListCategoryVolumeCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9287,7 +9429,7 @@ impl<'a, C, NC, A> OnboardingListCategoryVolumeCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9296,13 +9438,13 @@ impl<'a, C, NC, A> OnboardingListCategoryVolumeCall<'a, C, NC, A> where NC: hype Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9312,7 +9454,7 @@ impl<'a, C, NC, A> OnboardingListCategoryVolumeCall<'a, C, NC, A> where NC: hype /// Sets the *page token* query property to the given value. /// /// - /// The value of the nextToken from the previous page. + /// The value of the nextToken from the previous page. pub fn page_token(mut self, new_value: &str) -> OnboardingListCategoryVolumeCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -9320,7 +9462,7 @@ impl<'a, C, NC, A> OnboardingListCategoryVolumeCall<'a, C, NC, A> where NC: hype /// Sets the *page size* query property to the given value. /// /// - /// Number of maximum results per page to be included in the response. + /// Number of maximum results per page to be included in the response. pub fn page_size(mut self, new_value: u32) -> OnboardingListCategoryVolumeCall<'a, C, NC, A> { self._page_size = Some(new_value); self @@ -9328,7 +9470,7 @@ impl<'a, C, NC, A> OnboardingListCategoryVolumeCall<'a, C, NC, A> where NC: hype /// Sets the *locale* query property to the given value. /// /// - /// ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset. + /// ISO-639-1 language and ISO-3166-1 country code. Default is en-US if unset. pub fn locale(mut self, new_value: &str) -> OnboardingListCategoryVolumeCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -9337,7 +9479,7 @@ impl<'a, C, NC, A> OnboardingListCategoryVolumeCall<'a, C, NC, A> where NC: hype /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// List of category ids requested. + /// List of category ids requested. pub fn add_category_id(mut self, new_value: &str) -> OnboardingListCategoryVolumeCall<'a, C, NC, A> { self._category_id.push(new_value.to_string()); self @@ -9398,7 +9540,7 @@ impl<'a, C, NC, A> OnboardingListCategoryVolumeCall<'a, C, NC, A> where NC: hype /// Request concurrent and download access restrictions. /// /// A builder for the *requestAccess* method supported by a *myconfig* resource. -/// It is not used directly, but through a `MyconfigMethods`. +/// It is not used directly, but through a `MyconfigMethods` instance. /// /// # Example /// @@ -9472,7 +9614,7 @@ impl<'a, C, NC, A> MyconfigRequestAccesCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "source", "volumeId", "nonce", "cpksver", "locale", "licenseTypes"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9501,7 +9643,7 @@ impl<'a, C, NC, A> MyconfigRequestAccesCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9513,7 +9655,6 @@ impl<'a, C, NC, A> MyconfigRequestAccesCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -9523,7 +9664,7 @@ impl<'a, C, NC, A> MyconfigRequestAccesCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9534,7 +9675,7 @@ impl<'a, C, NC, A> MyconfigRequestAccesCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9543,13 +9684,13 @@ impl<'a, C, NC, A> MyconfigRequestAccesCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9561,7 +9702,7 @@ impl<'a, C, NC, A> MyconfigRequestAccesCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MyconfigRequestAccesCall<'a, C, NC, A> { self._source = new_value.to_string(); self @@ -9571,7 +9712,7 @@ impl<'a, C, NC, A> MyconfigRequestAccesCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The volume to request concurrent/download restrictions for. + /// The volume to request concurrent/download restrictions for. pub fn volume_id(mut self, new_value: &str) -> MyconfigRequestAccesCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -9581,7 +9722,7 @@ impl<'a, C, NC, A> MyconfigRequestAccesCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The client nonce value. + /// The client nonce value. pub fn nonce(mut self, new_value: &str) -> MyconfigRequestAccesCall<'a, C, NC, A> { self._nonce = new_value.to_string(); self @@ -9591,7 +9732,7 @@ impl<'a, C, NC, A> MyconfigRequestAccesCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The device/version ID from which to request the restrictions. + /// The device/version ID from which to request the restrictions. pub fn cpksver(mut self, new_value: &str) -> MyconfigRequestAccesCall<'a, C, NC, A> { self._cpksver = new_value.to_string(); self @@ -9599,7 +9740,7 @@ impl<'a, C, NC, A> MyconfigRequestAccesCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *locale* query property to the given value. /// /// - /// ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. + /// ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. pub fn locale(mut self, new_value: &str) -> MyconfigRequestAccesCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -9607,7 +9748,7 @@ impl<'a, C, NC, A> MyconfigRequestAccesCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *license types* query property to the given value. /// /// - /// The type of access license to request. If not specified, the default is BOTH. + /// The type of access license to request. If not specified, the default is BOTH. pub fn license_types(mut self, new_value: &str) -> MyconfigRequestAccesCall<'a, C, NC, A> { self._license_types = Some(new_value.to_string()); self @@ -9668,7 +9809,7 @@ impl<'a, C, NC, A> MyconfigRequestAccesCall<'a, C, NC, A> where NC: hyper::net:: /// Release downloaded content access restriction. /// /// A builder for the *releaseDownloadAccess* method supported by a *myconfig* resource. -/// It is not used directly, but through a `MyconfigMethods`. +/// It is not used directly, but through a `MyconfigMethods` instance. /// /// # Example /// @@ -9744,7 +9885,7 @@ impl<'a, C, NC, A> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> where NC: hype for &field in ["alt", "volumeIds", "cpksver", "source", "locale"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9773,7 +9914,7 @@ impl<'a, C, NC, A> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> where NC: hype } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9785,7 +9926,6 @@ impl<'a, C, NC, A> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> where NC: hype dlg.pre_request(); req.send() - }; match req_result { @@ -9795,7 +9935,7 @@ impl<'a, C, NC, A> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9806,7 +9946,7 @@ impl<'a, C, NC, A> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9815,13 +9955,13 @@ impl<'a, C, NC, A> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> where NC: hype Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9834,7 +9974,7 @@ impl<'a, C, NC, A> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The volume(s) to release restrictions for. + /// The volume(s) to release restrictions for. pub fn add_volume_ids(mut self, new_value: &str) -> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> { self._volume_ids.push(new_value.to_string()); self @@ -9844,7 +9984,7 @@ impl<'a, C, NC, A> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The device/version ID from which to release the restriction. + /// The device/version ID from which to release the restriction. pub fn cpksver(mut self, new_value: &str) -> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> { self._cpksver = new_value.to_string(); self @@ -9852,7 +9992,7 @@ impl<'a, C, NC, A> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> where NC: hype /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -9860,7 +10000,7 @@ impl<'a, C, NC, A> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> where NC: hype /// Sets the *locale* query property to the given value. /// /// - /// ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. + /// ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. pub fn locale(mut self, new_value: &str) -> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -9921,7 +10061,7 @@ impl<'a, C, NC, A> MyconfigReleaseDownloadAccesCall<'a, C, NC, A> where NC: hype /// Request downloaded content access for specified volumes on the My eBooks shelf. /// /// A builder for the *syncVolumeLicenses* method supported by a *myconfig* resource. -/// It is not used directly, but through a `MyconfigMethods`. +/// It is not used directly, but through a `MyconfigMethods` instance. /// /// # Example /// @@ -10011,7 +10151,7 @@ impl<'a, C, NC, A> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt", "source", "nonce", "cpksver", "volumeIds", "showPreorders", "locale", "features"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10040,7 +10180,7 @@ impl<'a, C, NC, A> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10052,7 +10192,6 @@ impl<'a, C, NC, A> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -10062,7 +10201,7 @@ impl<'a, C, NC, A> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10073,7 +10212,7 @@ impl<'a, C, NC, A> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10082,13 +10221,13 @@ impl<'a, C, NC, A> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10100,7 +10239,7 @@ impl<'a, C, NC, A> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> { self._source = new_value.to_string(); self @@ -10110,7 +10249,7 @@ impl<'a, C, NC, A> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The client nonce value. + /// The client nonce value. pub fn nonce(mut self, new_value: &str) -> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> { self._nonce = new_value.to_string(); self @@ -10120,7 +10259,7 @@ impl<'a, C, NC, A> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The device/version ID from which to release the restriction. + /// The device/version ID from which to release the restriction. pub fn cpksver(mut self, new_value: &str) -> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> { self._cpksver = new_value.to_string(); self @@ -10129,7 +10268,7 @@ impl<'a, C, NC, A> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> where NC: hyper:: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// The volume(s) to request download restrictions for. + /// The volume(s) to request download restrictions for. pub fn add_volume_ids(mut self, new_value: &str) -> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> { self._volume_ids.push(new_value.to_string()); self @@ -10137,7 +10276,7 @@ impl<'a, C, NC, A> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> where NC: hyper:: /// Sets the *show preorders* query property to the given value. /// /// - /// Set to true to show pre-ordered books. Defaults to false. + /// Set to true to show pre-ordered books. Defaults to false. pub fn show_preorders(mut self, new_value: bool) -> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> { self._show_preorders = Some(new_value); self @@ -10145,7 +10284,7 @@ impl<'a, C, NC, A> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> where NC: hyper:: /// Sets the *locale* query property to the given value. /// /// - /// ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. + /// ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US. pub fn locale(mut self, new_value: &str) -> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> { self._locale = Some(new_value.to_string()); self @@ -10154,7 +10293,7 @@ impl<'a, C, NC, A> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> where NC: hyper:: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// List of features supported by the client, i.e., 'RENTALS' + /// List of features supported by the client, i.e., 'RENTALS' pub fn add_features(mut self, new_value: &str) -> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> { self._features.push(new_value.to_string()); self @@ -10215,7 +10354,7 @@ impl<'a, C, NC, A> MyconfigSyncVolumeLicenseCall<'a, C, NC, A> where NC: hyper:: /// Gets the current settings for the user. /// /// A builder for the *getUserSettings* method supported by a *myconfig* resource. -/// It is not used directly, but through a `MyconfigMethods`. +/// It is not used directly, but through a `MyconfigMethods` instance. /// /// # Example /// @@ -10271,7 +10410,7 @@ impl<'a, C, NC, A> MyconfigGetUserSettingCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10300,7 +10439,7 @@ impl<'a, C, NC, A> MyconfigGetUserSettingCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10312,7 +10451,6 @@ impl<'a, C, NC, A> MyconfigGetUserSettingCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -10322,7 +10460,7 @@ impl<'a, C, NC, A> MyconfigGetUserSettingCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10333,7 +10471,7 @@ impl<'a, C, NC, A> MyconfigGetUserSettingCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10342,13 +10480,13 @@ impl<'a, C, NC, A> MyconfigGetUserSettingCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10411,7 +10549,7 @@ impl<'a, C, NC, A> MyconfigGetUserSettingCall<'a, C, NC, A> where NC: hyper::net /// Sets the settings for the user. Unspecified sub-objects will retain the existing value. /// /// A builder for the *updateUserSettings* method supported by a *myconfig* resource. -/// It is not used directly, but through a `MyconfigMethods`. +/// It is not used directly, but through a `MyconfigMethods` instance. /// /// # Example /// @@ -10474,7 +10612,7 @@ impl<'a, C, NC, A> MyconfigUpdateUserSettingCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10507,7 +10645,7 @@ impl<'a, C, NC, A> MyconfigUpdateUserSettingCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10523,7 +10661,6 @@ impl<'a, C, NC, A> MyconfigUpdateUserSettingCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -10533,7 +10670,7 @@ impl<'a, C, NC, A> MyconfigUpdateUserSettingCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10544,7 +10681,7 @@ impl<'a, C, NC, A> MyconfigUpdateUserSettingCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10553,13 +10690,13 @@ impl<'a, C, NC, A> MyconfigUpdateUserSettingCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10631,7 +10768,7 @@ impl<'a, C, NC, A> MyconfigUpdateUserSettingCall<'a, C, NC, A> where NC: hyper:: /// Clears all volumes from a bookshelf. /// /// A builder for the *bookshelves.clearVolumes* method supported by a *mylibrary* resource. -/// It is not used directly, but through a `MylibraryMethods`. +/// It is not used directly, but through a `MylibraryMethods` instance. /// /// # Example /// @@ -10694,7 +10831,7 @@ impl<'a, C, NC, A> MylibraryBookshelveClearVolumeCall<'a, C, NC, A> where NC: hy for &field in ["shelf", "source"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10746,7 +10883,7 @@ impl<'a, C, NC, A> MylibraryBookshelveClearVolumeCall<'a, C, NC, A> where NC: hy } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10758,7 +10895,6 @@ impl<'a, C, NC, A> MylibraryBookshelveClearVolumeCall<'a, C, NC, A> where NC: hy dlg.pre_request(); req.send() - }; match req_result { @@ -10768,7 +10904,7 @@ impl<'a, C, NC, A> MylibraryBookshelveClearVolumeCall<'a, C, NC, A> where NC: hy continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10779,12 +10915,12 @@ impl<'a, C, NC, A> MylibraryBookshelveClearVolumeCall<'a, C, NC, A> where NC: hy continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10796,7 +10932,7 @@ impl<'a, C, NC, A> MylibraryBookshelveClearVolumeCall<'a, C, NC, A> where NC: hy /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of bookshelf from which to remove a volume. + /// ID of bookshelf from which to remove a volume. pub fn shelf(mut self, new_value: &str) -> MylibraryBookshelveClearVolumeCall<'a, C, NC, A> { self._shelf = new_value.to_string(); self @@ -10804,7 +10940,7 @@ impl<'a, C, NC, A> MylibraryBookshelveClearVolumeCall<'a, C, NC, A> where NC: hy /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MylibraryBookshelveClearVolumeCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -10865,7 +11001,7 @@ impl<'a, C, NC, A> MylibraryBookshelveClearVolumeCall<'a, C, NC, A> where NC: hy /// Moves a volume within a bookshelf. /// /// A builder for the *bookshelves.moveVolume* method supported by a *mylibrary* resource. -/// It is not used directly, but through a `MylibraryMethods`. +/// It is not used directly, but through a `MylibraryMethods` instance. /// /// # Example /// @@ -10932,7 +11068,7 @@ impl<'a, C, NC, A> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> where NC: hyp for &field in ["shelf", "volumeId", "volumePosition", "source"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10984,7 +11120,7 @@ impl<'a, C, NC, A> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> where NC: hyp } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10996,7 +11132,6 @@ impl<'a, C, NC, A> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> where NC: hyp dlg.pre_request(); req.send() - }; match req_result { @@ -11006,7 +11141,7 @@ impl<'a, C, NC, A> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11017,12 +11152,12 @@ impl<'a, C, NC, A> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11034,7 +11169,7 @@ impl<'a, C, NC, A> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of bookshelf with the volume. + /// ID of bookshelf with the volume. pub fn shelf(mut self, new_value: &str) -> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> { self._shelf = new_value.to_string(); self @@ -11044,7 +11179,7 @@ impl<'a, C, NC, A> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of volume to move. + /// ID of volume to move. pub fn volume_id(mut self, new_value: &str) -> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -11054,7 +11189,7 @@ impl<'a, C, NC, A> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Position on shelf to move the item (0 puts the item before the current first item, 1 puts it between the first and the second and so on.) + /// Position on shelf to move the item (0 puts the item before the current first item, 1 puts it between the first and the second and so on.) pub fn volume_position(mut self, new_value: i32) -> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> { self._volume_position = new_value; self @@ -11062,7 +11197,7 @@ impl<'a, C, NC, A> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> where NC: hyp /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -11123,7 +11258,7 @@ impl<'a, C, NC, A> MylibraryBookshelveMoveVolumeCall<'a, C, NC, A> where NC: hyp /// Gets volume information for volumes on a bookshelf. /// /// A builder for the *bookshelves.volumes.list* method supported by a *mylibrary* resource. -/// It is not used directly, but through a `MylibraryMethods`. +/// It is not used directly, but through a `MylibraryMethods` instance. /// /// # Example /// @@ -11216,7 +11351,7 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp for &field in ["alt", "shelf", "startIndex", "source", "showPreorders", "q", "projection", "maxResults", "country"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11269,7 +11404,7 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11281,7 +11416,6 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp dlg.pre_request(); req.send() - }; match req_result { @@ -11291,7 +11425,7 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11302,7 +11436,7 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11311,13 +11445,13 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11329,7 +11463,7 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The bookshelf ID or name retrieve volumes for. + /// The bookshelf ID or name retrieve volumes for. pub fn shelf(mut self, new_value: &str) -> MylibraryBookshelveVolumeListCall<'a, C, NC, A> { self._shelf = new_value.to_string(); self @@ -11337,7 +11471,7 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp /// Sets the *start index* query property to the given value. /// /// - /// Index of the first element to return (starts at 0) + /// Index of the first element to return (starts at 0) pub fn start_index(mut self, new_value: u32) -> MylibraryBookshelveVolumeListCall<'a, C, NC, A> { self._start_index = Some(new_value); self @@ -11345,7 +11479,7 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MylibraryBookshelveVolumeListCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -11353,7 +11487,7 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp /// Sets the *show preorders* query property to the given value. /// /// - /// Set to true to show pre-ordered books. Defaults to false. + /// Set to true to show pre-ordered books. Defaults to false. pub fn show_preorders(mut self, new_value: bool) -> MylibraryBookshelveVolumeListCall<'a, C, NC, A> { self._show_preorders = Some(new_value); self @@ -11361,7 +11495,7 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp /// Sets the *q* query property to the given value. /// /// - /// Full-text search query string in this bookshelf. + /// Full-text search query string in this bookshelf. pub fn q(mut self, new_value: &str) -> MylibraryBookshelveVolumeListCall<'a, C, NC, A> { self._q = Some(new_value.to_string()); self @@ -11369,7 +11503,7 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp /// Sets the *projection* query property to the given value. /// /// - /// Restrict information returned to a set of selected fields. + /// Restrict information returned to a set of selected fields. pub fn projection(mut self, new_value: &str) -> MylibraryBookshelveVolumeListCall<'a, C, NC, A> { self._projection = Some(new_value.to_string()); self @@ -11377,7 +11511,7 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return + /// Maximum number of results to return pub fn max_results(mut self, new_value: u32) -> MylibraryBookshelveVolumeListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -11385,7 +11519,7 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp /// Sets the *country* query property to the given value. /// /// - /// ISO-3166-1 code to override the IP-based location. + /// ISO-3166-1 code to override the IP-based location. pub fn country(mut self, new_value: &str) -> MylibraryBookshelveVolumeListCall<'a, C, NC, A> { self._country = Some(new_value.to_string()); self @@ -11446,7 +11580,7 @@ impl<'a, C, NC, A> MylibraryBookshelveVolumeListCall<'a, C, NC, A> where NC: hyp /// Gets the summary of specified layers. /// /// A builder for the *annotations.summary* method supported by a *mylibrary* resource. -/// It is not used directly, but through a `MylibraryMethods`. +/// It is not used directly, but through a `MylibraryMethods` instance. /// /// # Example /// @@ -11512,7 +11646,7 @@ impl<'a, C, NC, A> MylibraryAnnotationSummaryCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "layerIds", "volumeId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11541,7 +11675,7 @@ impl<'a, C, NC, A> MylibraryAnnotationSummaryCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11553,7 +11687,6 @@ impl<'a, C, NC, A> MylibraryAnnotationSummaryCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -11563,7 +11696,7 @@ impl<'a, C, NC, A> MylibraryAnnotationSummaryCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11574,7 +11707,7 @@ impl<'a, C, NC, A> MylibraryAnnotationSummaryCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11583,13 +11716,13 @@ impl<'a, C, NC, A> MylibraryAnnotationSummaryCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11602,7 +11735,7 @@ impl<'a, C, NC, A> MylibraryAnnotationSummaryCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Array of layer IDs to get the summary for. + /// Array of layer IDs to get the summary for. pub fn add_layer_ids(mut self, new_value: &str) -> MylibraryAnnotationSummaryCall<'a, C, NC, A> { self._layer_ids.push(new_value.to_string()); self @@ -11612,7 +11745,7 @@ impl<'a, C, NC, A> MylibraryAnnotationSummaryCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Volume id to get the summary for. + /// Volume id to get the summary for. pub fn volume_id(mut self, new_value: &str) -> MylibraryAnnotationSummaryCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -11673,7 +11806,7 @@ impl<'a, C, NC, A> MylibraryAnnotationSummaryCall<'a, C, NC, A> where NC: hyper: /// Deletes an annotation. /// /// A builder for the *annotations.delete* method supported by a *mylibrary* resource. -/// It is not used directly, but through a `MylibraryMethods`. +/// It is not used directly, but through a `MylibraryMethods` instance. /// /// # Example /// @@ -11736,7 +11869,7 @@ impl<'a, C, NC, A> MylibraryAnnotationDeleteCall<'a, C, NC, A> where NC: hyper:: for &field in ["annotationId", "source"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11788,7 +11921,7 @@ impl<'a, C, NC, A> MylibraryAnnotationDeleteCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11800,7 +11933,6 @@ impl<'a, C, NC, A> MylibraryAnnotationDeleteCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -11810,7 +11942,7 @@ impl<'a, C, NC, A> MylibraryAnnotationDeleteCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11821,12 +11953,12 @@ impl<'a, C, NC, A> MylibraryAnnotationDeleteCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11838,7 +11970,7 @@ impl<'a, C, NC, A> MylibraryAnnotationDeleteCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID for the annotation to delete. + /// The ID for the annotation to delete. pub fn annotation_id(mut self, new_value: &str) -> MylibraryAnnotationDeleteCall<'a, C, NC, A> { self._annotation_id = new_value.to_string(); self @@ -11846,7 +11978,7 @@ impl<'a, C, NC, A> MylibraryAnnotationDeleteCall<'a, C, NC, A> where NC: hyper:: /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MylibraryAnnotationDeleteCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -11907,7 +12039,7 @@ impl<'a, C, NC, A> MylibraryAnnotationDeleteCall<'a, C, NC, A> where NC: hyper:: /// Adds a volume to a bookshelf. /// /// A builder for the *bookshelves.addVolume* method supported by a *mylibrary* resource. -/// It is not used directly, but through a `MylibraryMethods`. +/// It is not used directly, but through a `MylibraryMethods` instance. /// /// # Example /// @@ -11977,7 +12109,7 @@ impl<'a, C, NC, A> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> where NC: hype for &field in ["shelf", "volumeId", "source", "reason"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12029,7 +12161,7 @@ impl<'a, C, NC, A> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> where NC: hype } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12041,7 +12173,6 @@ impl<'a, C, NC, A> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> where NC: hype dlg.pre_request(); req.send() - }; match req_result { @@ -12051,7 +12182,7 @@ impl<'a, C, NC, A> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12062,12 +12193,12 @@ impl<'a, C, NC, A> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12079,7 +12210,7 @@ impl<'a, C, NC, A> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of bookshelf to which to add a volume. + /// ID of bookshelf to which to add a volume. pub fn shelf(mut self, new_value: &str) -> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> { self._shelf = new_value.to_string(); self @@ -12089,7 +12220,7 @@ impl<'a, C, NC, A> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of volume to add. + /// ID of volume to add. pub fn volume_id(mut self, new_value: &str) -> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -12097,7 +12228,7 @@ impl<'a, C, NC, A> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> where NC: hype /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -12105,7 +12236,7 @@ impl<'a, C, NC, A> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> where NC: hype /// Sets the *reason* query property to the given value. /// /// - /// The reason for which the book is added to the library. + /// The reason for which the book is added to the library. pub fn reason(mut self, new_value: &str) -> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> { self._reason = Some(new_value.to_string()); self @@ -12166,7 +12297,7 @@ impl<'a, C, NC, A> MylibraryBookshelveAddVolumeCall<'a, C, NC, A> where NC: hype /// Inserts a new annotation. /// /// A builder for the *annotations.insert* method supported by a *mylibrary* resource. -/// It is not used directly, but through a `MylibraryMethods`. +/// It is not used directly, but through a `MylibraryMethods` instance. /// /// # Example /// @@ -12244,7 +12375,7 @@ impl<'a, C, NC, A> MylibraryAnnotationInsertCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt", "source", "showOnlySummaryInResponse", "country"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12277,7 +12408,7 @@ impl<'a, C, NC, A> MylibraryAnnotationInsertCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12293,7 +12424,6 @@ impl<'a, C, NC, A> MylibraryAnnotationInsertCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -12303,7 +12433,7 @@ impl<'a, C, NC, A> MylibraryAnnotationInsertCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12314,7 +12444,7 @@ impl<'a, C, NC, A> MylibraryAnnotationInsertCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12323,13 +12453,13 @@ impl<'a, C, NC, A> MylibraryAnnotationInsertCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12348,7 +12478,7 @@ impl<'a, C, NC, A> MylibraryAnnotationInsertCall<'a, C, NC, A> where NC: hyper:: /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MylibraryAnnotationInsertCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -12356,7 +12486,7 @@ impl<'a, C, NC, A> MylibraryAnnotationInsertCall<'a, C, NC, A> where NC: hyper:: /// Sets the *show only summary in response* query property to the given value. /// /// - /// Requests that only the summary of the specified layer be provided in the response. + /// Requests that only the summary of the specified layer be provided in the response. pub fn show_only_summary_in_response(mut self, new_value: bool) -> MylibraryAnnotationInsertCall<'a, C, NC, A> { self._show_only_summary_in_response = Some(new_value); self @@ -12364,7 +12494,7 @@ impl<'a, C, NC, A> MylibraryAnnotationInsertCall<'a, C, NC, A> where NC: hyper:: /// Sets the *country* query property to the given value. /// /// - /// ISO-3166-1 code to override the IP-based location. + /// ISO-3166-1 code to override the IP-based location. pub fn country(mut self, new_value: &str) -> MylibraryAnnotationInsertCall<'a, C, NC, A> { self._country = Some(new_value.to_string()); self @@ -12425,7 +12555,7 @@ impl<'a, C, NC, A> MylibraryAnnotationInsertCall<'a, C, NC, A> where NC: hyper:: /// Removes a volume from a bookshelf. /// /// A builder for the *bookshelves.removeVolume* method supported by a *mylibrary* resource. -/// It is not used directly, but through a `MylibraryMethods`. +/// It is not used directly, but through a `MylibraryMethods` instance. /// /// # Example /// @@ -12495,7 +12625,7 @@ impl<'a, C, NC, A> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> where NC: h for &field in ["shelf", "volumeId", "source", "reason"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12547,7 +12677,7 @@ impl<'a, C, NC, A> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> where NC: h } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12559,7 +12689,6 @@ impl<'a, C, NC, A> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> where NC: h dlg.pre_request(); req.send() - }; match req_result { @@ -12569,7 +12698,7 @@ impl<'a, C, NC, A> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12580,12 +12709,12 @@ impl<'a, C, NC, A> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12597,7 +12726,7 @@ impl<'a, C, NC, A> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of bookshelf from which to remove a volume. + /// ID of bookshelf from which to remove a volume. pub fn shelf(mut self, new_value: &str) -> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> { self._shelf = new_value.to_string(); self @@ -12607,7 +12736,7 @@ impl<'a, C, NC, A> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of volume to remove. + /// ID of volume to remove. pub fn volume_id(mut self, new_value: &str) -> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -12615,7 +12744,7 @@ impl<'a, C, NC, A> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> where NC: h /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -12623,7 +12752,7 @@ impl<'a, C, NC, A> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> where NC: h /// Sets the *reason* query property to the given value. /// /// - /// The reason for which the book is removed from the library. + /// The reason for which the book is removed from the library. pub fn reason(mut self, new_value: &str) -> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> { self._reason = Some(new_value.to_string()); self @@ -12684,7 +12813,7 @@ impl<'a, C, NC, A> MylibraryBookshelveRemoveVolumeCall<'a, C, NC, A> where NC: h /// Retrieves a list of annotations, possibly filtered. /// /// A builder for the *annotations.list* method supported by a *mylibrary* resource. -/// It is not used directly, but through a `MylibraryMethods`. +/// It is not used directly, but through a `MylibraryMethods` instance. /// /// # Example /// @@ -12794,7 +12923,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "volumeId", "updatedMin", "updatedMax", "source", "showDeleted", "pageToken", "maxResults", "layerIds", "layerId", "contentVersion"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12823,7 +12952,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12835,7 +12964,6 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -12845,7 +12973,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12856,7 +12984,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12865,13 +12993,13 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12881,7 +13009,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *volume id* query property to the given value. /// /// - /// The volume to restrict annotations to. + /// The volume to restrict annotations to. pub fn volume_id(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, NC, A> { self._volume_id = Some(new_value.to_string()); self @@ -12889,7 +13017,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *updated min* query property to the given value. /// /// - /// RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive). + /// RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive). pub fn updated_min(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, NC, A> { self._updated_min = Some(new_value.to_string()); self @@ -12897,7 +13025,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *updated max* query property to the given value. /// /// - /// RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive). + /// RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive). pub fn updated_max(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, NC, A> { self._updated_max = Some(new_value.to_string()); self @@ -12905,7 +13033,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -12913,7 +13041,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *show deleted* query property to the given value. /// /// - /// Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false. + /// Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false. pub fn show_deleted(mut self, new_value: bool) -> MylibraryAnnotationListCall<'a, C, NC, A> { self._show_deleted = Some(new_value); self @@ -12921,7 +13049,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *page token* query property to the given value. /// /// - /// The value of the nextToken from the previous page. + /// The value of the nextToken from the previous page. pub fn page_token(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -12929,7 +13057,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return + /// Maximum number of results to return pub fn max_results(mut self, new_value: u32) -> MylibraryAnnotationListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -12938,7 +13066,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// The layer ID(s) to limit annotation by. + /// The layer ID(s) to limit annotation by. pub fn add_layer_ids(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, NC, A> { self._layer_ids.push(new_value.to_string()); self @@ -12946,7 +13074,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *layer id* query property to the given value. /// /// - /// The layer ID to limit annotation by. + /// The layer ID to limit annotation by. pub fn layer_id(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, NC, A> { self._layer_id = Some(new_value.to_string()); self @@ -12954,7 +13082,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *content version* query property to the given value. /// /// - /// The content version for the requested volume. + /// The content version for the requested volume. pub fn content_version(mut self, new_value: &str) -> MylibraryAnnotationListCall<'a, C, NC, A> { self._content_version = Some(new_value.to_string()); self @@ -13015,7 +13143,7 @@ impl<'a, C, NC, A> MylibraryAnnotationListCall<'a, C, NC, A> where NC: hyper::ne /// Updates an existing annotation. /// /// A builder for the *annotations.update* method supported by a *mylibrary* resource. -/// It is not used directly, but through a `MylibraryMethods`. +/// It is not used directly, but through a `MylibraryMethods` instance. /// /// # Example /// @@ -13085,7 +13213,7 @@ impl<'a, C, NC, A> MylibraryAnnotationUpdateCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt", "annotationId", "source"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13142,7 +13270,7 @@ impl<'a, C, NC, A> MylibraryAnnotationUpdateCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13158,7 +13286,6 @@ impl<'a, C, NC, A> MylibraryAnnotationUpdateCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -13168,7 +13295,7 @@ impl<'a, C, NC, A> MylibraryAnnotationUpdateCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13179,7 +13306,7 @@ impl<'a, C, NC, A> MylibraryAnnotationUpdateCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13188,13 +13315,13 @@ impl<'a, C, NC, A> MylibraryAnnotationUpdateCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13215,7 +13342,7 @@ impl<'a, C, NC, A> MylibraryAnnotationUpdateCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID for the annotation to update. + /// The ID for the annotation to update. pub fn annotation_id(mut self, new_value: &str) -> MylibraryAnnotationUpdateCall<'a, C, NC, A> { self._annotation_id = new_value.to_string(); self @@ -13223,7 +13350,7 @@ impl<'a, C, NC, A> MylibraryAnnotationUpdateCall<'a, C, NC, A> where NC: hyper:: /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MylibraryAnnotationUpdateCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -13284,7 +13411,7 @@ impl<'a, C, NC, A> MylibraryAnnotationUpdateCall<'a, C, NC, A> where NC: hyper:: /// Sets my reading position information for a volume. /// /// A builder for the *readingpositions.setPosition* method supported by a *mylibrary* resource. -/// It is not used directly, but through a `MylibraryMethods`. +/// It is not used directly, but through a `MylibraryMethods` instance. /// /// # Example /// @@ -13366,7 +13493,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> where N for &field in ["volumeId", "timestamp", "position", "source", "deviceCookie", "contentVersion", "action"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13418,7 +13545,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> where N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13430,7 +13557,6 @@ impl<'a, C, NC, A> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> where N dlg.pre_request(); req.send() - }; match req_result { @@ -13440,7 +13566,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> where N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13451,12 +13577,12 @@ impl<'a, C, NC, A> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> where N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13468,7 +13594,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> where N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of volume for which to update the reading position. + /// ID of volume for which to update the reading position. pub fn volume_id(mut self, new_value: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -13478,7 +13604,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> where N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// RFC 3339 UTC format timestamp associated with this reading position. + /// RFC 3339 UTC format timestamp associated with this reading position. pub fn timestamp(mut self, new_value: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> { self._timestamp = new_value.to_string(); self @@ -13488,7 +13614,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> where N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Position string for the new volume reading position. + /// Position string for the new volume reading position. pub fn position(mut self, new_value: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> { self._position = new_value.to_string(); self @@ -13496,7 +13622,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> where N /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -13504,7 +13630,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> where N /// Sets the *device cookie* query property to the given value. /// /// - /// Random persistent device cookie optional on set position. + /// Random persistent device cookie optional on set position. pub fn device_cookie(mut self, new_value: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> { self._device_cookie = Some(new_value.to_string()); self @@ -13512,7 +13638,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> where N /// Sets the *content version* query property to the given value. /// /// - /// Volume content version for which this reading position applies. + /// Volume content version for which this reading position applies. pub fn content_version(mut self, new_value: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> { self._content_version = Some(new_value.to_string()); self @@ -13520,7 +13646,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> where N /// Sets the *action* query property to the given value. /// /// - /// Action that caused this reading position to be set. + /// Action that caused this reading position to be set. pub fn action(mut self, new_value: &str) -> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> { self._action = Some(new_value.to_string()); self @@ -13581,7 +13707,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionSetPositionCall<'a, C, NC, A> where N /// Retrieves metadata for a specific bookshelf belonging to the authenticated user. /// /// A builder for the *bookshelves.get* method supported by a *mylibrary* resource. -/// It is not used directly, but through a `MylibraryMethods`. +/// It is not used directly, but through a `MylibraryMethods` instance. /// /// # Example /// @@ -13644,7 +13770,7 @@ impl<'a, C, NC, A> MylibraryBookshelveGetCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "shelf", "source"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13697,7 +13823,7 @@ impl<'a, C, NC, A> MylibraryBookshelveGetCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13709,7 +13835,6 @@ impl<'a, C, NC, A> MylibraryBookshelveGetCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -13719,7 +13844,7 @@ impl<'a, C, NC, A> MylibraryBookshelveGetCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13730,7 +13855,7 @@ impl<'a, C, NC, A> MylibraryBookshelveGetCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13739,13 +13864,13 @@ impl<'a, C, NC, A> MylibraryBookshelveGetCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13757,7 +13882,7 @@ impl<'a, C, NC, A> MylibraryBookshelveGetCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of bookshelf to retrieve. + /// ID of bookshelf to retrieve. pub fn shelf(mut self, new_value: &str) -> MylibraryBookshelveGetCall<'a, C, NC, A> { self._shelf = new_value.to_string(); self @@ -13765,7 +13890,7 @@ impl<'a, C, NC, A> MylibraryBookshelveGetCall<'a, C, NC, A> where NC: hyper::net /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MylibraryBookshelveGetCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -13826,7 +13951,7 @@ impl<'a, C, NC, A> MylibraryBookshelveGetCall<'a, C, NC, A> where NC: hyper::net /// Retrieves a list of bookshelves belonging to the authenticated user. /// /// A builder for the *bookshelves.list* method supported by a *mylibrary* resource. -/// It is not used directly, but through a `MylibraryMethods`. +/// It is not used directly, but through a `MylibraryMethods` instance. /// /// # Example /// @@ -13887,7 +14012,7 @@ impl<'a, C, NC, A> MylibraryBookshelveListCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "source"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13916,7 +14041,7 @@ impl<'a, C, NC, A> MylibraryBookshelveListCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13928,7 +14053,6 @@ impl<'a, C, NC, A> MylibraryBookshelveListCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -13938,7 +14062,7 @@ impl<'a, C, NC, A> MylibraryBookshelveListCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13949,7 +14073,7 @@ impl<'a, C, NC, A> MylibraryBookshelveListCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13958,13 +14082,13 @@ impl<'a, C, NC, A> MylibraryBookshelveListCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13974,7 +14098,7 @@ impl<'a, C, NC, A> MylibraryBookshelveListCall<'a, C, NC, A> where NC: hyper::ne /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MylibraryBookshelveListCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -14035,7 +14159,7 @@ impl<'a, C, NC, A> MylibraryBookshelveListCall<'a, C, NC, A> where NC: hyper::ne /// Retrieves my reading position information for a volume. /// /// A builder for the *readingpositions.get* method supported by a *mylibrary* resource. -/// It is not used directly, but through a `MylibraryMethods`. +/// It is not used directly, but through a `MylibraryMethods` instance. /// /// # Example /// @@ -14103,7 +14227,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionGetCall<'a, C, NC, A> where NC: hyper for &field in ["alt", "volumeId", "source", "contentVersion"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14156,7 +14280,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionGetCall<'a, C, NC, A> where NC: hyper } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14168,7 +14292,6 @@ impl<'a, C, NC, A> MylibraryReadingpositionGetCall<'a, C, NC, A> where NC: hyper dlg.pre_request(); req.send() - }; match req_result { @@ -14178,7 +14301,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionGetCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14189,7 +14312,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionGetCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14198,13 +14321,13 @@ impl<'a, C, NC, A> MylibraryReadingpositionGetCall<'a, C, NC, A> where NC: hyper Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14216,7 +14339,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionGetCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of volume for which to retrieve a reading position. + /// ID of volume for which to retrieve a reading position. pub fn volume_id(mut self, new_value: &str) -> MylibraryReadingpositionGetCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self @@ -14224,7 +14347,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionGetCall<'a, C, NC, A> where NC: hyper /// Sets the *source* query property to the given value. /// /// - /// String to identify the originator of this request. + /// String to identify the originator of this request. pub fn source(mut self, new_value: &str) -> MylibraryReadingpositionGetCall<'a, C, NC, A> { self._source = Some(new_value.to_string()); self @@ -14232,7 +14355,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionGetCall<'a, C, NC, A> where NC: hyper /// Sets the *content version* query property to the given value. /// /// - /// Volume content version for which this reading position is requested. + /// Volume content version for which this reading position is requested. pub fn content_version(mut self, new_value: &str) -> MylibraryReadingpositionGetCall<'a, C, NC, A> { self._content_version = Some(new_value.to_string()); self @@ -14293,7 +14416,7 @@ impl<'a, C, NC, A> MylibraryReadingpositionGetCall<'a, C, NC, A> where NC: hyper /// /// /// A builder for the *addBook* method supported by a *cloudloading* resource. -/// It is not used directly, but through a `CloudloadingMethods`. +/// It is not used directly, but through a `CloudloadingMethods` instance. /// /// # Example /// @@ -14369,7 +14492,7 @@ impl<'a, C, NC, A> CloudloadingAddBookCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "upload_client_token", "name", "mime_type", "drive_document_id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14398,7 +14521,7 @@ impl<'a, C, NC, A> CloudloadingAddBookCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14410,7 +14533,6 @@ impl<'a, C, NC, A> CloudloadingAddBookCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -14420,7 +14542,7 @@ impl<'a, C, NC, A> CloudloadingAddBookCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14431,7 +14553,7 @@ impl<'a, C, NC, A> CloudloadingAddBookCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14440,13 +14562,13 @@ impl<'a, C, NC, A> CloudloadingAddBookCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14463,7 +14585,7 @@ impl<'a, C, NC, A> CloudloadingAddBookCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *name* query property to the given value. /// /// - /// The document name. It can be set only if the drive_document_id is set. + /// The document name. It can be set only if the drive_document_id is set. pub fn name(mut self, new_value: &str) -> CloudloadingAddBookCall<'a, C, NC, A> { self._name = Some(new_value.to_string()); self @@ -14471,7 +14593,7 @@ impl<'a, C, NC, A> CloudloadingAddBookCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *mime_type* query property to the given value. /// /// - /// The document MIME type. It can be set only if the drive_document_id is set. + /// The document MIME type. It can be set only if the drive_document_id is set. pub fn mime_type(mut self, new_value: &str) -> CloudloadingAddBookCall<'a, C, NC, A> { self._mime_type = Some(new_value.to_string()); self @@ -14479,7 +14601,7 @@ impl<'a, C, NC, A> CloudloadingAddBookCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *drive_document_id* query property to the given value. /// /// - /// A drive document id. The upload_client_token must not be set. + /// A drive document id. The upload_client_token must not be set. pub fn drive_document_id(mut self, new_value: &str) -> CloudloadingAddBookCall<'a, C, NC, A> { self._drive_document_id = Some(new_value.to_string()); self @@ -14540,7 +14662,7 @@ impl<'a, C, NC, A> CloudloadingAddBookCall<'a, C, NC, A> where NC: hyper::net::N /// /// /// A builder for the *updateBook* method supported by a *cloudloading* resource. -/// It is not used directly, but through a `CloudloadingMethods`. +/// It is not used directly, but through a `CloudloadingMethods` instance. /// /// # Example /// @@ -14603,7 +14725,7 @@ impl<'a, C, NC, A> CloudloadingUpdateBookCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14636,7 +14758,7 @@ impl<'a, C, NC, A> CloudloadingUpdateBookCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14652,7 +14774,6 @@ impl<'a, C, NC, A> CloudloadingUpdateBookCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -14662,7 +14783,7 @@ impl<'a, C, NC, A> CloudloadingUpdateBookCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14673,7 +14794,7 @@ impl<'a, C, NC, A> CloudloadingUpdateBookCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14682,13 +14803,13 @@ impl<'a, C, NC, A> CloudloadingUpdateBookCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14760,7 +14881,7 @@ impl<'a, C, NC, A> CloudloadingUpdateBookCall<'a, C, NC, A> where NC: hyper::net /// Remove the book and its contents /// /// A builder for the *deleteBook* method supported by a *cloudloading* resource. -/// It is not used directly, but through a `CloudloadingMethods`. +/// It is not used directly, but through a `CloudloadingMethods` instance. /// /// # Example /// @@ -14818,7 +14939,7 @@ impl<'a, C, NC, A> CloudloadingDeleteBookCall<'a, C, NC, A> where NC: hyper::net for &field in ["volumeId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14846,7 +14967,7 @@ impl<'a, C, NC, A> CloudloadingDeleteBookCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14858,7 +14979,6 @@ impl<'a, C, NC, A> CloudloadingDeleteBookCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -14868,7 +14988,7 @@ impl<'a, C, NC, A> CloudloadingDeleteBookCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14879,12 +14999,12 @@ impl<'a, C, NC, A> CloudloadingDeleteBookCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14896,7 +15016,7 @@ impl<'a, C, NC, A> CloudloadingDeleteBookCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The id of the book to be removed. + /// The id of the book to be removed. pub fn volume_id(mut self, new_value: &str) -> CloudloadingDeleteBookCall<'a, C, NC, A> { self._volume_id = new_value.to_string(); self diff --git a/gen/calendar3/Cargo.toml b/gen/calendar3/Cargo.toml index 31417d4886..d97d08e32c 100644 --- a/gen/calendar3/Cargo.toml +++ b/gen/calendar3/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-calendar3" -version = "0.1.1+20141123" +version = "0.1.2+20150303" authors = ["Sebastian Thiel "] description = "A complete library to interact with calendar (protocol v3)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/calendar3" @@ -16,7 +16,7 @@ keywords = ["calendar", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/calendar3/README.md b/gen/calendar3/README.md index 6f07feffb0..4a70809800 100644 --- a/gen/calendar3/README.md +++ b/gen/calendar3/README.md @@ -1,11 +1,11 @@ The `google-calendar3` library allows access to all features of the *Google calendar* service. -This documentation was generated from *calendar* crate version *0.1.1+20141123*, where *20141123* is the exact revision of the *calendar:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *calendar* crate version *0.1.2+20150303*, where *20150303* is the exact revision of the *calendar:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *calendar* *v3* API can be found at the [official documentation site](https://developers.google.com/google-apps/calendar/firstapp). @@ -51,6 +51,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-calendar3/struct.CalendarHub.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-calendar3/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-calendar3/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-calendar3/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -60,6 +62,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-calendar3/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -105,7 +109,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-calendar3" as calendar3; use calendar3::Channel; -use calendar3::Result; +use calendar3::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use calendar3::CalendarHub; @@ -151,15 +155,17 @@ let result = hub.events().watch(&req, "calendarId") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -172,7 +178,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-calendar3/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-calendar3/trait.ResponseResult.html), it will return that by default. @@ -195,8 +201,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-calendar3/trai ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-calendar3/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-calendar3/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-calendar3/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-calendar3/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-calendar3/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/calendar3/src/cmn.rs b/gen/calendar3/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/calendar3/src/cmn.rs +++ b/gen/calendar3/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/calendar3/src/lib.rs b/gen/calendar3/src/lib.rs index a4b3dd5bf6..a82302930c 100644 --- a/gen/calendar3/src/lib.rs +++ b/gen/calendar3/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *calendar* crate version *0.1.1+20141123*, where *20141123* is the exact revision of the *calendar:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *calendar* crate version *0.1.2+20150303*, where *20150303* is the exact revision of the *calendar:v3* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *calendar* *v3* API can be found at the //! [official documentation site](https://developers.google.com/google-apps/calendar/firstapp). @@ -51,6 +51,8 @@ //! //! * **[Hub](struct.CalendarHub.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -60,6 +62,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -105,7 +109,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-calendar3" as calendar3; //! use calendar3::Channel; -//! use calendar3::Result; +//! use calendar3::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -152,15 +156,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -173,7 +179,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -196,8 +202,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -246,7 +253,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -297,7 +304,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-calendar3" as calendar3; /// use calendar3::Channel; -/// use calendar3::Result; +/// use calendar3::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -344,15 +351,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -373,7 +382,7 @@ impl<'a, C, NC, A> CalendarHub CalendarHub { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -404,7 +413,7 @@ impl<'a, C, NC, A> CalendarHub } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -424,24 +433,24 @@ impl<'a, C, NC, A> CalendarHub /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventGadget { - /// Preferences. + /// Preferences. pub preferences: HashMap, - /// The gadget's title. + /// The gadget's title. pub title: String, - /// The gadget's height in pixels. Optional. + /// The gadget's height in pixels. Optional. pub height: i32, - /// The gadget's width in pixels. Optional. + /// The gadget's width in pixels. Optional. pub width: i32, - /// The gadget's URL. + /// The gadget's URL. pub link: String, - /// The gadget's type. + /// The gadget's type. #[serde(alias="type")] pub type_: String, /// The gadget's display mode. Optional. Possible values are: /// - "icon" - The gadget displays next to the event's title in the calendar view. /// - "chip" - The gadget displays when the event is clicked. pub display: String, - /// The gadget's icon URL. + /// The gadget's icon URL. #[serde(alias="iconLink")] pub icon_link: String, } @@ -456,10 +465,10 @@ impl Part for EventGadget {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct FreeBusyCalendar { - /// List of time ranges during which this calendar should be regarded as busy. + /// List of time ranges during which this calendar should be regarded as busy. pub busy: Vec, - /// Optional error(s) (if computation for the calendar failed). - pub errors: Vec, + /// Optional error(s) (if computation for the calendar failed). + pub errors: Vec, } impl Part for FreeBusyCalendar {} @@ -478,7 +487,7 @@ pub struct AclRuleScope { /// - "domain" - Limits the scope to a domain. Note: The permissions granted to the "default", or public, scope apply to any user, authenticated or not. #[serde(alias="type")] pub type_: String, - /// The email address of a user or group, or the name of a domain, depending on the scope type. Omitted for type "default". + /// The email address of a user or group, or the name of a domain, depending on the scope type. Omitted for type "default". pub value: String, } @@ -497,16 +506,16 @@ impl Part for AclRuleScope {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Settings { - /// Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. + /// Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// List of user settings. + /// List of user settings. pub items: Vec, - /// Type of the collection ("calendar#settings"). + /// Type of the collection ("calendar#settings"). pub kind: String, - /// Etag of the collection. + /// Etag of the collection. pub etag: String, - /// Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are available, in which case nextPageToken is provided. + /// Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are available, in which case nextPageToken is provided. #[serde(alias="nextSyncToken")] pub next_sync_token: String, } @@ -530,20 +539,20 @@ impl ResponseResult for Settings {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Calendar { - /// Type of the resource ("calendar#calendar"). + /// Type of the resource ("calendar#calendar"). pub kind: Option, - /// ETag of the resource. + /// ETag of the resource. pub etag: Option, - /// Description of the calendar. Optional. + /// Description of the calendar. Optional. pub description: Option, - /// Identifier of the calendar. + /// Identifier of the calendar. pub id: Option, - /// The time zone of the calendar. (Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) Optional. + /// The time zone of the calendar. (Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) Optional. #[serde(alias="timeZone")] pub time_zone: Option, - /// Geographic location of the calendar as free-form text. Optional. + /// Geographic location of the calendar as free-form text. Optional. pub location: Option, - /// Title of the calendar. + /// Title of the calendar. pub summary: Option, } @@ -566,14 +575,14 @@ impl ResponseResult for Calendar {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CalendarListEntry { - /// The notifications that the authenticated user is receiving for this calendar. + /// The notifications that the authenticated user is receiving for this calendar. #[serde(alias="notificationSettings")] pub notification_settings: Option, - /// Description of the calendar. Optional. Read-only. + /// Description of the calendar. Optional. Read-only. pub description: Option, - /// Whether this calendar list entry has been deleted from the calendar list. Read-only. Optional. The default is False. + /// Whether this calendar list entry has been deleted from the calendar list. Read-only. Optional. The default is False. pub deleted: Option, - /// Whether the calendar is the primary calendar of the authenticated user. Read-only. Optional. The default is False. + /// Whether the calendar is the primary calendar of the authenticated user. Read-only. Optional. The default is False. pub primary: Option, /// The effective access role that the authenticated user has on the calendar. Read-only. Possible values are: /// - "freeBusyReader" - Provides read access to free/busy information. @@ -582,37 +591,37 @@ pub struct CalendarListEntry { /// - "owner" - Provides ownership of the calendar. This role has all of the permissions of the writer role with the additional ability to see and manipulate ACLs. #[serde(alias="accessRole")] pub access_role: Option, - /// Identifier of the calendar. + /// Identifier of the calendar. pub id: Option, - /// Type of the resource ("calendar#calendarListEntry"). + /// Type of the resource ("calendar#calendarListEntry"). pub kind: Option, - /// The foreground color of the calendar in the hexadecimal format "#ffffff". This property supersedes the index-based colorId property. Optional. + /// The foreground color of the calendar in the hexadecimal format "#ffffff". This property supersedes the index-based colorId property. Optional. #[serde(alias="foregroundColor")] pub foreground_color: Option, - /// The default reminders that the authenticated user has for this calendar. + /// The default reminders that the authenticated user has for this calendar. #[serde(alias="defaultReminders")] pub default_reminders: Option>, - /// The color of the calendar. This is an ID referring to an entry in the calendar section of the colors definition (see the colors endpoint). Optional. + /// The color of the calendar. This is an ID referring to an entry in the calendar section of the colors definition (see the colors endpoint). Optional. #[serde(alias="colorId")] pub color_id: Option, - /// Whether the calendar content shows up in the calendar UI. Optional. The default is False. + /// Whether the calendar content shows up in the calendar UI. Optional. The default is False. pub selected: Option, - /// Title of the calendar. Read-only. + /// Title of the calendar. Read-only. pub summary: Option, - /// ETag of the resource. + /// ETag of the resource. pub etag: Option, - /// Geographic location of the calendar as free-form text. Optional. Read-only. + /// Geographic location of the calendar as free-form text. Optional. Read-only. pub location: Option, - /// The main color of the calendar in the hexadecimal format "#0088aa". This property supersedes the index-based colorId property. Optional. + /// The main color of the calendar in the hexadecimal format "#0088aa". This property supersedes the index-based colorId property. Optional. #[serde(alias="backgroundColor")] pub background_color: Option, - /// The summary that the authenticated user has set for this calendar. Optional. + /// The summary that the authenticated user has set for this calendar. Optional. #[serde(alias="summaryOverride")] pub summary_override: Option, - /// The time zone of the calendar. Optional. Read-only. + /// The time zone of the calendar. Optional. Read-only. #[serde(alias="timeZone")] pub time_zone: Option, - /// Whether the calendar has been hidden from the list. Optional. The default is False. + /// Whether the calendar has been hidden from the list. Optional. The default is False. pub hidden: Option, } @@ -626,7 +635,7 @@ impl ResponseResult for CalendarListEntry {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CalendarListEntryNotificationSettings { - /// The list of notifications set for this calendar. + /// The list of notifications set for this calendar. pub notifications: Vec, } @@ -640,9 +649,9 @@ impl Part for CalendarListEntryNotificationSettings {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ColorDefinition { - /// The foreground color that can be used to write on top of a background with 'background' color. + /// The foreground color that can be used to write on top of a background with 'background' color. pub foreground: String, - /// The background color associated with this color definition. + /// The background color associated with this color definition. pub background: String, } @@ -655,12 +664,12 @@ impl Part for ColorDefinition {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventDateTime { - /// The date, in the format "yyyy-mm-dd", if this is an all-day event. + /// The date, in the format "yyyy-mm-dd", if this is an all-day event. pub date: String, - /// The time zone in which the time is specified. (Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) For recurring events this field is required and specifies the time zone in which the recurrence is expanded. For single events this field is optional and indicates a custom time zone for the event start/end. + /// The time zone in which the time is specified. (Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) For recurring events this field is required and specifies the time zone in which the recurrence is expanded. For single events this field is optional and indicates a custom time zone for the event start/end. #[serde(alias="timeZone")] pub time_zone: String, - /// The time, as a combined date-time value (formatted according to RFC 3339). A time zone offset is required unless a time zone is explicitly specified in timeZone. + /// The time, as a combined date-time value (formatted according to RFC 3339). A time zone offset is required unless a time zone is explicitly specified in timeZone. #[serde(alias="dateTime")] pub date_time: String, } @@ -681,13 +690,13 @@ impl Part for EventDateTime {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Setting { - /// Type of the resource ("calendar#setting"). + /// Type of the resource ("calendar#setting"). pub kind: String, - /// ETag of the resource. + /// ETag of the resource. pub etag: String, - /// The id of the user setting. + /// The id of the user setting. pub id: String, - /// Value of the user setting. The format of the value depends on the ID of the setting. It must always be a UTF-8 string of length up to 1024 characters. + /// Value of the user setting. The format of the value depends on the ID of the setting. It must always be a UTF-8 string of length up to 1024 characters. pub value: String, } @@ -701,15 +710,15 @@ impl ResponseResult for Setting {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventCreator { - /// Whether the creator corresponds to the calendar on which this copy of the event appears. Read-only. The default is False. + /// Whether the creator corresponds to the calendar on which this copy of the event appears. Read-only. The default is False. #[serde(alias="self")] pub self_: bool, - /// The creator's name, if available. + /// The creator's name, if available. #[serde(alias="displayName")] pub display_name: String, - /// The creator's email address, if available. + /// The creator's email address, if available. pub email: String, - /// The creator's Profile ID, if available. + /// The creator's Profile ID, if available. pub id: String, } @@ -722,8 +731,8 @@ impl Part for EventCreator {} /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Deserialize)] -pub struct Error { - /// Domain, or broad category, of the error. +pub struct ErrorType { + /// Domain, or broad category, of the error. pub domain: String, /// Specific reason for the error. Some of the possible values are: /// - "groupTooBig" - The group of users requested is too large for a single query. @@ -733,7 +742,7 @@ pub struct Error { pub reason: String, } -impl Part for Error {} +impl Part for ErrorType {} /// There is no detailed description. @@ -750,11 +759,11 @@ impl Part for Error {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AclRule { - /// The scope of the rule. + /// The scope of the rule. pub scope: Option, - /// Type of the resource ("calendar#aclRule"). + /// Type of the resource ("calendar#aclRule"). pub kind: Option, - /// ETag of the resource. + /// ETag of the resource. pub etag: Option, /// The role assigned to the scope. Possible values are: /// - "none" - Provides no access. @@ -763,7 +772,7 @@ pub struct AclRule { /// - "writer" - Provides read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible. /// - "owner" - Provides ownership of the calendar. This role has all of the permissions of the writer role with the additional ability to see and manipulate ACLs. pub role: Option, - /// Identifier of the ACL rule. + /// Identifier of the ACL rule. pub id: Option, } @@ -782,16 +791,16 @@ impl ResponseResult for AclRule {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Acl { - /// Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. + /// Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// List of rules on the access control list. + /// List of rules on the access control list. pub items: Vec, - /// Type of the collection ("calendar#acl"). + /// Type of the collection ("calendar#acl"). pub kind: String, - /// ETag of the collection. + /// ETag of the collection. pub etag: String, - /// Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are available, in which case nextPageToken is provided. + /// Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are available, in which case nextPageToken is provided. #[serde(alias="nextSyncToken")] pub next_sync_token: String, } @@ -811,28 +820,28 @@ impl ResponseResult for Acl {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Events { - /// Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. + /// Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Type of the collection ("calendar#events"). + /// Type of the collection ("calendar#events"). pub kind: String, - /// The default reminders on the calendar for the authenticated user. These reminders apply to all events on this calendar that do not explicitly override them (i.e. do not have reminders.useDefault set to True). + /// The default reminders on the calendar for the authenticated user. These reminders apply to all events on this calendar that do not explicitly override them (i.e. do not have reminders.useDefault set to True). #[serde(alias="defaultReminders")] pub default_reminders: Vec, - /// Description of the calendar. Read-only. + /// Description of the calendar. Read-only. pub description: String, - /// List of events on the calendar. + /// List of events on the calendar. pub items: Vec, - /// Last modification time of the calendar (as a RFC 3339 timestamp). Read-only. + /// Last modification time of the calendar (as a RFC 3339 timestamp). Read-only. pub updated: String, - /// Title of the calendar. Read-only. + /// Title of the calendar. Read-only. pub summary: String, - /// ETag of the collection. + /// ETag of the collection. pub etag: String, - /// Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are available, in which case nextPageToken is provided. + /// Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are available, in which case nextPageToken is provided. #[serde(alias="nextSyncToken")] pub next_sync_token: String, - /// The time zone of the calendar. Read-only. + /// The time zone of the calendar. Read-only. #[serde(alias="timeZone")] pub time_zone: String, /// The user's access role for this calendar. Read-only. Possible values are: @@ -863,28 +872,28 @@ impl ResponseResult for Events {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Channel { - /// A version-specific identifier for the watched resource. + /// A version-specific identifier for the watched resource. #[serde(alias="resourceUri")] pub resource_uri: Option, - /// Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". + /// Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". pub kind: Option, - /// An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. + /// An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. #[serde(alias="resourceId")] pub resource_id: Option, - /// A UUID or similar unique string that identifies this channel. + /// A UUID or similar unique string that identifies this channel. pub id: Option, - /// An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. + /// An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. pub token: Option, - /// Additional parameters controlling delivery channel behavior. Optional. + /// Additional parameters controlling delivery channel behavior. Optional. pub params: Option>, - /// Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. + /// Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. pub expiration: Option, - /// The address where notifications are delivered for this channel. + /// The address where notifications are delivered for this channel. pub address: Option, - /// The type of delivery mechanism used for this channel. + /// The type of delivery mechanism used for this channel. #[serde(alias="type")] pub type_: Option, - /// A Boolean value to indicate whether payload is wanted. Optional. + /// A Boolean value to indicate whether payload is wanted. Optional. pub payload: Option, } @@ -899,26 +908,26 @@ impl ResponseResult for Channel {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventAttendee { - /// The attendee's response comment. Optional. + /// The attendee's response comment. Optional. pub comment: String, - /// The attendee's name, if available. Optional. + /// The attendee's name, if available. Optional. #[serde(alias="displayName")] pub display_name: String, - /// Whether this entry represents the calendar on which this copy of the event appears. Read-only. The default is False. + /// Whether this entry represents the calendar on which this copy of the event appears. Read-only. The default is False. #[serde(alias="self")] pub self_: bool, - /// The attendee's email address, if available. This field must be present when adding an attendee. + /// The attendee's email address, if available. This field must be present when adding an attendee. pub email: String, - /// The attendee's Profile ID, if available. + /// The attendee's Profile ID, if available. pub id: String, - /// Number of additional guests. Optional. The default is 0. + /// Number of additional guests. Optional. The default is 0. #[serde(alias="additionalGuests")] pub additional_guests: i32, - /// Whether the attendee is a resource. Read-only. The default is False. + /// Whether the attendee is a resource. Read-only. The default is False. pub resource: bool, - /// Whether the attendee is the organizer of the event. Read-only. The default is False. + /// Whether the attendee is the organizer of the event. Read-only. The default is False. pub organizer: bool, - /// Whether this is an optional attendee. Optional. The default is False. + /// Whether this is an optional attendee. Optional. The default is False. pub optional: bool, /// The attendee's response status. Possible values are: /// - "needsAction" - The attendee has not responded to the invitation. @@ -938,9 +947,9 @@ impl Part for EventAttendee {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct FreeBusyGroup { - /// Optional error(s) (if computation for the group failed). - pub errors: Vec, - /// List of calendars' identifiers within a group. + /// Optional error(s) (if computation for the group failed). + pub errors: Vec, + /// List of calendars' identifiers within a group. pub calendars: Vec, } @@ -953,9 +962,9 @@ impl Part for FreeBusyGroup {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventReminders { - /// If the event doesn't use the default reminders, this lists the reminders specific to the event, or, if not set, indicates that no reminders are set for this event. + /// If the event doesn't use the default reminders, this lists the reminders specific to the event, or, if not set, indicates that no reminders are set for this event. pub overrides: Vec, - /// Whether the default reminders of the calendar apply to the event. + /// Whether the default reminders of the calendar apply to the event. #[serde(alias="useDefault")] pub use_default: bool, } @@ -975,16 +984,16 @@ impl Part for EventReminders {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CalendarList { - /// Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. + /// Token used to access the next page of this result. Omitted if no further results are available, in which case nextSyncToken is provided. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Calendars that are present on the user's calendar list. + /// Calendars that are present on the user's calendar list. pub items: Vec, - /// Type of the collection ("calendar#calendarList"). + /// Type of the collection ("calendar#calendarList"). pub kind: String, - /// ETag of the collection. + /// ETag of the collection. pub etag: String, - /// Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are available, in which case nextPageToken is provided. + /// Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are available, in which case nextPageToken is provided. #[serde(alias="nextSyncToken")] pub next_sync_token: String, } @@ -998,9 +1007,9 @@ impl ResponseResult for CalendarList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventExtendedProperties { - /// Properties that are shared between copies of the event on other attendees' calendars. + /// Properties that are shared between copies of the event on other attendees' calendars. pub shared: HashMap, - /// Properties that are private to the copy of the event that appears on this calendar. + /// Properties that are private to the copy of the event that appears on this calendar. pub private: HashMap, } @@ -1014,7 +1023,7 @@ impl Part for EventExtendedProperties {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct FreeBusyRequestItem { - /// The identifier of a calendar or a group. + /// The identifier of a calendar or a group. pub id: String, } @@ -1032,16 +1041,16 @@ impl Part for FreeBusyRequestItem {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct FreeBusyResponse { - /// The end of the interval. + /// The end of the interval. #[serde(alias="timeMax")] pub time_max: String, - /// Type of the resource ("calendar#freeBusy"). + /// Type of the resource ("calendar#freeBusy"). pub kind: String, - /// List of free/busy information for calendars. + /// List of free/busy information for calendars. pub calendars: HashMap, - /// Expansion of groups. + /// Expansion of groups. pub groups: HashMap, - /// The start of the interval. + /// The start of the interval. #[serde(alias="timeMin")] pub time_min: String, } @@ -1060,13 +1069,13 @@ impl ResponseResult for FreeBusyResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Colors { - /// Palette of calendar colors, mapping from the color ID to its definition. A calendarListEntry resource refers to one of these color IDs in its color field. Read-only. + /// Palette of calendar colors, mapping from the color ID to its definition. A calendarListEntry resource refers to one of these color IDs in its color field. Read-only. pub calendar: HashMap, - /// Last modification time of the color palette (as a RFC 3339 timestamp). Read-only. + /// Last modification time of the color palette (as a RFC 3339 timestamp). Read-only. pub updated: String, - /// Type of the resource ("calendar#colors"). + /// Type of the resource ("calendar#colors"). pub kind: String, - /// Palette of event colors, mapping from the color ID to its definition. An event resource may refer to one of these color IDs in its color field. Read-only. + /// Palette of event colors, mapping from the color ID to its definition. An event resource may refer to one of these color IDs in its color field. Read-only. pub event: HashMap, } @@ -1084,21 +1093,21 @@ impl ResponseResult for Colors {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct FreeBusyRequest { - /// Maximal number of calendars for which FreeBusy information is to be provided. Optional. + /// Maximal number of calendars for which FreeBusy information is to be provided. Optional. #[serde(alias="calendarExpansionMax")] pub calendar_expansion_max: Option, - /// The start of the interval for the query. + /// The start of the interval for the query. #[serde(alias="timeMin")] pub time_min: Option, - /// Maximal number of calendar identifiers to be provided for a single group. Optional. An error will be returned for a group with more members than this value. + /// Maximal number of calendar identifiers to be provided for a single group. Optional. An error will be returned for a group with more members than this value. #[serde(alias="groupExpansionMax")] pub group_expansion_max: Option, - /// The end of the interval for the query. + /// The end of the interval for the query. #[serde(alias="timeMax")] pub time_max: Option, - /// List of calendars and/or groups to query. + /// List of calendars and/or groups to query. pub items: Option>, - /// Time zone used in the response. Optional. The default is UTC. + /// Time zone used in the response. Optional. The default is UTC. #[serde(alias="timeZone")] pub time_zone: Option, } @@ -1112,9 +1121,9 @@ impl RequestValue for FreeBusyRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventSource { - /// URL of the source pointing to a resource. URL's protocol must be HTTP or HTTPS. + /// URL of the source pointing to a resource. URL's protocol must be HTTP or HTTPS. pub url: String, - /// Title of the source; for example a title of a web page or an email subject. + /// Title of the source; for example a title of a web page or an email subject. pub title: String, } @@ -1128,15 +1137,15 @@ impl Part for EventSource {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventOrganizer { - /// Whether the organizer corresponds to the calendar on which this copy of the event appears. Read-only. The default is False. + /// Whether the organizer corresponds to the calendar on which this copy of the event appears. Read-only. The default is False. #[serde(alias="self")] pub self_: bool, - /// The organizer's name, if available. + /// The organizer's name, if available. #[serde(alias="displayName")] pub display_name: String, - /// The organizer's email address, if available. + /// The organizer's email address, if available. pub email: String, - /// The organizer's Profile ID, if available. + /// The organizer's Profile ID, if available. pub id: String, } @@ -1150,7 +1159,7 @@ impl Part for EventOrganizer {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventReminder { - /// Number of minutes before the start of the event when the reminder should trigger. + /// Number of minutes before the start of the event when the reminder should trigger. pub minutes: i32, /// The method used by this reminder. Possible values are: /// - "email" - Reminders are sent via email. @@ -1168,9 +1177,9 @@ impl Part for EventReminder {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TimePeriod { - /// The (inclusive) start of the time period. + /// The (inclusive) start of the time period. pub start: String, - /// The (exclusive) end of the time period. + /// The (exclusive) end of the time period. pub end: String, } @@ -1221,40 +1230,40 @@ impl Part for CalendarNotification {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Event { - /// The creator of the event. Read-only. + /// The creator of the event. Read-only. pub creator: Option, - /// The organizer of the event. If the organizer is also an attendee, this is indicated with a separate entry in attendees with the organizer field set to True. To change the organizer, use the move operation. Read-only, except when importing an event. + /// The organizer of the event. If the organizer is also an attendee, this is indicated with a separate entry in attendees with the organizer field set to True. To change the organizer, use the move operation. Read-only, except when importing an event. pub organizer: Option, /// Identifier of the event. When creating new single or recurring events, you can specify their IDs. Provided IDs must follow these rules: /// - characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938 /// - the length of the ID must be between 5 and 1024 characters /// - the ID must be unique per calendar Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. To minimize the risk of collisions we recommend using an established UUID algorithm such as one described in RFC4122. pub id: Option, - /// An absolute link to the Google+ hangout associated with this event. Read-only. + /// An absolute link to the Google+ hangout associated with this event. Read-only. #[serde(alias="hangoutLink")] pub hangout_link: Option, - /// Whether attendees other than the organizer can invite others to the event. Optional. The default is True. + /// Whether attendees other than the organizer can invite others to the event. Optional. The default is True. #[serde(alias="guestsCanInviteOthers")] pub guests_can_invite_others: Option, - /// The attendees of the event. + /// The attendees of the event. pub attendees: Option>, - /// The (inclusive) start time of the event. For a recurring event, this is the start time of the first instance. + /// The (inclusive) start time of the event. For a recurring event, this is the start time of the first instance. pub start: Option, - /// An absolute link to this event in the Google Calendar Web UI. Read-only. + /// An absolute link to this event in the Google Calendar Web UI. Read-only. #[serde(alias="htmlLink")] pub html_link: Option, - /// List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event. This field is omitted for single events or instances of recurring events. + /// List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event. This field is omitted for single events or instances of recurring events. pub recurrence: Option>, - /// Source of an event from which it was created; for example a web page, an email message or any document identifiable by an URL using HTTP/HTTPS protocol. Accessible only by the creator of the event. + /// Source of an event from which it was created; for example a web page, an email message or any document identifiable by an URL using HTTP/HTTPS protocol. Accessible only by the creator of the event. pub source: Option, - /// ETag of the resource. + /// ETag of the resource. pub etag: Option, - /// Geographic location of the event as free-form text. Optional. + /// Geographic location of the event as free-form text. Optional. pub location: Option, - /// For an instance of a recurring event, this is the event ID of the recurring event itself. Immutable. + /// For an instance of a recurring event, this is the event ID of the recurring event itself. Immutable. #[serde(alias="recurringEventId")] pub recurring_event_id: Option, - /// For an instance of a recurring event, this is the time at which this event would start according to the recurrence data in the recurring event identified by recurringEventId. Immutable. + /// For an instance of a recurring event, this is the time at which this event would start according to the recurrence data in the recurring event identified by recurringEventId. Immutable. #[serde(alias="originalStartTime")] pub original_start_time: Option, /// Status of the event. Optional. Possible values are: @@ -1262,19 +1271,19 @@ pub struct Event { /// - "tentative" - The event is tentatively confirmed. /// - "cancelled" - The event is cancelled. pub status: Option, - /// Last modification time of the event (as a RFC 3339 timestamp). Read-only. + /// Last modification time of the event (as a RFC 3339 timestamp). Read-only. pub updated: Option, - /// Description of the event. Optional. + /// Description of the event. Optional. pub description: Option, - /// Event ID in the iCalendar format. + /// Event ID in the iCalendar format. #[serde(alias="iCalUID")] pub i_cal_uid: Option, - /// A gadget that extends this event. + /// A gadget that extends this event. pub gadget: Option, - /// Whether the end time is actually unspecified. An end time is still provided for compatibility reasons, even if this attribute is set to True. The default is False. + /// Whether the end time is actually unspecified. An end time is still provided for compatibility reasons, even if this attribute is set to True. The default is False. #[serde(alias="endTimeUnspecified")] pub end_time_unspecified: Option, - /// Sequence number as per iCalendar. + /// Sequence number as per iCalendar. pub sequence: Option, /// Visibility of the event. Optional. Possible values are: /// - "default" - Uses the default visibility for events on the calendar. This is the default value. @@ -1282,41 +1291,41 @@ pub struct Event { /// - "private" - The event is private and only event attendees may view event details. /// - "confidential" - The event is private. This value is provided for compatibility reasons. pub visibility: Option, - /// Whether attendees other than the organizer can modify the event. Optional. The default is False. + /// Whether attendees other than the organizer can modify the event. Optional. The default is False. #[serde(alias="guestsCanModify")] pub guests_can_modify: Option, - /// The (exclusive) end time of the event. For a recurring event, this is the end time of the first instance. + /// The (exclusive) end time of the event. For a recurring event, this is the end time of the first instance. pub end: Option, - /// Whether attendees may have been omitted from the event's representation. When retrieving an event, this may be due to a restriction specified by the maxAttendee query parameter. When updating an event, this can be used to only update the participant's response. Optional. The default is False. + /// Whether attendees may have been omitted from the event's representation. When retrieving an event, this may be due to a restriction specified by the maxAttendee query parameter. When updating an event, this can be used to only update the participant's response. Optional. The default is False. #[serde(alias="attendeesOmitted")] pub attendees_omitted: Option, - /// Type of the resource ("calendar#event"). + /// Type of the resource ("calendar#event"). pub kind: Option, - /// Whether this is a locked event copy where no changes can be made to the main event fields "summary", "description", "location", "start", "end" or "recurrence". The default is False. Read-Only. + /// Whether this is a locked event copy where no changes can be made to the main event fields "summary", "description", "location", "start", "end" or "recurrence". The default is False. Read-Only. pub locked: Option, - /// Creation time of the event (as a RFC 3339 timestamp). Read-only. + /// Creation time of the event (as a RFC 3339 timestamp). Read-only. pub created: Option, - /// The color of the event. This is an ID referring to an entry in the event section of the colors definition (see the colors endpoint). Optional. + /// The color of the event. This is an ID referring to an entry in the event section of the colors definition (see the colors endpoint). Optional. #[serde(alias="colorId")] pub color_id: Option, - /// Whether anyone can invite themselves to the event. Optional. The default is False. + /// Whether anyone can invite themselves to the event. Optional. The default is False. #[serde(alias="anyoneCanAddSelf")] pub anyone_can_add_self: Option, - /// Information about the event's reminders for the authenticated user. + /// Information about the event's reminders for the authenticated user. pub reminders: Option, - /// Whether attendees other than the organizer can see who the event's attendees are. Optional. The default is True. + /// Whether attendees other than the organizer can see who the event's attendees are. Optional. The default is True. #[serde(alias="guestsCanSeeOtherGuests")] pub guests_can_see_other_guests: Option, - /// Title of the event. + /// Title of the event. pub summary: Option, - /// Extended properties of the event. + /// Extended properties of the event. #[serde(alias="extendedProperties")] pub extended_properties: Option, /// Whether the event blocks time on the calendar. Optional. Possible values are: /// - "opaque" - The event blocks time on the calendar. This is the default value. /// - "transparent" - The event does not block time on the calendar. pub transparency: Option, - /// Whether this is a private event copy where changes are not shared with other copies on other calendars. Optional. Immutable. The default is False. + /// Whether this is a private event copy where changes are not shared with other copies on other calendars. Optional. Immutable. The default is False. #[serde(alias="privateCopy")] pub private_copy: Option, } @@ -1365,13 +1374,17 @@ pub struct FreebusyMethods<'a, C, NC, A> hub: &'a CalendarHub, } -impl<'a, C, NC, A> ResourceMethodsBuilder for FreebusyMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for FreebusyMethods<'a, C, NC, A> {} impl<'a, C, NC, A> FreebusyMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns free/busy information for a set of calendars. + /// Returns free/busy information for a set of calendars. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn query(&self, request: &FreeBusyRequest) -> FreebusyQueryCall<'a, C, NC, A> { FreebusyQueryCall { hub: self.hub, @@ -1419,13 +1432,13 @@ pub struct SettingMethods<'a, C, NC, A> hub: &'a CalendarHub, } -impl<'a, C, NC, A> ResourceMethodsBuilder for SettingMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for SettingMethods<'a, C, NC, A> {} impl<'a, C, NC, A> SettingMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns all user settings for the authenticated user. + /// Returns all user settings for the authenticated user. pub fn list(&self) -> SettingListCall<'a, C, NC, A> { SettingListCall { hub: self.hub, @@ -1440,7 +1453,11 @@ impl<'a, C, NC, A> SettingMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Watch for changes to Settings resources. + /// Watch for changes to Settings resources. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn watch(&self, request: &Channel) -> SettingWatchCall<'a, C, NC, A> { SettingWatchCall { hub: self.hub, @@ -1456,7 +1473,11 @@ impl<'a, C, NC, A> SettingMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns a single user setting. + /// Returns a single user setting. + /// + /// # Arguments + /// + /// * `setting` - The id of the user setting. pub fn get(&self, setting: &str) -> SettingGetCall<'a, C, NC, A> { SettingGetCall { hub: self.hub, @@ -1504,13 +1525,18 @@ pub struct CalendarListMethods<'a, C, NC, A> hub: &'a CalendarHub, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CalendarListMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CalendarListMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CalendarListMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an entry on the user's calendar list. + /// Updates an entry on the user's calendar list. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `calendarId` - Calendar identifier. pub fn update(&self, request: &CalendarListEntry, calendar_id: &str) -> CalendarListUpdateCall<'a, C, NC, A> { CalendarListUpdateCall { hub: self.hub, @@ -1525,7 +1551,11 @@ impl<'a, C, NC, A> CalendarListMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an entry on the user's calendar list. + /// Deletes an entry on the user's calendar list. + /// + /// # Arguments + /// + /// * `calendarId` - Calendar identifier. pub fn delete(&self, calendar_id: &str) -> CalendarListDeleteCall<'a, C, NC, A> { CalendarListDeleteCall { hub: self.hub, @@ -1538,7 +1568,11 @@ impl<'a, C, NC, A> CalendarListMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns an entry on the user's calendar list. + /// Returns an entry on the user's calendar list. + /// + /// # Arguments + /// + /// * `calendarId` - Calendar identifier. pub fn get(&self, calendar_id: &str) -> CalendarListGetCall<'a, C, NC, A> { CalendarListGetCall { hub: self.hub, @@ -1551,7 +1585,7 @@ impl<'a, C, NC, A> CalendarListMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns entries on the user's calendar list. + /// Returns entries on the user's calendar list. pub fn list(&self) -> CalendarListListCall<'a, C, NC, A> { CalendarListListCall { hub: self.hub, @@ -1569,7 +1603,11 @@ impl<'a, C, NC, A> CalendarListMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Adds an entry to the user's calendar list. + /// Adds an entry to the user's calendar list. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn insert(&self, request: &CalendarListEntry) -> CalendarListInsertCall<'a, C, NC, A> { CalendarListInsertCall { hub: self.hub, @@ -1583,7 +1621,12 @@ impl<'a, C, NC, A> CalendarListMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an entry on the user's calendar list. This method supports patch semantics. + /// Updates an entry on the user's calendar list. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `calendarId` - Calendar identifier. pub fn patch(&self, request: &CalendarListEntry, calendar_id: &str) -> CalendarListPatchCall<'a, C, NC, A> { CalendarListPatchCall { hub: self.hub, @@ -1598,7 +1641,11 @@ impl<'a, C, NC, A> CalendarListMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Watch for changes to CalendarList resources. + /// Watch for changes to CalendarList resources. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn watch(&self, request: &Channel) -> CalendarListWatchCall<'a, C, NC, A> { CalendarListWatchCall { hub: self.hub, @@ -1652,13 +1699,18 @@ pub struct CalendarMethods<'a, C, NC, A> hub: &'a CalendarHub, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CalendarMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CalendarMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CalendarMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates metadata for a calendar. This method supports patch semantics. + /// Updates metadata for a calendar. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `calendarId` - Calendar identifier. pub fn patch(&self, request: &Calendar, calendar_id: &str) -> CalendarPatchCall<'a, C, NC, A> { CalendarPatchCall { hub: self.hub, @@ -1672,7 +1724,11 @@ impl<'a, C, NC, A> CalendarMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars. + /// Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars. + /// + /// # Arguments + /// + /// * `calendarId` - Calendar identifier. pub fn delete(&self, calendar_id: &str) -> CalendarDeleteCall<'a, C, NC, A> { CalendarDeleteCall { hub: self.hub, @@ -1685,7 +1741,11 @@ impl<'a, C, NC, A> CalendarMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns metadata for a calendar. + /// Returns metadata for a calendar. + /// + /// # Arguments + /// + /// * `calendarId` - Calendar identifier. pub fn get(&self, calendar_id: &str) -> CalendarGetCall<'a, C, NC, A> { CalendarGetCall { hub: self.hub, @@ -1698,7 +1758,11 @@ impl<'a, C, NC, A> CalendarMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account. + /// Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account. + /// + /// # Arguments + /// + /// * `calendarId` - Calendar identifier. pub fn clear(&self, calendar_id: &str) -> CalendarClearCall<'a, C, NC, A> { CalendarClearCall { hub: self.hub, @@ -1711,7 +1775,11 @@ impl<'a, C, NC, A> CalendarMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a secondary calendar. + /// Creates a secondary calendar. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn insert(&self, request: &Calendar) -> CalendarInsertCall<'a, C, NC, A> { CalendarInsertCall { hub: self.hub, @@ -1724,7 +1792,12 @@ impl<'a, C, NC, A> CalendarMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates metadata for a calendar. + /// Updates metadata for a calendar. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `calendarId` - Calendar identifier. pub fn update(&self, request: &Calendar, calendar_id: &str) -> CalendarUpdateCall<'a, C, NC, A> { CalendarUpdateCall { hub: self.hub, @@ -1773,13 +1846,18 @@ pub struct AclMethods<'a, C, NC, A> hub: &'a CalendarHub, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AclMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AclMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AclMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Watch for changes to ACL resources. + /// Watch for changes to ACL resources. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `calendarId` - Calendar identifier. pub fn watch(&self, request: &Channel, calendar_id: &str) -> AclWatchCall<'a, C, NC, A> { AclWatchCall { hub: self.hub, @@ -1797,7 +1875,12 @@ impl<'a, C, NC, A> AclMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates an access control rule. + /// Creates an access control rule. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `calendarId` - Calendar identifier. pub fn insert(&self, request: &AclRule, calendar_id: &str) -> AclInsertCall<'a, C, NC, A> { AclInsertCall { hub: self.hub, @@ -1811,7 +1894,13 @@ impl<'a, C, NC, A> AclMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an access control rule. + /// Updates an access control rule. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `calendarId` - Calendar identifier. + /// * `ruleId` - ACL rule identifier. pub fn update(&self, request: &AclRule, calendar_id: &str, rule_id: &str) -> AclUpdateCall<'a, C, NC, A> { AclUpdateCall { hub: self.hub, @@ -1826,7 +1915,13 @@ impl<'a, C, NC, A> AclMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an access control rule. This method supports patch semantics. + /// Updates an access control rule. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `calendarId` - Calendar identifier. + /// * `ruleId` - ACL rule identifier. pub fn patch(&self, request: &AclRule, calendar_id: &str, rule_id: &str) -> AclPatchCall<'a, C, NC, A> { AclPatchCall { hub: self.hub, @@ -1841,7 +1936,11 @@ impl<'a, C, NC, A> AclMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the rules in the access control list for the calendar. + /// Returns the rules in the access control list for the calendar. + /// + /// # Arguments + /// + /// * `calendarId` - Calendar identifier. pub fn list(&self, calendar_id: &str) -> AclListCall<'a, C, NC, A> { AclListCall { hub: self.hub, @@ -1858,7 +1957,12 @@ impl<'a, C, NC, A> AclMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an access control rule. + /// Deletes an access control rule. + /// + /// # Arguments + /// + /// * `calendarId` - Calendar identifier. + /// * `ruleId` - ACL rule identifier. pub fn delete(&self, calendar_id: &str, rule_id: &str) -> AclDeleteCall<'a, C, NC, A> { AclDeleteCall { hub: self.hub, @@ -1872,7 +1976,12 @@ impl<'a, C, NC, A> AclMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns an access control rule. + /// Returns an access control rule. + /// + /// # Arguments + /// + /// * `calendarId` - Calendar identifier. + /// * `ruleId` - ACL rule identifier. pub fn get(&self, calendar_id: &str, rule_id: &str) -> AclGetCall<'a, C, NC, A> { AclGetCall { hub: self.hub, @@ -1921,13 +2030,17 @@ pub struct ChannelMethods<'a, C, NC, A> hub: &'a CalendarHub, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ChannelMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ChannelMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ChannelMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Stop watching resources through this channel + /// Stop watching resources through this channel + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn stop(&self, request: &Channel) -> ChannelStopCall<'a, C, NC, A> { ChannelStopCall { hub: self.hub, @@ -1975,13 +2088,13 @@ pub struct ColorMethods<'a, C, NC, A> hub: &'a CalendarHub, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ColorMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ColorMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ColorMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the color definitions for calendars and events. + /// Returns the color definitions for calendars and events. pub fn get(&self) -> ColorGetCall<'a, C, NC, A> { ColorGetCall { hub: self.hub, @@ -2028,13 +2141,18 @@ pub struct EventMethods<'a, C, NC, A> hub: &'a CalendarHub, } -impl<'a, C, NC, A> ResourceMethodsBuilder for EventMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for EventMethods<'a, C, NC, A> {} impl<'a, C, NC, A> EventMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an event. + /// Deletes an event. + /// + /// # Arguments + /// + /// * `calendarId` - Calendar identifier. + /// * `eventId` - Event identifier. pub fn delete(&self, calendar_id: &str, event_id: &str) -> EventDeleteCall<'a, C, NC, A> { EventDeleteCall { hub: self.hub, @@ -2049,7 +2167,12 @@ impl<'a, C, NC, A> EventMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates an event. + /// Creates an event. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `calendarId` - Calendar identifier. pub fn insert(&self, request: &Event, calendar_id: &str) -> EventInsertCall<'a, C, NC, A> { EventInsertCall { hub: self.hub, @@ -2065,7 +2188,12 @@ impl<'a, C, NC, A> EventMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Imports an event. This operation is used to add a private copy of an existing event to a calendar. + /// Imports an event. This operation is used to add a private copy of an existing event to a calendar. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `calendarId` - Calendar identifier. pub fn import(&self, request: &Event, calendar_id: &str) -> EventImportCall<'a, C, NC, A> { EventImportCall { hub: self.hub, @@ -2079,7 +2207,12 @@ impl<'a, C, NC, A> EventMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns instances of the specified recurring event. + /// Returns instances of the specified recurring event. + /// + /// # Arguments + /// + /// * `calendarId` - Calendar identifier. + /// * `eventId` - Recurring event identifier. pub fn instances(&self, calendar_id: &str, event_id: &str) -> EventInstanceCall<'a, C, NC, A> { EventInstanceCall { hub: self.hub, @@ -2102,7 +2235,12 @@ impl<'a, C, NC, A> EventMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns an event. + /// Returns an event. + /// + /// # Arguments + /// + /// * `calendarId` - Calendar identifier. + /// * `eventId` - Event identifier. pub fn get(&self, calendar_id: &str, event_id: &str) -> EventGetCall<'a, C, NC, A> { EventGetCall { hub: self.hub, @@ -2119,7 +2257,11 @@ impl<'a, C, NC, A> EventMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns events on the specified calendar. + /// Returns events on the specified calendar. + /// + /// # Arguments + /// + /// * `calendarId` - Calendar identifier. pub fn list(&self, calendar_id: &str) -> EventListCall<'a, C, NC, A> { EventListCall { hub: self.hub, @@ -2149,7 +2291,13 @@ impl<'a, C, NC, A> EventMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an event. This method supports patch semantics. + /// Updates an event. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `calendarId` - Calendar identifier. + /// * `eventId` - Event identifier. pub fn patch(&self, request: &Event, calendar_id: &str, event_id: &str) -> EventPatchCall<'a, C, NC, A> { EventPatchCall { hub: self.hub, @@ -2167,7 +2315,13 @@ impl<'a, C, NC, A> EventMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Moves an event to another calendar, i.e. changes an event's organizer. + /// Moves an event to another calendar, i.e. changes an event's organizer. + /// + /// # Arguments + /// + /// * `calendarId` - Calendar identifier of the source calendar where the event currently is on. + /// * `eventId` - Event identifier. + /// * `destination` - Calendar identifier of the target calendar where the event is to be moved to. pub fn move_(&self, calendar_id: &str, event_id: &str, destination: &str) -> EventMoveCall<'a, C, NC, A> { EventMoveCall { hub: self.hub, @@ -2183,7 +2337,13 @@ impl<'a, C, NC, A> EventMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an event. + /// Updates an event. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `calendarId` - Calendar identifier. + /// * `eventId` - Event identifier. pub fn update(&self, request: &Event, calendar_id: &str, event_id: &str) -> EventUpdateCall<'a, C, NC, A> { EventUpdateCall { hub: self.hub, @@ -2201,7 +2361,12 @@ impl<'a, C, NC, A> EventMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Watch for changes to Events resources. + /// Watch for changes to Events resources. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `calendarId` - Calendar identifier. pub fn watch(&self, request: &Channel, calendar_id: &str) -> EventWatchCall<'a, C, NC, A> { EventWatchCall { hub: self.hub, @@ -2232,7 +2397,12 @@ impl<'a, C, NC, A> EventMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates an event based on a simple text string. + /// Creates an event based on a simple text string. + /// + /// # Arguments + /// + /// * `calendarId` - Calendar identifier. + /// * `text` - The text describing the event to be created. pub fn quick_add(&self, calendar_id: &str, text: &str) -> EventQuickAddCall<'a, C, NC, A> { EventQuickAddCall { hub: self.hub, @@ -2257,7 +2427,7 @@ impl<'a, C, NC, A> EventMethods<'a, C, NC, A> { /// Returns free/busy information for a set of calendars. /// /// A builder for the *query* method supported by a *freebusy* resource. -/// It is not used directly, but through a `FreebusyMethods`. +/// It is not used directly, but through a `FreebusyMethods` instance. /// /// # Example /// @@ -2320,7 +2490,7 @@ impl<'a, C, NC, A> FreebusyQueryCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2353,7 +2523,7 @@ impl<'a, C, NC, A> FreebusyQueryCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2369,7 +2539,6 @@ impl<'a, C, NC, A> FreebusyQueryCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -2379,7 +2548,7 @@ impl<'a, C, NC, A> FreebusyQueryCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2390,7 +2559,7 @@ impl<'a, C, NC, A> FreebusyQueryCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2399,13 +2568,13 @@ impl<'a, C, NC, A> FreebusyQueryCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2477,7 +2646,7 @@ impl<'a, C, NC, A> FreebusyQueryCall<'a, C, NC, A> where NC: hyper::net::Network /// Returns all user settings for the authenticated user. /// /// A builder for the *list* method supported by a *setting* resource. -/// It is not used directly, but through a `SettingMethods`. +/// It is not used directly, but through a `SettingMethods` instance. /// /// # Example /// @@ -2548,7 +2717,7 @@ impl<'a, C, NC, A> SettingListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "syncToken", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2577,7 +2746,7 @@ impl<'a, C, NC, A> SettingListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2589,7 +2758,6 @@ impl<'a, C, NC, A> SettingListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -2599,7 +2767,7 @@ impl<'a, C, NC, A> SettingListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2610,7 +2778,7 @@ impl<'a, C, NC, A> SettingListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2619,13 +2787,13 @@ impl<'a, C, NC, A> SettingListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2646,7 +2814,7 @@ impl<'a, C, NC, A> SettingListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *page token* query property to the given value. /// /// - /// Token specifying which result page to return. Optional. + /// Token specifying which result page to return. Optional. pub fn page_token(mut self, new_value: &str) -> SettingListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2654,7 +2822,7 @@ impl<'a, C, NC, A> SettingListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. + /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. pub fn max_results(mut self, new_value: i32) -> SettingListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2715,7 +2883,7 @@ impl<'a, C, NC, A> SettingListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Watch for changes to Settings resources. /// /// A builder for the *watch* method supported by a *setting* resource. -/// It is not used directly, but through a `SettingMethods`. +/// It is not used directly, but through a `SettingMethods` instance. /// /// # Example /// @@ -2793,7 +2961,7 @@ impl<'a, C, NC, A> SettingWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "syncToken", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2826,7 +2994,7 @@ impl<'a, C, NC, A> SettingWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2842,7 +3010,6 @@ impl<'a, C, NC, A> SettingWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -2852,7 +3019,7 @@ impl<'a, C, NC, A> SettingWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2863,7 +3030,7 @@ impl<'a, C, NC, A> SettingWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2872,13 +3039,13 @@ impl<'a, C, NC, A> SettingWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2908,7 +3075,7 @@ impl<'a, C, NC, A> SettingWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// Token specifying which result page to return. Optional. + /// Token specifying which result page to return. Optional. pub fn page_token(mut self, new_value: &str) -> SettingWatchCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2916,7 +3083,7 @@ impl<'a, C, NC, A> SettingWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. + /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. pub fn max_results(mut self, new_value: i32) -> SettingWatchCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2977,7 +3144,7 @@ impl<'a, C, NC, A> SettingWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Returns a single user setting. /// /// A builder for the *get* method supported by a *setting* resource. -/// It is not used directly, but through a `SettingMethods`. +/// It is not used directly, but through a `SettingMethods` instance. /// /// # Example /// @@ -3035,7 +3202,7 @@ impl<'a, C, NC, A> SettingGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "setting"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3088,7 +3255,7 @@ impl<'a, C, NC, A> SettingGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3100,7 +3267,6 @@ impl<'a, C, NC, A> SettingGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -3110,7 +3276,7 @@ impl<'a, C, NC, A> SettingGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3121,7 +3287,7 @@ impl<'a, C, NC, A> SettingGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3130,13 +3296,13 @@ impl<'a, C, NC, A> SettingGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3148,7 +3314,7 @@ impl<'a, C, NC, A> SettingGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The id of the user setting. + /// The id of the user setting. pub fn setting(mut self, new_value: &str) -> SettingGetCall<'a, C, NC, A> { self._setting = new_value.to_string(); self @@ -3209,7 +3375,7 @@ impl<'a, C, NC, A> SettingGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Updates an entry on the user's calendar list. /// /// A builder for the *update* method supported by a *calendarList* resource. -/// It is not used directly, but through a `CalendarListMethods`. +/// It is not used directly, but through a `CalendarListMethods` instance. /// /// # Example /// @@ -3279,7 +3445,7 @@ impl<'a, C, NC, A> CalendarListUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "calendarId", "colorRgbFormat"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3336,7 +3502,7 @@ impl<'a, C, NC, A> CalendarListUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3352,7 +3518,6 @@ impl<'a, C, NC, A> CalendarListUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -3362,7 +3527,7 @@ impl<'a, C, NC, A> CalendarListUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3373,7 +3538,7 @@ impl<'a, C, NC, A> CalendarListUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3382,13 +3547,13 @@ impl<'a, C, NC, A> CalendarListUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3409,7 +3574,7 @@ impl<'a, C, NC, A> CalendarListUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarListUpdateCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -3417,7 +3582,7 @@ impl<'a, C, NC, A> CalendarListUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *color rgb format* query property to the given value. /// /// - /// Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False. + /// Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False. pub fn color_rgb_format(mut self, new_value: bool) -> CalendarListUpdateCall<'a, C, NC, A> { self._color_rgb_format = Some(new_value); self @@ -3478,7 +3643,7 @@ impl<'a, C, NC, A> CalendarListUpdateCall<'a, C, NC, A> where NC: hyper::net::Ne /// Deletes an entry on the user's calendar list. /// /// A builder for the *delete* method supported by a *calendarList* resource. -/// It is not used directly, but through a `CalendarListMethods`. +/// It is not used directly, but through a `CalendarListMethods` instance. /// /// # Example /// @@ -3536,7 +3701,7 @@ impl<'a, C, NC, A> CalendarListDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["calendarId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3588,7 +3753,7 @@ impl<'a, C, NC, A> CalendarListDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3600,7 +3765,6 @@ impl<'a, C, NC, A> CalendarListDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -3610,7 +3774,7 @@ impl<'a, C, NC, A> CalendarListDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3621,12 +3785,12 @@ impl<'a, C, NC, A> CalendarListDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3638,7 +3802,7 @@ impl<'a, C, NC, A> CalendarListDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarListDeleteCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -3699,7 +3863,7 @@ impl<'a, C, NC, A> CalendarListDeleteCall<'a, C, NC, A> where NC: hyper::net::Ne /// Returns an entry on the user's calendar list. /// /// A builder for the *get* method supported by a *calendarList* resource. -/// It is not used directly, but through a `CalendarListMethods`. +/// It is not used directly, but through a `CalendarListMethods` instance. /// /// # Example /// @@ -3757,7 +3921,7 @@ impl<'a, C, NC, A> CalendarListGetCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "calendarId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3810,7 +3974,7 @@ impl<'a, C, NC, A> CalendarListGetCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3822,7 +3986,6 @@ impl<'a, C, NC, A> CalendarListGetCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -3832,7 +3995,7 @@ impl<'a, C, NC, A> CalendarListGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3843,7 +4006,7 @@ impl<'a, C, NC, A> CalendarListGetCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3852,13 +4015,13 @@ impl<'a, C, NC, A> CalendarListGetCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3870,7 +4033,7 @@ impl<'a, C, NC, A> CalendarListGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarListGetCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -3931,7 +4094,7 @@ impl<'a, C, NC, A> CalendarListGetCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Returns entries on the user's calendar list. /// /// A builder for the *list* method supported by a *calendarList* resource. -/// It is not used directly, but through a `CalendarListMethods`. +/// It is not used directly, but through a `CalendarListMethods` instance. /// /// # Example /// @@ -4017,7 +4180,7 @@ impl<'a, C, NC, A> CalendarListListCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "syncToken", "showHidden", "showDeleted", "pageToken", "minAccessRole", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4046,7 +4209,7 @@ impl<'a, C, NC, A> CalendarListListCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4058,7 +4221,6 @@ impl<'a, C, NC, A> CalendarListListCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -4068,7 +4230,7 @@ impl<'a, C, NC, A> CalendarListListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4079,7 +4241,7 @@ impl<'a, C, NC, A> CalendarListListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4088,13 +4250,13 @@ impl<'a, C, NC, A> CalendarListListCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4116,7 +4278,7 @@ impl<'a, C, NC, A> CalendarListListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *show hidden* query property to the given value. /// /// - /// Whether to show hidden entries. Optional. The default is False. + /// Whether to show hidden entries. Optional. The default is False. pub fn show_hidden(mut self, new_value: bool) -> CalendarListListCall<'a, C, NC, A> { self._show_hidden = Some(new_value); self @@ -4124,7 +4286,7 @@ impl<'a, C, NC, A> CalendarListListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *show deleted* query property to the given value. /// /// - /// Whether to include deleted calendar list entries in the result. Optional. The default is False. + /// Whether to include deleted calendar list entries in the result. Optional. The default is False. pub fn show_deleted(mut self, new_value: bool) -> CalendarListListCall<'a, C, NC, A> { self._show_deleted = Some(new_value); self @@ -4132,7 +4294,7 @@ impl<'a, C, NC, A> CalendarListListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *page token* query property to the given value. /// /// - /// Token specifying which result page to return. Optional. + /// Token specifying which result page to return. Optional. pub fn page_token(mut self, new_value: &str) -> CalendarListListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -4140,7 +4302,7 @@ impl<'a, C, NC, A> CalendarListListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *min access role* query property to the given value. /// /// - /// The minimum access role for the user in the returned entires. Optional. The default is no restriction. + /// The minimum access role for the user in the returned entires. Optional. The default is no restriction. pub fn min_access_role(mut self, new_value: &str) -> CalendarListListCall<'a, C, NC, A> { self._min_access_role = Some(new_value.to_string()); self @@ -4148,7 +4310,7 @@ impl<'a, C, NC, A> CalendarListListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. + /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. pub fn max_results(mut self, new_value: i32) -> CalendarListListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -4209,7 +4371,7 @@ impl<'a, C, NC, A> CalendarListListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Adds an entry to the user's calendar list. /// /// A builder for the *insert* method supported by a *calendarList* resource. -/// It is not used directly, but through a `CalendarListMethods`. +/// It is not used directly, but through a `CalendarListMethods` instance. /// /// # Example /// @@ -4277,7 +4439,7 @@ impl<'a, C, NC, A> CalendarListInsertCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "colorRgbFormat"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4310,7 +4472,7 @@ impl<'a, C, NC, A> CalendarListInsertCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4326,7 +4488,6 @@ impl<'a, C, NC, A> CalendarListInsertCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -4336,7 +4497,7 @@ impl<'a, C, NC, A> CalendarListInsertCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4347,7 +4508,7 @@ impl<'a, C, NC, A> CalendarListInsertCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4356,13 +4517,13 @@ impl<'a, C, NC, A> CalendarListInsertCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4381,7 +4542,7 @@ impl<'a, C, NC, A> CalendarListInsertCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *color rgb format* query property to the given value. /// /// - /// Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False. + /// Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False. pub fn color_rgb_format(mut self, new_value: bool) -> CalendarListInsertCall<'a, C, NC, A> { self._color_rgb_format = Some(new_value); self @@ -4442,7 +4603,7 @@ impl<'a, C, NC, A> CalendarListInsertCall<'a, C, NC, A> where NC: hyper::net::Ne /// Updates an entry on the user's calendar list. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *calendarList* resource. -/// It is not used directly, but through a `CalendarListMethods`. +/// It is not used directly, but through a `CalendarListMethods` instance. /// /// # Example /// @@ -4512,7 +4673,7 @@ impl<'a, C, NC, A> CalendarListPatchCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "calendarId", "colorRgbFormat"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4569,7 +4730,7 @@ impl<'a, C, NC, A> CalendarListPatchCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4585,7 +4746,6 @@ impl<'a, C, NC, A> CalendarListPatchCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -4595,7 +4755,7 @@ impl<'a, C, NC, A> CalendarListPatchCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4606,7 +4766,7 @@ impl<'a, C, NC, A> CalendarListPatchCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4615,13 +4775,13 @@ impl<'a, C, NC, A> CalendarListPatchCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4642,7 +4802,7 @@ impl<'a, C, NC, A> CalendarListPatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarListPatchCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -4650,7 +4810,7 @@ impl<'a, C, NC, A> CalendarListPatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *color rgb format* query property to the given value. /// /// - /// Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False. + /// Whether to use the foregroundColor and backgroundColor fields to write the calendar colors (RGB). If this feature is used, the index-based colorId field will be set to the best matching option automatically. Optional. The default is False. pub fn color_rgb_format(mut self, new_value: bool) -> CalendarListPatchCall<'a, C, NC, A> { self._color_rgb_format = Some(new_value); self @@ -4711,7 +4871,7 @@ impl<'a, C, NC, A> CalendarListPatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Watch for changes to CalendarList resources. /// /// A builder for the *watch* method supported by a *calendarList* resource. -/// It is not used directly, but through a `CalendarListMethods`. +/// It is not used directly, but through a `CalendarListMethods` instance. /// /// # Example /// @@ -4804,7 +4964,7 @@ impl<'a, C, NC, A> CalendarListWatchCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "syncToken", "showHidden", "showDeleted", "pageToken", "minAccessRole", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4837,7 +4997,7 @@ impl<'a, C, NC, A> CalendarListWatchCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4853,7 +5013,6 @@ impl<'a, C, NC, A> CalendarListWatchCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -4863,7 +5022,7 @@ impl<'a, C, NC, A> CalendarListWatchCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4874,7 +5033,7 @@ impl<'a, C, NC, A> CalendarListWatchCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4883,13 +5042,13 @@ impl<'a, C, NC, A> CalendarListWatchCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4920,7 +5079,7 @@ impl<'a, C, NC, A> CalendarListWatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *show hidden* query property to the given value. /// /// - /// Whether to show hidden entries. Optional. The default is False. + /// Whether to show hidden entries. Optional. The default is False. pub fn show_hidden(mut self, new_value: bool) -> CalendarListWatchCall<'a, C, NC, A> { self._show_hidden = Some(new_value); self @@ -4928,7 +5087,7 @@ impl<'a, C, NC, A> CalendarListWatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *show deleted* query property to the given value. /// /// - /// Whether to include deleted calendar list entries in the result. Optional. The default is False. + /// Whether to include deleted calendar list entries in the result. Optional. The default is False. pub fn show_deleted(mut self, new_value: bool) -> CalendarListWatchCall<'a, C, NC, A> { self._show_deleted = Some(new_value); self @@ -4936,7 +5095,7 @@ impl<'a, C, NC, A> CalendarListWatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *page token* query property to the given value. /// /// - /// Token specifying which result page to return. Optional. + /// Token specifying which result page to return. Optional. pub fn page_token(mut self, new_value: &str) -> CalendarListWatchCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -4944,7 +5103,7 @@ impl<'a, C, NC, A> CalendarListWatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *min access role* query property to the given value. /// /// - /// The minimum access role for the user in the returned entires. Optional. The default is no restriction. + /// The minimum access role for the user in the returned entires. Optional. The default is no restriction. pub fn min_access_role(mut self, new_value: &str) -> CalendarListWatchCall<'a, C, NC, A> { self._min_access_role = Some(new_value.to_string()); self @@ -4952,7 +5111,7 @@ impl<'a, C, NC, A> CalendarListWatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. + /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. pub fn max_results(mut self, new_value: i32) -> CalendarListWatchCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -5013,7 +5172,7 @@ impl<'a, C, NC, A> CalendarListWatchCall<'a, C, NC, A> where NC: hyper::net::Net /// Updates metadata for a calendar. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *calendar* resource. -/// It is not used directly, but through a `CalendarMethods`. +/// It is not used directly, but through a `CalendarMethods` instance. /// /// # Example /// @@ -5078,7 +5237,7 @@ impl<'a, C, NC, A> CalendarPatchCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "calendarId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5135,7 +5294,7 @@ impl<'a, C, NC, A> CalendarPatchCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5151,7 +5310,6 @@ impl<'a, C, NC, A> CalendarPatchCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -5161,7 +5319,7 @@ impl<'a, C, NC, A> CalendarPatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5172,7 +5330,7 @@ impl<'a, C, NC, A> CalendarPatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5181,13 +5339,13 @@ impl<'a, C, NC, A> CalendarPatchCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5208,7 +5366,7 @@ impl<'a, C, NC, A> CalendarPatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarPatchCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -5269,7 +5427,7 @@ impl<'a, C, NC, A> CalendarPatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars. /// /// A builder for the *delete* method supported by a *calendar* resource. -/// It is not used directly, but through a `CalendarMethods`. +/// It is not used directly, but through a `CalendarMethods` instance. /// /// # Example /// @@ -5327,7 +5485,7 @@ impl<'a, C, NC, A> CalendarDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["calendarId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5379,7 +5537,7 @@ impl<'a, C, NC, A> CalendarDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5391,7 +5549,6 @@ impl<'a, C, NC, A> CalendarDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -5401,7 +5558,7 @@ impl<'a, C, NC, A> CalendarDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5412,12 +5569,12 @@ impl<'a, C, NC, A> CalendarDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5429,7 +5586,7 @@ impl<'a, C, NC, A> CalendarDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarDeleteCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -5490,7 +5647,7 @@ impl<'a, C, NC, A> CalendarDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Returns metadata for a calendar. /// /// A builder for the *get* method supported by a *calendar* resource. -/// It is not used directly, but through a `CalendarMethods`. +/// It is not used directly, but through a `CalendarMethods` instance. /// /// # Example /// @@ -5548,7 +5705,7 @@ impl<'a, C, NC, A> CalendarGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "calendarId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5601,7 +5758,7 @@ impl<'a, C, NC, A> CalendarGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5613,7 +5770,6 @@ impl<'a, C, NC, A> CalendarGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -5623,7 +5779,7 @@ impl<'a, C, NC, A> CalendarGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5634,7 +5790,7 @@ impl<'a, C, NC, A> CalendarGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5643,13 +5799,13 @@ impl<'a, C, NC, A> CalendarGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5661,7 +5817,7 @@ impl<'a, C, NC, A> CalendarGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarGetCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -5722,7 +5878,7 @@ impl<'a, C, NC, A> CalendarGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account. /// /// A builder for the *clear* method supported by a *calendar* resource. -/// It is not used directly, but through a `CalendarMethods`. +/// It is not used directly, but through a `CalendarMethods` instance. /// /// # Example /// @@ -5780,7 +5936,7 @@ impl<'a, C, NC, A> CalendarClearCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["calendarId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5832,7 +5988,7 @@ impl<'a, C, NC, A> CalendarClearCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5844,7 +6000,6 @@ impl<'a, C, NC, A> CalendarClearCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -5854,7 +6009,7 @@ impl<'a, C, NC, A> CalendarClearCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5865,12 +6020,12 @@ impl<'a, C, NC, A> CalendarClearCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5882,7 +6037,7 @@ impl<'a, C, NC, A> CalendarClearCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarClearCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -5943,7 +6098,7 @@ impl<'a, C, NC, A> CalendarClearCall<'a, C, NC, A> where NC: hyper::net::Network /// Creates a secondary calendar. /// /// A builder for the *insert* method supported by a *calendar* resource. -/// It is not used directly, but through a `CalendarMethods`. +/// It is not used directly, but through a `CalendarMethods` instance. /// /// # Example /// @@ -6006,7 +6161,7 @@ impl<'a, C, NC, A> CalendarInsertCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6039,7 +6194,7 @@ impl<'a, C, NC, A> CalendarInsertCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6055,7 +6210,6 @@ impl<'a, C, NC, A> CalendarInsertCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -6065,7 +6219,7 @@ impl<'a, C, NC, A> CalendarInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6076,7 +6230,7 @@ impl<'a, C, NC, A> CalendarInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6085,13 +6239,13 @@ impl<'a, C, NC, A> CalendarInsertCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6163,7 +6317,7 @@ impl<'a, C, NC, A> CalendarInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Updates metadata for a calendar. /// /// A builder for the *update* method supported by a *calendar* resource. -/// It is not used directly, but through a `CalendarMethods`. +/// It is not used directly, but through a `CalendarMethods` instance. /// /// # Example /// @@ -6228,7 +6382,7 @@ impl<'a, C, NC, A> CalendarUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "calendarId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6285,7 +6439,7 @@ impl<'a, C, NC, A> CalendarUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6301,7 +6455,6 @@ impl<'a, C, NC, A> CalendarUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -6311,7 +6464,7 @@ impl<'a, C, NC, A> CalendarUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6322,7 +6475,7 @@ impl<'a, C, NC, A> CalendarUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6331,13 +6484,13 @@ impl<'a, C, NC, A> CalendarUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6358,7 +6511,7 @@ impl<'a, C, NC, A> CalendarUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> CalendarUpdateCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -6419,7 +6572,7 @@ impl<'a, C, NC, A> CalendarUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Watch for changes to ACL resources. /// /// A builder for the *watch* method supported by a *acl* resource. -/// It is not used directly, but through a `AclMethods`. +/// It is not used directly, but through a `AclMethods` instance. /// /// # Example /// @@ -6504,7 +6657,7 @@ impl<'a, C, NC, A> AclWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "calendarId", "syncToken", "showDeleted", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6561,7 +6714,7 @@ impl<'a, C, NC, A> AclWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6577,7 +6730,6 @@ impl<'a, C, NC, A> AclWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -6587,7 +6739,7 @@ impl<'a, C, NC, A> AclWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6598,7 +6750,7 @@ impl<'a, C, NC, A> AclWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6607,13 +6759,13 @@ impl<'a, C, NC, A> AclWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6634,7 +6786,7 @@ impl<'a, C, NC, A> AclWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> AclWatchCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -6653,7 +6805,7 @@ impl<'a, C, NC, A> AclWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *show deleted* query property to the given value. /// /// - /// Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none". Deleted ACLs will always be included if syncToken is provided. Optional. The default is False. + /// Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none". Deleted ACLs will always be included if syncToken is provided. Optional. The default is False. pub fn show_deleted(mut self, new_value: bool) -> AclWatchCall<'a, C, NC, A> { self._show_deleted = Some(new_value); self @@ -6661,7 +6813,7 @@ impl<'a, C, NC, A> AclWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *page token* query property to the given value. /// /// - /// Token specifying which result page to return. Optional. + /// Token specifying which result page to return. Optional. pub fn page_token(mut self, new_value: &str) -> AclWatchCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -6669,7 +6821,7 @@ impl<'a, C, NC, A> AclWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. + /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. pub fn max_results(mut self, new_value: i32) -> AclWatchCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -6730,7 +6882,7 @@ impl<'a, C, NC, A> AclWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Creates an access control rule. /// /// A builder for the *insert* method supported by a *acl* resource. -/// It is not used directly, but through a `AclMethods`. +/// It is not used directly, but through a `AclMethods` instance. /// /// # Example /// @@ -6795,7 +6947,7 @@ impl<'a, C, NC, A> AclInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "calendarId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6852,7 +7004,7 @@ impl<'a, C, NC, A> AclInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6868,7 +7020,6 @@ impl<'a, C, NC, A> AclInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -6878,7 +7029,7 @@ impl<'a, C, NC, A> AclInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6889,7 +7040,7 @@ impl<'a, C, NC, A> AclInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6898,13 +7049,13 @@ impl<'a, C, NC, A> AclInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6925,7 +7076,7 @@ impl<'a, C, NC, A> AclInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> AclInsertCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -6986,7 +7137,7 @@ impl<'a, C, NC, A> AclInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Updates an access control rule. /// /// A builder for the *update* method supported by a *acl* resource. -/// It is not used directly, but through a `AclMethods`. +/// It is not used directly, but through a `AclMethods` instance. /// /// # Example /// @@ -7053,7 +7204,7 @@ impl<'a, C, NC, A> AclUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "calendarId", "ruleId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7110,7 +7261,7 @@ impl<'a, C, NC, A> AclUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7126,7 +7277,6 @@ impl<'a, C, NC, A> AclUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -7136,7 +7286,7 @@ impl<'a, C, NC, A> AclUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7147,7 +7297,7 @@ impl<'a, C, NC, A> AclUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7156,13 +7306,13 @@ impl<'a, C, NC, A> AclUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7183,7 +7333,7 @@ impl<'a, C, NC, A> AclUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> AclUpdateCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -7193,7 +7343,7 @@ impl<'a, C, NC, A> AclUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ACL rule identifier. + /// ACL rule identifier. pub fn rule_id(mut self, new_value: &str) -> AclUpdateCall<'a, C, NC, A> { self._rule_id = new_value.to_string(); self @@ -7254,7 +7404,7 @@ impl<'a, C, NC, A> AclUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Updates an access control rule. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *acl* resource. -/// It is not used directly, but through a `AclMethods`. +/// It is not used directly, but through a `AclMethods` instance. /// /// # Example /// @@ -7321,7 +7471,7 @@ impl<'a, C, NC, A> AclPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "calendarId", "ruleId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7378,7 +7528,7 @@ impl<'a, C, NC, A> AclPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7394,7 +7544,6 @@ impl<'a, C, NC, A> AclPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -7404,7 +7553,7 @@ impl<'a, C, NC, A> AclPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7415,7 +7564,7 @@ impl<'a, C, NC, A> AclPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7424,13 +7573,13 @@ impl<'a, C, NC, A> AclPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7451,7 +7600,7 @@ impl<'a, C, NC, A> AclPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> AclPatchCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -7461,7 +7610,7 @@ impl<'a, C, NC, A> AclPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ACL rule identifier. + /// ACL rule identifier. pub fn rule_id(mut self, new_value: &str) -> AclPatchCall<'a, C, NC, A> { self._rule_id = new_value.to_string(); self @@ -7522,7 +7671,7 @@ impl<'a, C, NC, A> AclPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Returns the rules in the access control list for the calendar. /// /// A builder for the *list* method supported by a *acl* resource. -/// It is not used directly, but through a `AclMethods`. +/// It is not used directly, but through a `AclMethods` instance. /// /// # Example /// @@ -7600,7 +7749,7 @@ impl<'a, C, NC, A> AclListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "calendarId", "syncToken", "showDeleted", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7653,7 +7802,7 @@ impl<'a, C, NC, A> AclListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7665,7 +7814,6 @@ impl<'a, C, NC, A> AclListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -7675,7 +7823,7 @@ impl<'a, C, NC, A> AclListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7686,7 +7834,7 @@ impl<'a, C, NC, A> AclListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7695,13 +7843,13 @@ impl<'a, C, NC, A> AclListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7713,7 +7861,7 @@ impl<'a, C, NC, A> AclListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> AclListCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -7732,7 +7880,7 @@ impl<'a, C, NC, A> AclListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *show deleted* query property to the given value. /// /// - /// Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none". Deleted ACLs will always be included if syncToken is provided. Optional. The default is False. + /// Whether to include deleted ACLs in the result. Deleted ACLs are represented by role equal to "none". Deleted ACLs will always be included if syncToken is provided. Optional. The default is False. pub fn show_deleted(mut self, new_value: bool) -> AclListCall<'a, C, NC, A> { self._show_deleted = Some(new_value); self @@ -7740,7 +7888,7 @@ impl<'a, C, NC, A> AclListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *page token* query property to the given value. /// /// - /// Token specifying which result page to return. Optional. + /// Token specifying which result page to return. Optional. pub fn page_token(mut self, new_value: &str) -> AclListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -7748,7 +7896,7 @@ impl<'a, C, NC, A> AclListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. + /// Maximum number of entries returned on one result page. By default the value is 100 entries. The page size can never be larger than 250 entries. Optional. pub fn max_results(mut self, new_value: i32) -> AclListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -7809,7 +7957,7 @@ impl<'a, C, NC, A> AclListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Deletes an access control rule. /// /// A builder for the *delete* method supported by a *acl* resource. -/// It is not used directly, but through a `AclMethods`. +/// It is not used directly, but through a `AclMethods` instance. /// /// # Example /// @@ -7869,7 +8017,7 @@ impl<'a, C, NC, A> AclDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["calendarId", "ruleId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7921,7 +8069,7 @@ impl<'a, C, NC, A> AclDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7933,7 +8081,6 @@ impl<'a, C, NC, A> AclDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -7943,7 +8090,7 @@ impl<'a, C, NC, A> AclDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7954,12 +8101,12 @@ impl<'a, C, NC, A> AclDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7971,7 +8118,7 @@ impl<'a, C, NC, A> AclDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> AclDeleteCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -7981,7 +8128,7 @@ impl<'a, C, NC, A> AclDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ACL rule identifier. + /// ACL rule identifier. pub fn rule_id(mut self, new_value: &str) -> AclDeleteCall<'a, C, NC, A> { self._rule_id = new_value.to_string(); self @@ -8042,7 +8189,7 @@ impl<'a, C, NC, A> AclDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Returns an access control rule. /// /// A builder for the *get* method supported by a *acl* resource. -/// It is not used directly, but through a `AclMethods`. +/// It is not used directly, but through a `AclMethods` instance. /// /// # Example /// @@ -8102,7 +8249,7 @@ impl<'a, C, NC, A> AclGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect for &field in ["alt", "calendarId", "ruleId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8155,7 +8302,7 @@ impl<'a, C, NC, A> AclGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8167,7 +8314,6 @@ impl<'a, C, NC, A> AclGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect dlg.pre_request(); req.send() - }; match req_result { @@ -8177,7 +8323,7 @@ impl<'a, C, NC, A> AclGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8188,7 +8334,7 @@ impl<'a, C, NC, A> AclGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8197,13 +8343,13 @@ impl<'a, C, NC, A> AclGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8215,7 +8361,7 @@ impl<'a, C, NC, A> AclGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> AclGetCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -8225,7 +8371,7 @@ impl<'a, C, NC, A> AclGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ACL rule identifier. + /// ACL rule identifier. pub fn rule_id(mut self, new_value: &str) -> AclGetCall<'a, C, NC, A> { self._rule_id = new_value.to_string(); self @@ -8286,7 +8432,7 @@ impl<'a, C, NC, A> AclGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Stop watching resources through this channel /// /// A builder for the *stop* method supported by a *channel* resource. -/// It is not used directly, but through a `ChannelMethods`. +/// It is not used directly, but through a `ChannelMethods` instance. /// /// # Example /// @@ -8349,7 +8495,7 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in [].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8381,7 +8527,7 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8397,7 +8543,6 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -8407,7 +8552,7 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8418,12 +8563,12 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8495,7 +8640,7 @@ impl<'a, C, NC, A> ChannelStopCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Returns the color definitions for calendars and events. /// /// A builder for the *get* method supported by a *color* resource. -/// It is not used directly, but through a `ColorMethods`. +/// It is not used directly, but through a `ColorMethods` instance. /// /// # Example /// @@ -8551,7 +8696,7 @@ impl<'a, C, NC, A> ColorGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8580,7 +8725,7 @@ impl<'a, C, NC, A> ColorGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8592,7 +8737,6 @@ impl<'a, C, NC, A> ColorGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -8602,7 +8746,7 @@ impl<'a, C, NC, A> ColorGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8613,7 +8757,7 @@ impl<'a, C, NC, A> ColorGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8622,13 +8766,13 @@ impl<'a, C, NC, A> ColorGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8691,7 +8835,7 @@ impl<'a, C, NC, A> ColorGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Deletes an event. /// /// A builder for the *delete* method supported by a *event* resource. -/// It is not used directly, but through a `EventMethods`. +/// It is not used directly, but through a `EventMethods` instance. /// /// # Example /// @@ -8756,7 +8900,7 @@ impl<'a, C, NC, A> EventDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["calendarId", "eventId", "sendNotifications"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8808,7 +8952,7 @@ impl<'a, C, NC, A> EventDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8820,7 +8964,6 @@ impl<'a, C, NC, A> EventDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -8830,7 +8973,7 @@ impl<'a, C, NC, A> EventDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8841,12 +8984,12 @@ impl<'a, C, NC, A> EventDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8858,7 +9001,7 @@ impl<'a, C, NC, A> EventDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventDeleteCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -8868,7 +9011,7 @@ impl<'a, C, NC, A> EventDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Event identifier. + /// Event identifier. pub fn event_id(mut self, new_value: &str) -> EventDeleteCall<'a, C, NC, A> { self._event_id = new_value.to_string(); self @@ -8876,7 +9019,7 @@ impl<'a, C, NC, A> EventDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *send notifications* query property to the given value. /// /// - /// Whether to send notifications about the deletion of the event. Optional. The default is False. + /// Whether to send notifications about the deletion of the event. Optional. The default is False. pub fn send_notifications(mut self, new_value: bool) -> EventDeleteCall<'a, C, NC, A> { self._send_notifications = Some(new_value); self @@ -8937,7 +9080,7 @@ impl<'a, C, NC, A> EventDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Creates an event. /// /// A builder for the *insert* method supported by a *event* resource. -/// It is not used directly, but through a `EventMethods`. +/// It is not used directly, but through a `EventMethods` instance. /// /// # Example /// @@ -9012,7 +9155,7 @@ impl<'a, C, NC, A> EventInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "calendarId", "sendNotifications", "maxAttendees"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9069,7 +9212,7 @@ impl<'a, C, NC, A> EventInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9085,7 +9228,6 @@ impl<'a, C, NC, A> EventInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -9095,7 +9237,7 @@ impl<'a, C, NC, A> EventInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9106,7 +9248,7 @@ impl<'a, C, NC, A> EventInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9115,13 +9257,13 @@ impl<'a, C, NC, A> EventInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9142,7 +9284,7 @@ impl<'a, C, NC, A> EventInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventInsertCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -9150,7 +9292,7 @@ impl<'a, C, NC, A> EventInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *send notifications* query property to the given value. /// /// - /// Whether to send notifications about the creation of the new event. Optional. The default is False. + /// Whether to send notifications about the creation of the new event. Optional. The default is False. pub fn send_notifications(mut self, new_value: bool) -> EventInsertCall<'a, C, NC, A> { self._send_notifications = Some(new_value); self @@ -9158,7 +9300,7 @@ impl<'a, C, NC, A> EventInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *max attendees* query property to the given value. /// /// - /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. + /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. pub fn max_attendees(mut self, new_value: i32) -> EventInsertCall<'a, C, NC, A> { self._max_attendees = Some(new_value); self @@ -9219,7 +9361,7 @@ impl<'a, C, NC, A> EventInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Imports an event. This operation is used to add a private copy of an existing event to a calendar. /// /// A builder for the *import* method supported by a *event* resource. -/// It is not used directly, but through a `EventMethods`. +/// It is not used directly, but through a `EventMethods` instance. /// /// # Example /// @@ -9284,7 +9426,7 @@ impl<'a, C, NC, A> EventImportCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "calendarId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9341,7 +9483,7 @@ impl<'a, C, NC, A> EventImportCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9357,7 +9499,6 @@ impl<'a, C, NC, A> EventImportCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -9367,7 +9508,7 @@ impl<'a, C, NC, A> EventImportCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9378,7 +9519,7 @@ impl<'a, C, NC, A> EventImportCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9387,13 +9528,13 @@ impl<'a, C, NC, A> EventImportCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9414,7 +9555,7 @@ impl<'a, C, NC, A> EventImportCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventImportCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -9475,7 +9616,7 @@ impl<'a, C, NC, A> EventImportCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Returns instances of the specified recurring event. /// /// A builder for the *instances* method supported by a *event* resource. -/// It is not used directly, but through a `EventMethods`. +/// It is not used directly, but through a `EventMethods` instance. /// /// # Example /// @@ -9580,7 +9721,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "calendarId", "eventId", "timeZone", "timeMin", "timeMax", "showDeleted", "pageToken", "originalStart", "maxResults", "maxAttendees", "alwaysIncludeEmail"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9633,7 +9774,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9645,7 +9786,6 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -9655,7 +9795,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9666,7 +9806,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9675,13 +9815,13 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9693,7 +9833,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventInstanceCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -9703,7 +9843,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Recurring event identifier. + /// Recurring event identifier. pub fn event_id(mut self, new_value: &str) -> EventInstanceCall<'a, C, NC, A> { self._event_id = new_value.to_string(); self @@ -9711,7 +9851,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *time zone* query property to the given value. /// /// - /// Time zone used in the response. Optional. The default is the time zone of the calendar. + /// Time zone used in the response. Optional. The default is the time zone of the calendar. pub fn time_zone(mut self, new_value: &str) -> EventInstanceCall<'a, C, NC, A> { self._time_zone = Some(new_value.to_string()); self @@ -9719,7 +9859,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *time min* query property to the given value. /// /// - /// Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. + /// Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. pub fn time_min(mut self, new_value: &str) -> EventInstanceCall<'a, C, NC, A> { self._time_min = Some(new_value.to_string()); self @@ -9727,7 +9867,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *time max* query property to the given value. /// /// - /// Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. + /// Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. pub fn time_max(mut self, new_value: &str) -> EventInstanceCall<'a, C, NC, A> { self._time_max = Some(new_value.to_string()); self @@ -9735,7 +9875,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *show deleted* query property to the given value. /// /// - /// Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events will still be included if singleEvents is False. Optional. The default is False. + /// Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events will still be included if singleEvents is False. Optional. The default is False. pub fn show_deleted(mut self, new_value: bool) -> EventInstanceCall<'a, C, NC, A> { self._show_deleted = Some(new_value); self @@ -9743,7 +9883,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *page token* query property to the given value. /// /// - /// Token specifying which result page to return. Optional. + /// Token specifying which result page to return. Optional. pub fn page_token(mut self, new_value: &str) -> EventInstanceCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -9751,7 +9891,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *original start* query property to the given value. /// /// - /// The original start time of the instance in the result. Optional. + /// The original start time of the instance in the result. Optional. pub fn original_start(mut self, new_value: &str) -> EventInstanceCall<'a, C, NC, A> { self._original_start = Some(new_value.to_string()); self @@ -9759,7 +9899,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of events returned on one result page. By default the value is 250 events. The page size can never be larger than 2500 events. Optional. + /// Maximum number of events returned on one result page. By default the value is 250 events. The page size can never be larger than 2500 events. Optional. pub fn max_results(mut self, new_value: i32) -> EventInstanceCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -9767,7 +9907,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *max attendees* query property to the given value. /// /// - /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. + /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. pub fn max_attendees(mut self, new_value: i32) -> EventInstanceCall<'a, C, NC, A> { self._max_attendees = Some(new_value); self @@ -9775,7 +9915,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *always include email* query property to the given value. /// /// - /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. + /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. pub fn always_include_email(mut self, new_value: bool) -> EventInstanceCall<'a, C, NC, A> { self._always_include_email = Some(new_value); self @@ -9836,7 +9976,7 @@ impl<'a, C, NC, A> EventInstanceCall<'a, C, NC, A> where NC: hyper::net::Network /// Returns an event. /// /// A builder for the *get* method supported by a *event* resource. -/// It is not used directly, but through a `EventMethods`. +/// It is not used directly, but through a `EventMethods` instance. /// /// # Example /// @@ -9911,7 +10051,7 @@ impl<'a, C, NC, A> EventGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "calendarId", "eventId", "timeZone", "maxAttendees", "alwaysIncludeEmail"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9964,7 +10104,7 @@ impl<'a, C, NC, A> EventGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9976,7 +10116,6 @@ impl<'a, C, NC, A> EventGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -9986,7 +10125,7 @@ impl<'a, C, NC, A> EventGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9997,7 +10136,7 @@ impl<'a, C, NC, A> EventGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10006,13 +10145,13 @@ impl<'a, C, NC, A> EventGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10024,7 +10163,7 @@ impl<'a, C, NC, A> EventGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventGetCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -10034,7 +10173,7 @@ impl<'a, C, NC, A> EventGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Event identifier. + /// Event identifier. pub fn event_id(mut self, new_value: &str) -> EventGetCall<'a, C, NC, A> { self._event_id = new_value.to_string(); self @@ -10042,7 +10181,7 @@ impl<'a, C, NC, A> EventGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *time zone* query property to the given value. /// /// - /// Time zone used in the response. Optional. The default is the time zone of the calendar. + /// Time zone used in the response. Optional. The default is the time zone of the calendar. pub fn time_zone(mut self, new_value: &str) -> EventGetCall<'a, C, NC, A> { self._time_zone = Some(new_value.to_string()); self @@ -10050,7 +10189,7 @@ impl<'a, C, NC, A> EventGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *max attendees* query property to the given value. /// /// - /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. + /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. pub fn max_attendees(mut self, new_value: i32) -> EventGetCall<'a, C, NC, A> { self._max_attendees = Some(new_value); self @@ -10058,7 +10197,7 @@ impl<'a, C, NC, A> EventGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *always include email* query property to the given value. /// /// - /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. + /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. pub fn always_include_email(mut self, new_value: bool) -> EventGetCall<'a, C, NC, A> { self._always_include_email = Some(new_value); self @@ -10119,7 +10258,7 @@ impl<'a, C, NC, A> EventGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Returns events on the specified calendar. /// /// A builder for the *list* method supported by a *event* resource. -/// It is not used directly, but through a `EventMethods`. +/// It is not used directly, but through a `EventMethods` instance. /// /// # Example /// @@ -10270,7 +10409,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "calendarId", "updatedMin", "timeZone", "timeMin", "timeMax", "syncToken", "singleEvents", "showHiddenInvitations", "showDeleted", "sharedExtendedProperty", "q", "privateExtendedProperty", "pageToken", "orderBy", "maxResults", "maxAttendees", "iCalUID", "alwaysIncludeEmail"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10323,7 +10462,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10335,7 +10474,6 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -10345,7 +10483,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10356,7 +10494,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10365,13 +10503,13 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10383,7 +10521,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventListCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -10391,7 +10529,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *updated min* query property to the given value. /// /// - /// Lower bound for an event's last modification time (as a RFC 3339 timestamp) to filter by. When specified, entries deleted since this time will always be included regardless of showDeleted. Optional. The default is not to filter by last modification time. + /// Lower bound for an event's last modification time (as a RFC 3339 timestamp) to filter by. When specified, entries deleted since this time will always be included regardless of showDeleted. Optional. The default is not to filter by last modification time. pub fn updated_min(mut self, new_value: &str) -> EventListCall<'a, C, NC, A> { self._updated_min = Some(new_value.to_string()); self @@ -10399,7 +10537,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *time zone* query property to the given value. /// /// - /// Time zone used in the response. Optional. The default is the time zone of the calendar. + /// Time zone used in the response. Optional. The default is the time zone of the calendar. pub fn time_zone(mut self, new_value: &str) -> EventListCall<'a, C, NC, A> { self._time_zone = Some(new_value.to_string()); self @@ -10407,7 +10545,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *time min* query property to the given value. /// /// - /// Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. + /// Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. pub fn time_min(mut self, new_value: &str) -> EventListCall<'a, C, NC, A> { self._time_min = Some(new_value.to_string()); self @@ -10415,7 +10553,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *time max* query property to the given value. /// /// - /// Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. + /// Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. pub fn time_max(mut self, new_value: &str) -> EventListCall<'a, C, NC, A> { self._time_max = Some(new_value.to_string()); self @@ -10444,7 +10582,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *single events* query property to the given value. /// /// - /// Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False. + /// Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False. pub fn single_events(mut self, new_value: bool) -> EventListCall<'a, C, NC, A> { self._single_events = Some(new_value); self @@ -10452,7 +10590,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *show hidden invitations* query property to the given value. /// /// - /// Whether to include hidden invitations in the result. Optional. The default is False. + /// Whether to include hidden invitations in the result. Optional. The default is False. pub fn show_hidden_invitations(mut self, new_value: bool) -> EventListCall<'a, C, NC, A> { self._show_hidden_invitations = Some(new_value); self @@ -10460,7 +10598,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *show deleted* query property to the given value. /// /// - /// Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False. + /// Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False. pub fn show_deleted(mut self, new_value: bool) -> EventListCall<'a, C, NC, A> { self._show_deleted = Some(new_value); self @@ -10469,7 +10607,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints. + /// Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints. pub fn add_shared_extended_property(mut self, new_value: &str) -> EventListCall<'a, C, NC, A> { self._shared_extended_property.push(new_value.to_string()); self @@ -10477,7 +10615,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *q* query property to the given value. /// /// - /// Free text search terms to find events that match these terms in any field, except for extended properties. Optional. + /// Free text search terms to find events that match these terms in any field, except for extended properties. Optional. pub fn q(mut self, new_value: &str) -> EventListCall<'a, C, NC, A> { self._q = Some(new_value.to_string()); self @@ -10486,7 +10624,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints. + /// Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints. pub fn add_private_extended_property(mut self, new_value: &str) -> EventListCall<'a, C, NC, A> { self._private_extended_property.push(new_value.to_string()); self @@ -10494,7 +10632,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *page token* query property to the given value. /// /// - /// Token specifying which result page to return. Optional. + /// Token specifying which result page to return. Optional. pub fn page_token(mut self, new_value: &str) -> EventListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -10502,7 +10640,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *order by* query property to the given value. /// /// - /// The order of the events returned in the result. Optional. The default is an unspecified, stable order. + /// The order of the events returned in the result. Optional. The default is an unspecified, stable order. pub fn order_by(mut self, new_value: &str) -> EventListCall<'a, C, NC, A> { self._order_by = Some(new_value.to_string()); self @@ -10510,7 +10648,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of events returned on one result page. By default the value is 250 events. The page size can never be larger than 2500 events. Optional. + /// Maximum number of events returned on one result page. By default the value is 250 events. The page size can never be larger than 2500 events. Optional. pub fn max_results(mut self, new_value: i32) -> EventListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -10518,7 +10656,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *max attendees* query property to the given value. /// /// - /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. + /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. pub fn max_attendees(mut self, new_value: i32) -> EventListCall<'a, C, NC, A> { self._max_attendees = Some(new_value); self @@ -10526,7 +10664,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *i cal uid* query property to the given value. /// /// - /// Specifies event ID in the iCalendar format to be included in the response. Optional. + /// Specifies event ID in the iCalendar format to be included in the response. Optional. pub fn i_cal_uid(mut self, new_value: &str) -> EventListCall<'a, C, NC, A> { self._i_cal_uid = Some(new_value.to_string()); self @@ -10534,7 +10672,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *always include email* query property to the given value. /// /// - /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. + /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. pub fn always_include_email(mut self, new_value: bool) -> EventListCall<'a, C, NC, A> { self._always_include_email = Some(new_value); self @@ -10595,7 +10733,7 @@ impl<'a, C, NC, A> EventListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Updates an event. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *event* resource. -/// It is not used directly, but through a `EventMethods`. +/// It is not used directly, but through a `EventMethods` instance. /// /// # Example /// @@ -10677,7 +10815,7 @@ impl<'a, C, NC, A> EventPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "calendarId", "eventId", "sendNotifications", "maxAttendees", "alwaysIncludeEmail"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10734,7 +10872,7 @@ impl<'a, C, NC, A> EventPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10750,7 +10888,6 @@ impl<'a, C, NC, A> EventPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -10760,7 +10897,7 @@ impl<'a, C, NC, A> EventPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10771,7 +10908,7 @@ impl<'a, C, NC, A> EventPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10780,13 +10917,13 @@ impl<'a, C, NC, A> EventPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10807,7 +10944,7 @@ impl<'a, C, NC, A> EventPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventPatchCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -10817,7 +10954,7 @@ impl<'a, C, NC, A> EventPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Event identifier. + /// Event identifier. pub fn event_id(mut self, new_value: &str) -> EventPatchCall<'a, C, NC, A> { self._event_id = new_value.to_string(); self @@ -10825,7 +10962,7 @@ impl<'a, C, NC, A> EventPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *send notifications* query property to the given value. /// /// - /// Whether to send notifications about the event update (e.g. attendee's responses, title changes, etc.). Optional. The default is False. + /// Whether to send notifications about the event update (e.g. attendee's responses, title changes, etc.). Optional. The default is False. pub fn send_notifications(mut self, new_value: bool) -> EventPatchCall<'a, C, NC, A> { self._send_notifications = Some(new_value); self @@ -10833,7 +10970,7 @@ impl<'a, C, NC, A> EventPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *max attendees* query property to the given value. /// /// - /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. + /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. pub fn max_attendees(mut self, new_value: i32) -> EventPatchCall<'a, C, NC, A> { self._max_attendees = Some(new_value); self @@ -10841,7 +10978,7 @@ impl<'a, C, NC, A> EventPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *always include email* query property to the given value. /// /// - /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. + /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. pub fn always_include_email(mut self, new_value: bool) -> EventPatchCall<'a, C, NC, A> { self._always_include_email = Some(new_value); self @@ -10902,7 +11039,7 @@ impl<'a, C, NC, A> EventPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Moves an event to another calendar, i.e. changes an event's organizer. /// /// A builder for the *move* method supported by a *event* resource. -/// It is not used directly, but through a `EventMethods`. +/// It is not used directly, but through a `EventMethods` instance. /// /// # Example /// @@ -10969,7 +11106,7 @@ impl<'a, C, NC, A> EventMoveCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "calendarId", "eventId", "destination", "sendNotifications"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11022,7 +11159,7 @@ impl<'a, C, NC, A> EventMoveCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11034,7 +11171,6 @@ impl<'a, C, NC, A> EventMoveCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -11044,7 +11180,7 @@ impl<'a, C, NC, A> EventMoveCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11055,7 +11191,7 @@ impl<'a, C, NC, A> EventMoveCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11064,13 +11200,13 @@ impl<'a, C, NC, A> EventMoveCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11082,7 +11218,7 @@ impl<'a, C, NC, A> EventMoveCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier of the source calendar where the event currently is on. + /// Calendar identifier of the source calendar where the event currently is on. pub fn calendar_id(mut self, new_value: &str) -> EventMoveCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -11092,7 +11228,7 @@ impl<'a, C, NC, A> EventMoveCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Event identifier. + /// Event identifier. pub fn event_id(mut self, new_value: &str) -> EventMoveCall<'a, C, NC, A> { self._event_id = new_value.to_string(); self @@ -11102,7 +11238,7 @@ impl<'a, C, NC, A> EventMoveCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier of the target calendar where the event is to be moved to. + /// Calendar identifier of the target calendar where the event is to be moved to. pub fn destination(mut self, new_value: &str) -> EventMoveCall<'a, C, NC, A> { self._destination = new_value.to_string(); self @@ -11110,7 +11246,7 @@ impl<'a, C, NC, A> EventMoveCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *send notifications* query property to the given value. /// /// - /// Whether to send notifications about the change of the event's organizer. Optional. The default is False. + /// Whether to send notifications about the change of the event's organizer. Optional. The default is False. pub fn send_notifications(mut self, new_value: bool) -> EventMoveCall<'a, C, NC, A> { self._send_notifications = Some(new_value); self @@ -11171,7 +11307,7 @@ impl<'a, C, NC, A> EventMoveCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Updates an event. /// /// A builder for the *update* method supported by a *event* resource. -/// It is not used directly, but through a `EventMethods`. +/// It is not used directly, but through a `EventMethods` instance. /// /// # Example /// @@ -11253,7 +11389,7 @@ impl<'a, C, NC, A> EventUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "calendarId", "eventId", "sendNotifications", "maxAttendees", "alwaysIncludeEmail"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11310,7 +11446,7 @@ impl<'a, C, NC, A> EventUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11326,7 +11462,6 @@ impl<'a, C, NC, A> EventUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -11336,7 +11471,7 @@ impl<'a, C, NC, A> EventUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11347,7 +11482,7 @@ impl<'a, C, NC, A> EventUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11356,13 +11491,13 @@ impl<'a, C, NC, A> EventUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11383,7 +11518,7 @@ impl<'a, C, NC, A> EventUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventUpdateCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -11393,7 +11528,7 @@ impl<'a, C, NC, A> EventUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Event identifier. + /// Event identifier. pub fn event_id(mut self, new_value: &str) -> EventUpdateCall<'a, C, NC, A> { self._event_id = new_value.to_string(); self @@ -11401,7 +11536,7 @@ impl<'a, C, NC, A> EventUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *send notifications* query property to the given value. /// /// - /// Whether to send notifications about the event update (e.g. attendee's responses, title changes, etc.). Optional. The default is False. + /// Whether to send notifications about the event update (e.g. attendee's responses, title changes, etc.). Optional. The default is False. pub fn send_notifications(mut self, new_value: bool) -> EventUpdateCall<'a, C, NC, A> { self._send_notifications = Some(new_value); self @@ -11409,7 +11544,7 @@ impl<'a, C, NC, A> EventUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *max attendees* query property to the given value. /// /// - /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. + /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. pub fn max_attendees(mut self, new_value: i32) -> EventUpdateCall<'a, C, NC, A> { self._max_attendees = Some(new_value); self @@ -11417,7 +11552,7 @@ impl<'a, C, NC, A> EventUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *always include email* query property to the given value. /// /// - /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. + /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. pub fn always_include_email(mut self, new_value: bool) -> EventUpdateCall<'a, C, NC, A> { self._always_include_email = Some(new_value); self @@ -11478,7 +11613,7 @@ impl<'a, C, NC, A> EventUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Watch for changes to Events resources. /// /// A builder for the *watch* method supported by a *event* resource. -/// It is not used directly, but through a `EventMethods`. +/// It is not used directly, but through a `EventMethods` instance. /// /// # Example /// @@ -11636,7 +11771,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "calendarId", "updatedMin", "timeZone", "timeMin", "timeMax", "syncToken", "singleEvents", "showHiddenInvitations", "showDeleted", "sharedExtendedProperty", "q", "privateExtendedProperty", "pageToken", "orderBy", "maxResults", "maxAttendees", "iCalUID", "alwaysIncludeEmail"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11693,7 +11828,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11709,7 +11844,6 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -11719,7 +11853,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11730,7 +11864,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11739,13 +11873,13 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11766,7 +11900,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventWatchCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -11774,7 +11908,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *updated min* query property to the given value. /// /// - /// Lower bound for an event's last modification time (as a RFC 3339 timestamp) to filter by. When specified, entries deleted since this time will always be included regardless of showDeleted. Optional. The default is not to filter by last modification time. + /// Lower bound for an event's last modification time (as a RFC 3339 timestamp) to filter by. When specified, entries deleted since this time will always be included regardless of showDeleted. Optional. The default is not to filter by last modification time. pub fn updated_min(mut self, new_value: &str) -> EventWatchCall<'a, C, NC, A> { self._updated_min = Some(new_value.to_string()); self @@ -11782,7 +11916,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *time zone* query property to the given value. /// /// - /// Time zone used in the response. Optional. The default is the time zone of the calendar. + /// Time zone used in the response. Optional. The default is the time zone of the calendar. pub fn time_zone(mut self, new_value: &str) -> EventWatchCall<'a, C, NC, A> { self._time_zone = Some(new_value.to_string()); self @@ -11790,7 +11924,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *time min* query property to the given value. /// /// - /// Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. + /// Lower bound (inclusive) for an event's end time to filter by. Optional. The default is not to filter by end time. pub fn time_min(mut self, new_value: &str) -> EventWatchCall<'a, C, NC, A> { self._time_min = Some(new_value.to_string()); self @@ -11798,7 +11932,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *time max* query property to the given value. /// /// - /// Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. + /// Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. pub fn time_max(mut self, new_value: &str) -> EventWatchCall<'a, C, NC, A> { self._time_max = Some(new_value.to_string()); self @@ -11827,7 +11961,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *single events* query property to the given value. /// /// - /// Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False. + /// Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False. pub fn single_events(mut self, new_value: bool) -> EventWatchCall<'a, C, NC, A> { self._single_events = Some(new_value); self @@ -11835,7 +11969,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *show hidden invitations* query property to the given value. /// /// - /// Whether to include hidden invitations in the result. Optional. The default is False. + /// Whether to include hidden invitations in the result. Optional. The default is False. pub fn show_hidden_invitations(mut self, new_value: bool) -> EventWatchCall<'a, C, NC, A> { self._show_hidden_invitations = Some(new_value); self @@ -11843,7 +11977,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *show deleted* query property to the given value. /// /// - /// Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False. + /// Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False. pub fn show_deleted(mut self, new_value: bool) -> EventWatchCall<'a, C, NC, A> { self._show_deleted = Some(new_value); self @@ -11852,7 +11986,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints. + /// Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints. pub fn add_shared_extended_property(mut self, new_value: &str) -> EventWatchCall<'a, C, NC, A> { self._shared_extended_property.push(new_value.to_string()); self @@ -11860,7 +11994,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *q* query property to the given value. /// /// - /// Free text search terms to find events that match these terms in any field, except for extended properties. Optional. + /// Free text search terms to find events that match these terms in any field, except for extended properties. Optional. pub fn q(mut self, new_value: &str) -> EventWatchCall<'a, C, NC, A> { self._q = Some(new_value.to_string()); self @@ -11869,7 +12003,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints. + /// Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints. pub fn add_private_extended_property(mut self, new_value: &str) -> EventWatchCall<'a, C, NC, A> { self._private_extended_property.push(new_value.to_string()); self @@ -11877,7 +12011,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *page token* query property to the given value. /// /// - /// Token specifying which result page to return. Optional. + /// Token specifying which result page to return. Optional. pub fn page_token(mut self, new_value: &str) -> EventWatchCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -11885,7 +12019,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *order by* query property to the given value. /// /// - /// The order of the events returned in the result. Optional. The default is an unspecified, stable order. + /// The order of the events returned in the result. Optional. The default is an unspecified, stable order. pub fn order_by(mut self, new_value: &str) -> EventWatchCall<'a, C, NC, A> { self._order_by = Some(new_value.to_string()); self @@ -11893,7 +12027,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of events returned on one result page. By default the value is 250 events. The page size can never be larger than 2500 events. Optional. + /// Maximum number of events returned on one result page. By default the value is 250 events. The page size can never be larger than 2500 events. Optional. pub fn max_results(mut self, new_value: i32) -> EventWatchCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -11901,7 +12035,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *max attendees* query property to the given value. /// /// - /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. + /// The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. pub fn max_attendees(mut self, new_value: i32) -> EventWatchCall<'a, C, NC, A> { self._max_attendees = Some(new_value); self @@ -11909,7 +12043,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *i cal uid* query property to the given value. /// /// - /// Specifies event ID in the iCalendar format to be included in the response. Optional. + /// Specifies event ID in the iCalendar format to be included in the response. Optional. pub fn i_cal_uid(mut self, new_value: &str) -> EventWatchCall<'a, C, NC, A> { self._i_cal_uid = Some(new_value.to_string()); self @@ -11917,7 +12051,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *always include email* query property to the given value. /// /// - /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. + /// Whether to always include a value in the email field for the organizer, creator and attendees, even if no real email is available (i.e. a generated, non-working value will be provided). The use of this option is discouraged and should only be used by clients which cannot handle the absence of an email address value in the mentioned places. Optional. The default is False. pub fn always_include_email(mut self, new_value: bool) -> EventWatchCall<'a, C, NC, A> { self._always_include_email = Some(new_value); self @@ -11978,7 +12112,7 @@ impl<'a, C, NC, A> EventWatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Creates an event based on a simple text string. /// /// A builder for the *quickAdd* method supported by a *event* resource. -/// It is not used directly, but through a `EventMethods`. +/// It is not used directly, but through a `EventMethods` instance. /// /// # Example /// @@ -12043,7 +12177,7 @@ impl<'a, C, NC, A> EventQuickAddCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "calendarId", "text", "sendNotifications"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12096,7 +12230,7 @@ impl<'a, C, NC, A> EventQuickAddCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12108,7 +12242,6 @@ impl<'a, C, NC, A> EventQuickAddCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -12118,7 +12251,7 @@ impl<'a, C, NC, A> EventQuickAddCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12129,7 +12262,7 @@ impl<'a, C, NC, A> EventQuickAddCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12138,13 +12271,13 @@ impl<'a, C, NC, A> EventQuickAddCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12156,7 +12289,7 @@ impl<'a, C, NC, A> EventQuickAddCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Calendar identifier. + /// Calendar identifier. pub fn calendar_id(mut self, new_value: &str) -> EventQuickAddCall<'a, C, NC, A> { self._calendar_id = new_value.to_string(); self @@ -12166,7 +12299,7 @@ impl<'a, C, NC, A> EventQuickAddCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The text describing the event to be created. + /// The text describing the event to be created. pub fn text(mut self, new_value: &str) -> EventQuickAddCall<'a, C, NC, A> { self._text = new_value.to_string(); self @@ -12174,7 +12307,7 @@ impl<'a, C, NC, A> EventQuickAddCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *send notifications* query property to the given value. /// /// - /// Whether to send notifications about the creation of the event. Optional. The default is False. + /// Whether to send notifications about the creation of the event. Optional. The default is False. pub fn send_notifications(mut self, new_value: bool) -> EventQuickAddCall<'a, C, NC, A> { self._send_notifications = Some(new_value); self diff --git a/gen/cloudlatencytest2/Cargo.toml b/gen/cloudlatencytest2/Cargo.toml index ea3d10cda2..f56cc7b994 100644 --- a/gen/cloudlatencytest2/Cargo.toml +++ b/gen/cloudlatencytest2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-cloudlatencytest2" -version = "0.1.1+20150206" +version = "0.1.2+20150206" authors = ["Sebastian Thiel "] description = "A complete library to interact with cloudlatencytest (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudlatencytest2" @@ -16,7 +16,7 @@ keywords = ["cloudlatencytest", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/cloudlatencytest2/README.md b/gen/cloudlatencytest2/README.md index 2470643790..7056925021 100644 --- a/gen/cloudlatencytest2/README.md +++ b/gen/cloudlatencytest2/README.md @@ -1,11 +1,11 @@ The `google-cloudlatencytest2` library allows access to all features of the *Google cloudlatencytest* service. -This documentation was generated from *cloudlatencytest* crate version *0.1.1+20150206*, where *20150206* is the exact revision of the *cloudlatencytest:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *cloudlatencytest* crate version *0.1.2+20150206*, where *20150206* is the exact revision of the *cloudlatencytest:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. # Features Handle the following *Resources* with ease from the central [hub](http://byron.github.io/google-apis-rs/google-cloudlatencytest2/struct.Cloudlatencytest.html) ... @@ -22,6 +22,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-cloudlatencytest2/struct.Cloudlatencytest.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-cloudlatencytest2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-cloudlatencytest2/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-cloudlatencytest2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -31,6 +33,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-cloudlatencytest2/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -66,7 +70,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-cloudlatencytest2" as cloudlatencytest2; use cloudlatencytest2::Stats; -use cloudlatencytest2::Result; +use cloudlatencytest2::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use cloudlatencytest2::Cloudlatencytest; @@ -95,15 +99,17 @@ let result = hub.statscollection().updatestats(&req) .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -116,7 +122,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-cloudlatencytest2/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-cloudlatencytest2/trait.ResponseResult.html), it will return that by default. @@ -139,8 +145,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-cloudlatencyte ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-cloudlatencytest2/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-cloudlatencytest2/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-cloudlatencytest2/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-cloudlatencytest2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-cloudlatencytest2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/cloudlatencytest2/src/cmn.rs b/gen/cloudlatencytest2/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/cloudlatencytest2/src/cmn.rs +++ b/gen/cloudlatencytest2/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/cloudlatencytest2/src/lib.rs b/gen/cloudlatencytest2/src/lib.rs index 0c3b0302b9..40e0137c77 100644 --- a/gen/cloudlatencytest2/src/lib.rs +++ b/gen/cloudlatencytest2/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *cloudlatencytest* crate version *0.1.1+20150206*, where *20150206* is the exact revision of the *cloudlatencytest:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *cloudlatencytest* crate version *0.1.2+20150206*, where *20150206* is the exact revision of the *cloudlatencytest:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/cloudlatencytest2). //! # Features //! @@ -22,6 +22,8 @@ //! //! * **[Hub](struct.Cloudlatencytest.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -31,6 +33,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -66,7 +70,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-cloudlatencytest2" as cloudlatencytest2; //! use cloudlatencytest2::Stats; -//! use cloudlatencytest2::Result; +//! use cloudlatencytest2::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -96,15 +100,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -117,7 +123,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -140,8 +146,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -190,7 +197,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -237,7 +244,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-cloudlatencytest2" as cloudlatencytest2; /// use cloudlatencytest2::Stats; -/// use cloudlatencytest2::Result; +/// use cloudlatencytest2::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -267,15 +274,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -296,7 +305,7 @@ impl<'a, C, NC, A> Cloudlatencytest Cloudlatencytest { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -306,7 +315,7 @@ impl<'a, C, NC, A> Cloudlatencytest } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -326,9 +335,9 @@ impl<'a, C, NC, A> Cloudlatencytest /// #[derive(Default, Clone, Debug, Serialize)] pub struct IntValue { - /// no description provided + /// no description provided pub value: String, - /// no description provided + /// no description provided pub label: String, } @@ -346,16 +355,16 @@ impl Part for IntValue {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct Stats { - /// no description provided + /// no description provided #[serde(alias="stringValues")] pub string_values: Option>, - /// no description provided + /// no description provided #[serde(alias="intValues")] pub int_values: Option>, - /// no description provided + /// no description provided #[serde(alias="doubleValues")] pub double_values: Option>, - /// no description provided + /// no description provided pub time: Option, } @@ -368,9 +377,9 @@ impl RequestValue for Stats {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct StringValue { - /// no description provided + /// no description provided pub value: String, - /// no description provided + /// no description provided pub label: String, } @@ -388,7 +397,7 @@ impl Part for StringValue {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct AggregatedStats { - /// no description provided + /// no description provided pub stats: Option>, } @@ -406,7 +415,7 @@ impl RequestValue for AggregatedStats {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AggregatedStatsReply { - /// no description provided + /// no description provided #[serde(alias="testValue")] pub test_value: String, } @@ -420,9 +429,9 @@ impl ResponseResult for AggregatedStatsReply {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct DoubleValue { - /// no description provided + /// no description provided pub value: f32, - /// no description provided + /// no description provided pub label: String, } @@ -440,7 +449,7 @@ impl Part for DoubleValue {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct StatsReply { - /// no description provided + /// no description provided #[serde(alias="testValue")] pub test_value: String, } @@ -487,13 +496,17 @@ pub struct StatscollectionMethods<'a, C, NC, A> hub: &'a Cloudlatencytest, } -impl<'a, C, NC, A> ResourceMethodsBuilder for StatscollectionMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for StatscollectionMethods<'a, C, NC, A> {} impl<'a, C, NC, A> StatscollectionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// RPC to update the new TCP stats. + /// RPC to update the new TCP stats. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn updateaggregatedstats(&self, request: &AggregatedStats) -> StatscollectionUpdateaggregatedstatCall<'a, C, NC, A> { StatscollectionUpdateaggregatedstatCall { hub: self.hub, @@ -506,7 +519,11 @@ impl<'a, C, NC, A> StatscollectionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// RPC to update the new TCP stats. + /// RPC to update the new TCP stats. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn updatestats(&self, request: &Stats) -> StatscollectionUpdatestatCall<'a, C, NC, A> { StatscollectionUpdatestatCall { hub: self.hub, @@ -529,7 +546,7 @@ impl<'a, C, NC, A> StatscollectionMethods<'a, C, NC, A> { /// RPC to update the new TCP stats. /// /// A builder for the *updateaggregatedstats* method supported by a *statscollection* resource. -/// It is not used directly, but through a `StatscollectionMethods`. +/// It is not used directly, but through a `StatscollectionMethods` instance. /// /// # Example /// @@ -592,7 +609,7 @@ impl<'a, C, NC, A> StatscollectionUpdateaggregatedstatCall<'a, C, NC, A> where N for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -625,7 +642,7 @@ impl<'a, C, NC, A> StatscollectionUpdateaggregatedstatCall<'a, C, NC, A> where N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -641,7 +658,6 @@ impl<'a, C, NC, A> StatscollectionUpdateaggregatedstatCall<'a, C, NC, A> where N dlg.pre_request(); req.send() - }; match req_result { @@ -651,7 +667,7 @@ impl<'a, C, NC, A> StatscollectionUpdateaggregatedstatCall<'a, C, NC, A> where N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -662,7 +678,7 @@ impl<'a, C, NC, A> StatscollectionUpdateaggregatedstatCall<'a, C, NC, A> where N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -671,13 +687,13 @@ impl<'a, C, NC, A> StatscollectionUpdateaggregatedstatCall<'a, C, NC, A> where N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -749,7 +765,7 @@ impl<'a, C, NC, A> StatscollectionUpdateaggregatedstatCall<'a, C, NC, A> where N /// RPC to update the new TCP stats. /// /// A builder for the *updatestats* method supported by a *statscollection* resource. -/// It is not used directly, but through a `StatscollectionMethods`. +/// It is not used directly, but through a `StatscollectionMethods` instance. /// /// # Example /// @@ -812,7 +828,7 @@ impl<'a, C, NC, A> StatscollectionUpdatestatCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -845,7 +861,7 @@ impl<'a, C, NC, A> StatscollectionUpdatestatCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -861,7 +877,6 @@ impl<'a, C, NC, A> StatscollectionUpdatestatCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -871,7 +886,7 @@ impl<'a, C, NC, A> StatscollectionUpdatestatCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -882,7 +897,7 @@ impl<'a, C, NC, A> StatscollectionUpdatestatCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -891,13 +906,13 @@ impl<'a, C, NC, A> StatscollectionUpdatestatCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } diff --git a/gen/cloudmonitoring2_beta2/Cargo.toml b/gen/cloudmonitoring2_beta2/Cargo.toml index 7cecccfd82..b1c15537fd 100644 --- a/gen/cloudmonitoring2_beta2/Cargo.toml +++ b/gen/cloudmonitoring2_beta2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-cloudmonitoring2_beta2" -version = "0.1.1+20150305" +version = "0.1.2+20150305" authors = ["Sebastian Thiel "] description = "A complete library to interact with Cloud Monitoring (protocol v2beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudmonitoring2_beta2" @@ -16,7 +16,7 @@ keywords = ["cloudmonitoring", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/cloudmonitoring2_beta2/README.md b/gen/cloudmonitoring2_beta2/README.md index 38c4d7a80c..7df6ac6f46 100644 --- a/gen/cloudmonitoring2_beta2/README.md +++ b/gen/cloudmonitoring2_beta2/README.md @@ -1,11 +1,11 @@ The `google-cloudmonitoring2_beta2` library allows access to all features of the *Google Cloud Monitoring* service. -This documentation was generated from *Cloud Monitoring* crate version *0.1.1+20150305*, where *20150305* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *Cloud Monitoring* crate version *0.1.2+20150305*, where *20150305* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *Cloud Monitoring* *v2_beta2* API can be found at the [official documentation site](https://cloud.google.com/monitoring/v2beta2/). @@ -29,6 +29,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-cloudmonitoring2_beta2/struct.CloudMonitoring.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-cloudmonitoring2_beta2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-cloudmonitoring2_beta2/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-cloudmonitoring2_beta2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -38,6 +40,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-cloudmonitoring2_beta2/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -75,7 +79,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-cloudmonitoring2_beta2" as cloudmonitoring2_beta2; use cloudmonitoring2_beta2::ListMetricDescriptorsRequest; -use cloudmonitoring2_beta2::Result; +use cloudmonitoring2_beta2::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use cloudmonitoring2_beta2::CloudMonitoring; @@ -107,15 +111,17 @@ let result = hub.metric_descriptors().list(&req, "project") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -128,7 +134,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-cloudmonitoring2_beta2/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-cloudmonitoring2_beta2/trait.ResponseResult.html), it will return that by default. @@ -151,8 +157,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-cloudmonitorin ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-cloudmonitoring2_beta2/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-cloudmonitoring2_beta2/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-cloudmonitoring2_beta2/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-cloudmonitoring2_beta2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-cloudmonitoring2_beta2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/cloudmonitoring2_beta2/src/cmn.rs b/gen/cloudmonitoring2_beta2/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/cloudmonitoring2_beta2/src/cmn.rs +++ b/gen/cloudmonitoring2_beta2/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/cloudmonitoring2_beta2/src/lib.rs b/gen/cloudmonitoring2_beta2/src/lib.rs index c5b88b8d17..7a2e6487e5 100644 --- a/gen/cloudmonitoring2_beta2/src/lib.rs +++ b/gen/cloudmonitoring2_beta2/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Cloud Monitoring* crate version *0.1.1+20150305*, where *20150305* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *Cloud Monitoring* crate version *0.1.2+20150305*, where *20150305* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *Cloud Monitoring* *v2_beta2* API can be found at the //! [official documentation site](https://cloud.google.com/monitoring/v2beta2/). @@ -29,6 +29,8 @@ //! //! * **[Hub](struct.CloudMonitoring.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -38,6 +40,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -75,7 +79,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-cloudmonitoring2_beta2" as cloudmonitoring2_beta2; //! use cloudmonitoring2_beta2::ListMetricDescriptorsRequest; -//! use cloudmonitoring2_beta2::Result; +//! use cloudmonitoring2_beta2::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -108,15 +112,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -129,7 +135,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -152,8 +158,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -202,7 +209,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -249,7 +256,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-cloudmonitoring2_beta2" as cloudmonitoring2_beta2; /// use cloudmonitoring2_beta2::ListMetricDescriptorsRequest; -/// use cloudmonitoring2_beta2::Result; +/// use cloudmonitoring2_beta2::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -282,15 +289,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -311,7 +320,7 @@ impl<'a, C, NC, A> CloudMonitoring CloudMonitoring { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -327,7 +336,7 @@ impl<'a, C, NC, A> CloudMonitoring } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -347,9 +356,9 @@ impl<'a, C, NC, A> CloudMonitoring /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PointDistributionUnderflowBucket { - /// The number of events whose values are in the interval defined by this bucket. + /// The number of events whose values are in the interval defined by this bucket. pub count: String, - /// The upper bound of the value interval of this bucket (exclusive). + /// The upper bound of the value interval of this bucket (exclusive). #[serde(alias="upperBound")] pub upper_bound: f64, } @@ -368,12 +377,12 @@ impl Part for PointDistributionUnderflowBucket {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ListMetricDescriptorsResponse { - /// The returned metric descriptors. + /// The returned metric descriptors. pub metrics: Vec, - /// Pagination token. If present, indicates that additional results are available for retrieval. To access the results past the pagination limit, pass this value to the pageToken query parameter. + /// Pagination token. If present, indicates that additional results are available for retrieval. To access the results past the pagination limit, pass this value to the pageToken query parameter. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listMetricDescriptorsResponse". + /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listMetricDescriptorsResponse". pub kind: String, } @@ -391,7 +400,7 @@ impl ResponseResult for ListMetricDescriptorsResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct ListMetricDescriptorsRequest { - /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listMetricDescriptorsRequest". + /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listMetricDescriptorsRequest". pub kind: Option, } @@ -409,7 +418,7 @@ impl RequestValue for ListMetricDescriptorsRequest {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct ListTimeseriesDescriptorsRequest { - /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listTimeseriesDescriptorsRequest". + /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listTimeseriesDescriptorsRequest". pub kind: Option, } @@ -422,10 +431,10 @@ impl RequestValue for ListTimeseriesDescriptorsRequest {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct TimeseriesPoint { - /// The descriptor of this time series. + /// The descriptor of this time series. #[serde(alias="timeseriesDesc")] pub timeseries_desc: TimeseriesDescriptor, - /// The data point in this time series snapshot. + /// The data point in this time series snapshot. pub point: Point, } @@ -438,12 +447,12 @@ impl Part for TimeseriesPoint {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PointDistribution { - /// The finite buckets. + /// The finite buckets. pub buckets: Vec, - /// The underflow bucket. + /// The underflow bucket. #[serde(alias="underflowBucket")] pub underflow_bucket: PointDistributionUnderflowBucket, - /// The overflow bucket. + /// The overflow bucket. #[serde(alias="overflowBucket")] pub overflow_bucket: PointDistributionOverflowBucket, } @@ -457,10 +466,10 @@ impl Part for PointDistribution {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MetricDescriptorTypeDescriptor { - /// The type of data that is written to a timeseries point for this metric. + /// The type of data that is written to a timeseries point for this metric. #[serde(alias="valueType")] pub value_type: String, - /// The method of collecting data for the metric. + /// The method of collecting data for the metric. #[serde(alias="metricType")] pub metric_type: String, } @@ -474,9 +483,9 @@ impl Part for MetricDescriptorTypeDescriptor {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MetricDescriptorLabelDescriptor { - /// Label description. + /// Label description. pub description: String, - /// Label key. + /// Label key. pub key: String, } @@ -489,12 +498,12 @@ impl Part for MetricDescriptorLabelDescriptor {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PointDistributionBucket { - /// The number of events whose values are in the interval defined by this bucket. + /// The number of events whose values are in the interval defined by this bucket. pub count: String, - /// The lower bound of the value interval of this bucket (inclusive). + /// The lower bound of the value interval of this bucket (inclusive). #[serde(alias="lowerBound")] pub lower_bound: f64, - /// The upper bound of the value interval of this bucket (exclusive). + /// The upper bound of the value interval of this bucket (exclusive). #[serde(alias="upperBound")] pub upper_bound: f64, } @@ -513,7 +522,7 @@ impl Part for PointDistributionBucket {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct ListTimeseriesRequest { - /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listTimeseriesRequest". + /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listTimeseriesRequest". pub kind: Option, } @@ -533,15 +542,15 @@ impl RequestValue for ListTimeseriesRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MetricDescriptor { - /// The project ID to which the metric belongs. + /// The project ID to which the metric belongs. pub project: Option, - /// Labels defined for this metric. + /// Labels defined for this metric. pub labels: Option>, - /// Description of this metric. + /// Description of this metric. pub description: Option, - /// The name of this metric. + /// The name of this metric. pub name: Option, - /// Type description for this metric. + /// Type description for this metric. #[serde(alias="typeDescriptor")] pub type_descriptor: Option, } @@ -562,7 +571,7 @@ impl ResponseResult for MetricDescriptor {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct WriteTimeseriesResponse { - /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#writeTimeseriesResponse". + /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#writeTimeseriesResponse". pub kind: String, } @@ -580,7 +589,7 @@ impl ResponseResult for WriteTimeseriesResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DeleteMetricDescriptorResponse { - /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#deleteMetricDescriptorResponse". + /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#deleteMetricDescriptorResponse". pub kind: String, } @@ -598,10 +607,10 @@ impl ResponseResult for DeleteMetricDescriptorResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct WriteTimeseriesRequest { - /// The label's name. + /// The label's name. #[serde(alias="commonLabels")] pub common_labels: Option>, - /// Provide time series specific labels and the data points for each time series. The labels in timeseries and the common_labels should form a complete list of labels that required by the metric. + /// Provide time series specific labels and the data points for each time series. The labels in timeseries and the common_labels should form a complete list of labels that required by the metric. pub timeseries: Option>, } @@ -614,23 +623,23 @@ impl RequestValue for WriteTimeseriesRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Point { - /// The interval [start, end] is the time period to which the point's value applies. For gauge metrics, whose values are instantaneous measurements, this interval should be empty (start should equal end). For cumulative metrics (of which deltas and rates are special cases), the interval should be non-empty. Both start and end are RFC 3339 strings. + /// The interval [start, end] is the time period to which the point's value applies. For gauge metrics, whose values are instantaneous measurements, this interval should be empty (start should equal end). For cumulative metrics (of which deltas and rates are special cases), the interval should be non-empty. Both start and end are RFC 3339 strings. pub start: String, - /// The value of this data point. Either "true" or "false". + /// The value of this data point. Either "true" or "false". #[serde(alias="boolValue")] pub bool_value: bool, - /// The interval [start, end] is the time period to which the point's value applies. For gauge metrics, whose values are instantaneous measurements, this interval should be empty (start should equal end). For cumulative metrics (of which deltas and rates are special cases), the interval should be non-empty. Both start and end are RFC 3339 strings. + /// The interval [start, end] is the time period to which the point's value applies. For gauge metrics, whose values are instantaneous measurements, this interval should be empty (start should equal end). For cumulative metrics (of which deltas and rates are special cases), the interval should be non-empty. Both start and end are RFC 3339 strings. pub end: String, - /// The value of this data point as a distribution. A distribution value can contain a list of buckets and/or an underflowBucket and an overflowBucket. The values of these points can be used to create a histogram. + /// The value of this data point as a distribution. A distribution value can contain a list of buckets and/or an underflowBucket and an overflowBucket. The values of these points can be used to create a histogram. #[serde(alias="distributionValue")] pub distribution_value: PointDistribution, - /// The value of this data point in string format. + /// The value of this data point in string format. #[serde(alias="stringValue")] pub string_value: String, - /// The value of this data point as a 64-bit integer. + /// The value of this data point as a 64-bit integer. #[serde(alias="int64Value")] pub int64_value: String, - /// The value of this data point as a double-precision floating-point number. + /// The value of this data point as a double-precision floating-point number. #[serde(alias="doubleValue")] pub double_value: f64, } @@ -649,11 +658,11 @@ impl Part for Point {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TimeseriesDescriptor { - /// The Developers Console project number to which this time series belongs. + /// The Developers Console project number to which this time series belongs. pub project: Option, - /// The name of the metric. + /// The name of the metric. pub metric: Option, - /// The label's name. + /// The label's name. pub labels: Option>, } @@ -666,10 +675,10 @@ impl Resource for TimeseriesDescriptor {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Timeseries { - /// The descriptor of this time series. + /// The descriptor of this time series. #[serde(alias="timeseriesDesc")] pub timeseries_desc: TimeseriesDescriptor, - /// The data points of this time series. The points are listed in order of their end timestamp, from younger to older. + /// The data points of this time series. The points are listed in order of their end timestamp, from younger to older. pub points: Vec, } @@ -682,9 +691,9 @@ impl Part for Timeseries {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PointDistributionOverflowBucket { - /// The number of events whose values are in the interval defined by this bucket. + /// The number of events whose values are in the interval defined by this bucket. pub count: String, - /// The lower bound of the value interval of this bucket (inclusive). + /// The lower bound of the value interval of this bucket (inclusive). #[serde(alias="lowerBound")] pub lower_bound: f64, } @@ -703,16 +712,16 @@ impl Part for PointDistributionOverflowBucket {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ListTimeseriesDescriptorsResponse { - /// Pagination token. If present, indicates that additional results are available for retrieval. To access the results past the pagination limit, set this value to the pageToken query parameter. + /// Pagination token. If present, indicates that additional results are available for retrieval. To access the results past the pagination limit, set this value to the pageToken query parameter. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The youngest timestamp of the interval of this query, as an RFC 3339 string. + /// The youngest timestamp of the interval of this query, as an RFC 3339 string. pub youngest: String, - /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listTimeseriesDescriptorsResponse". + /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listTimeseriesDescriptorsResponse". pub kind: String, - /// The oldest timestamp of the interval of this query, as an RFC 3339 string. + /// The oldest timestamp of the interval of this query, as an RFC 3339 string. pub oldest: String, - /// The returned time series descriptors. + /// The returned time series descriptors. pub timeseries: Vec, } @@ -730,16 +739,16 @@ impl ResponseResult for ListTimeseriesDescriptorsResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ListTimeseriesResponse { - /// Pagination token. If present, indicates that additional results are available for retrieval. To access the results past the pagination limit, set the pageToken query parameter to this value. All of the points of a time series will be returned before returning any point of the subsequent time series. + /// Pagination token. If present, indicates that additional results are available for retrieval. To access the results past the pagination limit, set the pageToken query parameter to this value. All of the points of a time series will be returned before returning any point of the subsequent time series. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The youngest timestamp of the interval of this query as an RFC 3339 string. + /// The youngest timestamp of the interval of this query as an RFC 3339 string. pub youngest: String, - /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listTimeseriesResponse". + /// Identifies what kind of resource this is. Value: the fixed string "cloudmonitoring#listTimeseriesResponse". pub kind: String, - /// The oldest timestamp of the interval of this query as an RFC 3339 string. + /// The oldest timestamp of the interval of this query as an RFC 3339 string. pub oldest: String, - /// The returned time series. + /// The returned time series. pub timeseries: Vec, } @@ -785,13 +794,20 @@ pub struct TimeseriesDescriptorMethods<'a, C, NC, A> hub: &'a CloudMonitoring, } -impl<'a, C, NC, A> ResourceMethodsBuilder for TimeseriesDescriptorMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for TimeseriesDescriptorMethods<'a, C, NC, A> {} impl<'a, C, NC, A> TimeseriesDescriptorMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List the descriptors of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken. + /// List the descriptors of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name. + /// * `metric` - Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count. + /// * `youngest` - End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp. pub fn list(&self, request: &ListTimeseriesDescriptorsRequest, project: &str, metric: &str, youngest: &str) -> TimeseriesDescriptorListCall<'a, C, NC, A> { TimeseriesDescriptorListCall { hub: self.hub, @@ -849,13 +865,18 @@ pub struct TimeseryMethods<'a, C, NC, A> hub: &'a CloudMonitoring, } -impl<'a, C, NC, A> ResourceMethodsBuilder for TimeseryMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for TimeseryMethods<'a, C, NC, A> {} impl<'a, C, NC, A> TimeseryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Put data points to one or more time series for one or more metrics. If a time series does not exist, a new time series will be created. It is not allowed to write a time series point that is older than the existing youngest point of that time series. Points that are older than the existing youngest point of that time series will be discarded silently. Therefore, users should make sure that points of a time series are written sequentially in the order of their end time. + /// Put data points to one or more time series for one or more metrics. If a time series does not exist, a new time series will be created. It is not allowed to write a time series point that is older than the existing youngest point of that time series. Points that are older than the existing youngest point of that time series will be discarded silently. Therefore, users should make sure that points of a time series are written sequentially in the order of their end time. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - The project ID. The value can be the numeric project ID or string-based project name. pub fn write(&self, request: &WriteTimeseriesRequest, project: &str) -> TimeseryWriteCall<'a, C, NC, A> { TimeseryWriteCall { hub: self.hub, @@ -869,7 +890,14 @@ impl<'a, C, NC, A> TimeseryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List the data points of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken. + /// List the data points of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name. + /// * `metric` - Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count. + /// * `youngest` - End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp. pub fn list(&self, request: &ListTimeseriesRequest, project: &str, metric: &str, youngest: &str) -> TimeseryListCall<'a, C, NC, A> { TimeseryListCall { hub: self.hub, @@ -927,13 +955,18 @@ pub struct MetricDescriptorMethods<'a, C, NC, A> hub: &'a CloudMonitoring, } -impl<'a, C, NC, A> ResourceMethodsBuilder for MetricDescriptorMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for MetricDescriptorMethods<'a, C, NC, A> {} impl<'a, C, NC, A> MetricDescriptorMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// List metric descriptors that match the query. If the query is not set, then all of the metric descriptors will be returned. Large responses will be paginated, use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken. + /// List metric descriptors that match the query. If the query is not set, then all of the metric descriptors will be returned. Large responses will be paginated, use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - The project id. The value can be the numeric project ID or string-based project name. pub fn list(&self, request: &ListMetricDescriptorsRequest, project: &str) -> MetricDescriptorListCall<'a, C, NC, A> { MetricDescriptorListCall { hub: self.hub, @@ -950,7 +983,12 @@ impl<'a, C, NC, A> MetricDescriptorMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete an existing metric. + /// Delete an existing metric. + /// + /// # Arguments + /// + /// * `project` - The project ID to which the metric belongs. + /// * `metric` - Name of the metric. pub fn delete(&self, project: &str, metric: &str) -> MetricDescriptorDeleteCall<'a, C, NC, A> { MetricDescriptorDeleteCall { hub: self.hub, @@ -964,7 +1002,12 @@ impl<'a, C, NC, A> MetricDescriptorMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Create a new metric. + /// Create a new metric. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - The project id. The value can be the numeric project ID or string-based project name. pub fn create(&self, request: &MetricDescriptor, project: &str) -> MetricDescriptorCreateCall<'a, C, NC, A> { MetricDescriptorCreateCall { hub: self.hub, @@ -988,7 +1031,7 @@ impl<'a, C, NC, A> MetricDescriptorMethods<'a, C, NC, A> { /// List the descriptors of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken. /// /// A builder for the *list* method supported by a *timeseriesDescriptor* resource. -/// It is not used directly, but through a `TimeseriesDescriptorMethods`. +/// It is not used directly, but through a `TimeseriesDescriptorMethods` instance. /// /// # Example /// @@ -1096,7 +1139,7 @@ impl<'a, C, NC, A> TimeseriesDescriptorListCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "project", "metric", "youngest", "window", "timespan", "pageToken", "oldest", "labels", "count", "aggregator"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1153,7 +1196,7 @@ impl<'a, C, NC, A> TimeseriesDescriptorListCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1169,7 +1212,6 @@ impl<'a, C, NC, A> TimeseriesDescriptorListCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -1179,7 +1221,7 @@ impl<'a, C, NC, A> TimeseriesDescriptorListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1190,7 +1232,7 @@ impl<'a, C, NC, A> TimeseriesDescriptorListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1199,13 +1241,13 @@ impl<'a, C, NC, A> TimeseriesDescriptorListCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1226,7 +1268,7 @@ impl<'a, C, NC, A> TimeseriesDescriptorListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name. + /// The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name. pub fn project(mut self, new_value: &str) -> TimeseriesDescriptorListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -1236,7 +1278,7 @@ impl<'a, C, NC, A> TimeseriesDescriptorListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count. + /// Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count. pub fn metric(mut self, new_value: &str) -> TimeseriesDescriptorListCall<'a, C, NC, A> { self._metric = new_value.to_string(); self @@ -1246,7 +1288,7 @@ impl<'a, C, NC, A> TimeseriesDescriptorListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp. + /// End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp. pub fn youngest(mut self, new_value: &str) -> TimeseriesDescriptorListCall<'a, C, NC, A> { self._youngest = new_value.to_string(); self @@ -1281,7 +1323,7 @@ impl<'a, C, NC, A> TimeseriesDescriptorListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *page token* query property to the given value. /// /// - /// The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results. + /// The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results. pub fn page_token(mut self, new_value: &str) -> TimeseriesDescriptorListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -1289,7 +1331,7 @@ impl<'a, C, NC, A> TimeseriesDescriptorListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *oldest* query property to the given value. /// /// - /// Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest] + /// Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest] pub fn oldest(mut self, new_value: &str) -> TimeseriesDescriptorListCall<'a, C, NC, A> { self._oldest = Some(new_value.to_string()); self @@ -1311,7 +1353,7 @@ impl<'a, C, NC, A> TimeseriesDescriptorListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *count* query property to the given value. /// /// - /// Maximum number of time series descriptors per page. Used for pagination. If not specified, count = 100. + /// Maximum number of time series descriptors per page. Used for pagination. If not specified, count = 100. pub fn count(mut self, new_value: i32) -> TimeseriesDescriptorListCall<'a, C, NC, A> { self._count = Some(new_value); self @@ -1319,7 +1361,7 @@ impl<'a, C, NC, A> TimeseriesDescriptorListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *aggregator* query property to the given value. /// /// - /// The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metric types. + /// The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metric types. pub fn aggregator(mut self, new_value: &str) -> TimeseriesDescriptorListCall<'a, C, NC, A> { self._aggregator = Some(new_value.to_string()); self @@ -1380,7 +1422,7 @@ impl<'a, C, NC, A> TimeseriesDescriptorListCall<'a, C, NC, A> where NC: hyper::n /// Put data points to one or more time series for one or more metrics. If a time series does not exist, a new time series will be created. It is not allowed to write a time series point that is older than the existing youngest point of that time series. Points that are older than the existing youngest point of that time series will be discarded silently. Therefore, users should make sure that points of a time series are written sequentially in the order of their end time. /// /// A builder for the *write* method supported by a *timesery* resource. -/// It is not used directly, but through a `TimeseryMethods`. +/// It is not used directly, but through a `TimeseryMethods` instance. /// /// # Example /// @@ -1445,7 +1487,7 @@ impl<'a, C, NC, A> TimeseryWriteCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1502,7 +1544,7 @@ impl<'a, C, NC, A> TimeseryWriteCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1518,7 +1560,6 @@ impl<'a, C, NC, A> TimeseryWriteCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -1528,7 +1569,7 @@ impl<'a, C, NC, A> TimeseryWriteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1539,7 +1580,7 @@ impl<'a, C, NC, A> TimeseryWriteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1548,13 +1589,13 @@ impl<'a, C, NC, A> TimeseryWriteCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1575,7 +1616,7 @@ impl<'a, C, NC, A> TimeseryWriteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID. The value can be the numeric project ID or string-based project name. + /// The project ID. The value can be the numeric project ID or string-based project name. pub fn project(mut self, new_value: &str) -> TimeseryWriteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -1636,7 +1677,7 @@ impl<'a, C, NC, A> TimeseryWriteCall<'a, C, NC, A> where NC: hyper::net::Network /// List the data points of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken. /// /// A builder for the *list* method supported by a *timesery* resource. -/// It is not used directly, but through a `TimeseryMethods`. +/// It is not used directly, but through a `TimeseryMethods` instance. /// /// # Example /// @@ -1744,7 +1785,7 @@ impl<'a, C, NC, A> TimeseryListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "project", "metric", "youngest", "window", "timespan", "pageToken", "oldest", "labels", "count", "aggregator"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1801,7 +1842,7 @@ impl<'a, C, NC, A> TimeseryListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1817,7 +1858,6 @@ impl<'a, C, NC, A> TimeseryListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -1827,7 +1867,7 @@ impl<'a, C, NC, A> TimeseryListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1838,7 +1878,7 @@ impl<'a, C, NC, A> TimeseryListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1847,13 +1887,13 @@ impl<'a, C, NC, A> TimeseryListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1874,7 +1914,7 @@ impl<'a, C, NC, A> TimeseryListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name. + /// The project ID to which this time series belongs. The value can be the numeric project ID or string-based project name. pub fn project(mut self, new_value: &str) -> TimeseryListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -1884,7 +1924,7 @@ impl<'a, C, NC, A> TimeseryListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count. + /// Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, compute.googleapis.com/instance/disk/read_ops_count. pub fn metric(mut self, new_value: &str) -> TimeseryListCall<'a, C, NC, A> { self._metric = new_value.to_string(); self @@ -1894,7 +1934,7 @@ impl<'a, C, NC, A> TimeseryListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp. + /// End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp. pub fn youngest(mut self, new_value: &str) -> TimeseryListCall<'a, C, NC, A> { self._youngest = new_value.to_string(); self @@ -1929,7 +1969,7 @@ impl<'a, C, NC, A> TimeseryListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results. + /// The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results. pub fn page_token(mut self, new_value: &str) -> TimeseryListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -1937,7 +1977,7 @@ impl<'a, C, NC, A> TimeseryListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *oldest* query property to the given value. /// /// - /// Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest] + /// Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest] pub fn oldest(mut self, new_value: &str) -> TimeseryListCall<'a, C, NC, A> { self._oldest = Some(new_value.to_string()); self @@ -1959,7 +1999,7 @@ impl<'a, C, NC, A> TimeseryListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *count* query property to the given value. /// /// - /// Maximum number of data points per page, which is used for pagination of results. + /// Maximum number of data points per page, which is used for pagination of results. pub fn count(mut self, new_value: i32) -> TimeseryListCall<'a, C, NC, A> { self._count = Some(new_value); self @@ -1967,7 +2007,7 @@ impl<'a, C, NC, A> TimeseryListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *aggregator* query property to the given value. /// /// - /// The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metric types. + /// The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metric types. pub fn aggregator(mut self, new_value: &str) -> TimeseryListCall<'a, C, NC, A> { self._aggregator = Some(new_value.to_string()); self @@ -2028,7 +2068,7 @@ impl<'a, C, NC, A> TimeseryListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// List metric descriptors that match the query. If the query is not set, then all of the metric descriptors will be returned. Large responses will be paginated, use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken. /// /// A builder for the *list* method supported by a *metricDescriptor* resource. -/// It is not used directly, but through a `MetricDescriptorMethods`. +/// It is not used directly, but through a `MetricDescriptorMethods` instance. /// /// # Example /// @@ -2108,7 +2148,7 @@ impl<'a, C, NC, A> MetricDescriptorListCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "project", "query", "pageToken", "count"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2165,7 +2205,7 @@ impl<'a, C, NC, A> MetricDescriptorListCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2181,7 +2221,6 @@ impl<'a, C, NC, A> MetricDescriptorListCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -2191,7 +2230,7 @@ impl<'a, C, NC, A> MetricDescriptorListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2202,7 +2241,7 @@ impl<'a, C, NC, A> MetricDescriptorListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2211,13 +2250,13 @@ impl<'a, C, NC, A> MetricDescriptorListCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2238,7 +2277,7 @@ impl<'a, C, NC, A> MetricDescriptorListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project id. The value can be the numeric project ID or string-based project name. + /// The project id. The value can be the numeric project ID or string-based project name. pub fn project(mut self, new_value: &str) -> MetricDescriptorListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -2246,7 +2285,7 @@ impl<'a, C, NC, A> MetricDescriptorListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *query* query property to the given value. /// /// - /// The query used to search against existing metrics. Separate keywords with a space; the service joins all keywords with AND, meaning that all keywords must match for a metric to be returned. If this field is omitted, all metrics are returned. If an empty string is passed with this field, no metrics are returned. + /// The query used to search against existing metrics. Separate keywords with a space; the service joins all keywords with AND, meaning that all keywords must match for a metric to be returned. If this field is omitted, all metrics are returned. If an empty string is passed with this field, no metrics are returned. pub fn query(mut self, new_value: &str) -> MetricDescriptorListCall<'a, C, NC, A> { self._query = Some(new_value.to_string()); self @@ -2254,7 +2293,7 @@ impl<'a, C, NC, A> MetricDescriptorListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *page token* query property to the given value. /// /// - /// The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results. + /// The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results. pub fn page_token(mut self, new_value: &str) -> MetricDescriptorListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2262,7 +2301,7 @@ impl<'a, C, NC, A> MetricDescriptorListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *count* query property to the given value. /// /// - /// Maximum number of metric descriptors per page. Used for pagination. If not specified, count = 100. + /// Maximum number of metric descriptors per page. Used for pagination. If not specified, count = 100. pub fn count(mut self, new_value: i32) -> MetricDescriptorListCall<'a, C, NC, A> { self._count = Some(new_value); self @@ -2323,7 +2362,7 @@ impl<'a, C, NC, A> MetricDescriptorListCall<'a, C, NC, A> where NC: hyper::net:: /// Delete an existing metric. /// /// A builder for the *delete* method supported by a *metricDescriptor* resource. -/// It is not used directly, but through a `MetricDescriptorMethods`. +/// It is not used directly, but through a `MetricDescriptorMethods` instance. /// /// # Example /// @@ -2383,7 +2422,7 @@ impl<'a, C, NC, A> MetricDescriptorDeleteCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "project", "metric"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2436,7 +2475,7 @@ impl<'a, C, NC, A> MetricDescriptorDeleteCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2448,7 +2487,6 @@ impl<'a, C, NC, A> MetricDescriptorDeleteCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -2458,7 +2496,7 @@ impl<'a, C, NC, A> MetricDescriptorDeleteCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2469,7 +2507,7 @@ impl<'a, C, NC, A> MetricDescriptorDeleteCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2478,13 +2516,13 @@ impl<'a, C, NC, A> MetricDescriptorDeleteCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2496,7 +2534,7 @@ impl<'a, C, NC, A> MetricDescriptorDeleteCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID to which the metric belongs. + /// The project ID to which the metric belongs. pub fn project(mut self, new_value: &str) -> MetricDescriptorDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -2506,7 +2544,7 @@ impl<'a, C, NC, A> MetricDescriptorDeleteCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the metric. + /// Name of the metric. pub fn metric(mut self, new_value: &str) -> MetricDescriptorDeleteCall<'a, C, NC, A> { self._metric = new_value.to_string(); self @@ -2567,7 +2605,7 @@ impl<'a, C, NC, A> MetricDescriptorDeleteCall<'a, C, NC, A> where NC: hyper::net /// Create a new metric. /// /// A builder for the *create* method supported by a *metricDescriptor* resource. -/// It is not used directly, but through a `MetricDescriptorMethods`. +/// It is not used directly, but through a `MetricDescriptorMethods` instance. /// /// # Example /// @@ -2632,7 +2670,7 @@ impl<'a, C, NC, A> MetricDescriptorCreateCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2689,7 +2727,7 @@ impl<'a, C, NC, A> MetricDescriptorCreateCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2705,7 +2743,6 @@ impl<'a, C, NC, A> MetricDescriptorCreateCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -2715,7 +2752,7 @@ impl<'a, C, NC, A> MetricDescriptorCreateCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2726,7 +2763,7 @@ impl<'a, C, NC, A> MetricDescriptorCreateCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2735,13 +2772,13 @@ impl<'a, C, NC, A> MetricDescriptorCreateCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2762,7 +2799,7 @@ impl<'a, C, NC, A> MetricDescriptorCreateCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project id. The value can be the numeric project ID or string-based project name. + /// The project id. The value can be the numeric project ID or string-based project name. pub fn project(mut self, new_value: &str) -> MetricDescriptorCreateCall<'a, C, NC, A> { self._project = new_value.to_string(); self diff --git a/gen/compute1/Cargo.toml b/gen/compute1/Cargo.toml index 538f4d2200..970d96eb78 100644 --- a/gen/compute1/Cargo.toml +++ b/gen/compute1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-compute1" -version = "0.1.1+20150302" +version = "0.1.2+20150302" authors = ["Sebastian Thiel "] description = "A complete library to interact with compute (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/compute1" @@ -16,7 +16,7 @@ keywords = ["compute", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/compute1/README.md b/gen/compute1/README.md index 4b890cb2dd..2c04d617fd 100644 --- a/gen/compute1/README.md +++ b/gen/compute1/README.md @@ -1,11 +1,11 @@ The `google-compute1` library allows access to all features of the *Google compute* service. -This documentation was generated from *compute* crate version *0.1.1+20150302*, where *20150302* is the exact revision of the *compute:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *compute* crate version *0.1.2+20150302*, where *20150302* is the exact revision of the *compute:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *compute* *v1* API can be found at the [official documentation site](https://developers.google.com/compute/docs/reference/latest/). @@ -77,6 +77,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-compute1/struct.Compute.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-compute1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-compute1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-compute1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -86,6 +88,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-compute1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -190,7 +194,7 @@ google-compute1 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-compute1" as compute1; -use compute1::Result; +use compute1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use compute1::Compute; @@ -214,15 +218,17 @@ let result = hub.instances().set_disk_auto_delete("project", "zone", "instance", .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -235,7 +241,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-compute1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-compute1/trait.ResponseResult.html), it will return that by default. @@ -258,8 +264,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-compute1/trait ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-compute1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-compute1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-compute1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-compute1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-compute1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/compute1/src/cmn.rs b/gen/compute1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/compute1/src/cmn.rs +++ b/gen/compute1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/compute1/src/lib.rs b/gen/compute1/src/lib.rs index 5aade79928..1cea2ba083 100644 --- a/gen/compute1/src/lib.rs +++ b/gen/compute1/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *compute* crate version *0.1.1+20150302*, where *20150302* is the exact revision of the *compute:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *compute* crate version *0.1.2+20150302*, where *20150302* is the exact revision of the *compute:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *compute* *v1* API can be found at the //! [official documentation site](https://developers.google.com/compute/docs/reference/latest/). @@ -77,6 +77,8 @@ //! //! * **[Hub](struct.Compute.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -86,6 +88,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -190,7 +194,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-compute1" as compute1; -//! use compute1::Result; +//! use compute1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -215,15 +219,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -236,7 +242,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -259,8 +265,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -309,7 +316,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -375,7 +382,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-compute1" as compute1; -/// use compute1::Result; +/// use compute1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -400,15 +407,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -429,7 +438,7 @@ impl<'a, C, NC, A> Compute Compute { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -517,7 +526,7 @@ impl<'a, C, NC, A> Compute } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -542,11 +551,11 @@ impl<'a, C, NC, A> Compute /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SerialPortOutput { - /// [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output. + /// [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output. pub kind: String, - /// [Output Only] The contents of the console output. + /// [Output Only] The contents of the console output. pub contents: String, - /// [Output Only] Server defined URL for the resource. + /// [Output Only] Server defined URL for the resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -560,9 +569,9 @@ impl ResponseResult for SerialPortOutput {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationsScopedList { - /// [Output Only] List of operations contained in this scope. + /// [Output Only] List of operations contained in this scope. pub operations: Vec, - /// [Output Only] Informational warning which replaces the list of operations when the list is empty. + /// [Output Only] Informational warning which replaces the list of operations when the list is empty. pub warning: OperationsScopedListWarning, } @@ -580,16 +589,16 @@ impl Part for OperationsScopedList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UrlMapList { - /// A token used to continue a truncated list request (output only). + /// A token used to continue a truncated list request (output only). #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of UrlMap resources. + /// A list of UrlMap resources. pub items: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -603,11 +612,11 @@ impl ResponseResult for UrlMapList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InstancesScopedListWarning { - /// [Output Only] Optional human-readable details for this warning. + /// [Output Only] Optional human-readable details for this warning. pub message: String, - /// [Output Only] The warning type identifier for this warning. + /// [Output Only] The warning type identifier for this warning. pub code: String, - /// [Output Only] Metadata for this warning in key: value format. + /// [Output Only] Metadata for this warning in key: value format. pub data: Vec, } @@ -628,29 +637,29 @@ impl Part for InstancesScopedListWarning {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DiskType { - /// [Output Only] Type of the resource. Always compute#diskType for disk types. + /// [Output Only] Type of the resource. Always compute#diskType for disk types. pub kind: String, - /// [Output Only] An optional textual description of the resource. + /// [Output Only] An optional textual description of the resource. pub description: String, - /// [Output Only] URL of the zone where the disk type resides. + /// [Output Only] URL of the zone where the disk type resides. pub zone: String, - /// [Output Only] An optional textual description of the valid disk size, such as "10GB-10TB". + /// [Output Only] An optional textual description of the valid disk size, such as "10GB-10TB". #[serde(alias="validDiskSize")] pub valid_disk_size: String, - /// [Output Only] The deprecation status associated with this disk type. + /// [Output Only] The deprecation status associated with this disk type. pub deprecated: DeprecationStatus, - /// [Output Only] Server defined default disk size in GB. + /// [Output Only] Server defined default disk size in GB. #[serde(alias="defaultDiskSizeGb")] pub default_disk_size_gb: String, - /// [Output Only] Creation timestamp in RFC3339 text format. + /// [Output Only] Creation timestamp in RFC3339 text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for the resource. + /// [Output Only] Server defined URL for the resource. #[serde(alias="selfLink")] pub self_link: String, - /// [Output Only] Name of the resource. + /// [Output Only] Name of the resource. pub name: String, } @@ -685,48 +694,48 @@ impl ResponseResult for DiskType {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Instance { - /// [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, TERMINATED. + /// [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, TERMINATED. pub status: Option, /// Full or partial URL of the machine type resource to use for this instance. This is provided by the client when the instance is created. For example, the following is a valid partial url: /// /// zones/zone/machineTypes/machine-type #[serde(alias="machineType")] pub machine_type: Option, - /// An optional textual description of the resource; provided by the client when the resource is created. + /// An optional textual description of the resource; provided by the client when the resource is created. pub description: Option, - /// A list of tags to appy to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. + /// A list of tags to appy to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. pub tags: Option, - /// Scheduling options for this instance. + /// Scheduling options for this instance. pub scheduling: Option, - /// Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding. + /// Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding. #[serde(alias="canIpForward")] pub can_ip_forward: Option, - /// A list of service accounts, with their specified scopes, authorized for this instance. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Authenticating from Google Compute Engine for more information. + /// A list of service accounts, with their specified scopes, authorized for this instance. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Authenticating from Google Compute Engine for more information. #[serde(alias="serviceAccounts")] pub service_accounts: Option>, - /// [Output Only] Creation timestamp in RFC3339 text format. + /// [Output Only] Creation timestamp in RFC3339 text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: Option, - /// An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. + /// An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. #[serde(alias="networkInterfaces")] pub network_interfaces: Option>, - /// [Output Only] Type of the resource. Always compute#instance for instances. + /// [Output Only] Type of the resource. Always compute#instance for instances. pub kind: Option, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. pub name: Option, - /// [Output Only] URL of the zone where the instance resides. + /// [Output Only] URL of the zone where the instance resides. pub zone: Option, - /// Array of disks associated with this instance. Persistent disks must be created before you can assign them. + /// Array of disks associated with this instance. Persistent disks must be created before you can assign them. pub disks: Option>, - /// [Output Only] Server defined URL for this resource. + /// [Output Only] Server defined URL for this resource. #[serde(alias="selfLink")] pub self_link: Option, - /// [Output Only] An optional, human-readable explanation of the status. + /// [Output Only] An optional, human-readable explanation of the status. #[serde(alias="statusMessage")] pub status_message: Option, - /// The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys. + /// The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys. pub metadata: Option, } @@ -741,10 +750,10 @@ impl ResponseResult for Instance {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct MachineTypesScopedList { - /// [Output Only] List of machine types contained in this scope. + /// [Output Only] List of machine types contained in this scope. #[serde(alias="machineTypes")] pub machine_types: Vec, - /// [Output Only] An informational warning that appears when the machine types list is empty. + /// [Output Only] An informational warning that appears when the machine types list is empty. pub warning: MachineTypesScopedListWarning, } @@ -762,7 +771,7 @@ impl Part for MachineTypesScopedList {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct TargetPoolsAddInstanceRequest { - /// URLs of the instances to be added to targetPool. + /// URLs of the instances to be added to targetPool. pub instances: Option>, } @@ -780,16 +789,16 @@ impl RequestValue for TargetPoolsAddInstanceRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationAggregatedList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A map of scoped operation lists. + /// [Output Only] A map of scoped operation lists. pub items: HashMap, - /// [Output Only] Type of resource. Always compute#operationAggregatedList for aggregated lists of operations. + /// [Output Only] Type of resource. Always compute#operationAggregatedList for aggregated lists of operations. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for this resource. + /// [Output Only] Server defined URL for this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -808,16 +817,16 @@ impl ResponseResult for OperationAggregatedList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ImageList { - /// A token used to continue a truncated list request (output only). + /// A token used to continue a truncated list request (output only). #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of Image resources. + /// A list of Image resources. pub items: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -837,11 +846,11 @@ impl ResponseResult for ImageList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Metadata { - /// Array of key/value pairs. The total size of all keys and values must be less than 512 KB. + /// Array of key/value pairs. The total size of all keys and values must be less than 512 KB. pub items: Option>, - /// [Output Only] Type of the resource. Always compute#metadata for metadata. + /// [Output Only] Type of the resource. Always compute#metadata for metadata. pub kind: Option, - /// Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. + /// Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. pub fingerprint: Option, } @@ -854,11 +863,11 @@ impl RequestValue for Metadata {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DiskTypesScopedListWarning { - /// [Output Only] Optional human-readable details for this warning. + /// [Output Only] Optional human-readable details for this warning. pub message: String, - /// [Output Only] The warning type identifier for this warning. + /// [Output Only] The warning type identifier for this warning. pub code: String, - /// [Output Only] Metadata for this warning in key: value format. + /// [Output Only] Metadata for this warning in key: value format. pub data: Vec, } @@ -872,9 +881,9 @@ impl Part for DiskTypesScopedListWarning {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ForwardingRulesScopedListWarningData { - /// [Output Only] A key for the warning data. + /// [Output Only] A key for the warning data. pub key: String, - /// [Output Only] A warning data value corresponding to the key. + /// [Output Only] A warning data value corresponding to the key. pub value: String, } @@ -893,7 +902,7 @@ impl Part for ForwardingRulesScopedListWarningData {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Tags { - /// An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. + /// An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. pub items: Option>, /// Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. /// @@ -915,7 +924,7 @@ impl RequestValue for Tags {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct UrlMapsValidateRequest { - /// Content of the UrlMap to be validated. + /// Content of the UrlMap to be validated. pub resource: Option, } @@ -934,22 +943,22 @@ impl RequestValue for UrlMapsValidateRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetHttpProxy { - /// Type of the resource. + /// Type of the resource. pub kind: Option, - /// An optional textual description of the resource; provided by the client when the resource is created. + /// An optional textual description of the resource; provided by the client when the resource is created. pub description: Option, - /// URL to the UrlMap resource that defines the mapping from URL to the BackendService. + /// URL to the UrlMap resource that defines the mapping from URL to the BackendService. #[serde(alias="urlMap")] pub url_map: Option, - /// Creation timestamp in RFC3339 text format (output only). + /// Creation timestamp in RFC3339 text format (output only). #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: Option, - /// Server defined URL for the resource (output only). + /// Server defined URL for the resource (output only). #[serde(alias="selfLink")] pub self_link: Option, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. pub name: Option, } @@ -968,16 +977,16 @@ impl ResponseResult for TargetHttpProxy {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DiskAggregatedList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A map of scoped disk lists. + /// [Output Only] A map of scoped disk lists. pub items: HashMap, - /// [Output Only] Type of resource. Always compute#diskAggregatedList for aggregated lists of persistent disks. + /// [Output Only] Type of resource. Always compute#diskAggregatedList for aggregated lists of persistent disks. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for this resource. + /// [Output Only] Server defined URL for this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -991,9 +1000,9 @@ impl ResponseResult for DiskAggregatedList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AddressesScopedList { - /// [Output Only] Informational warning which replaces the list of addresses when the list is empty. + /// [Output Only] Informational warning which replaces the list of addresses when the list is empty. pub warning: AddressesScopedListWarning, - /// [Output Only] List of addresses contained in this scope. + /// [Output Only] List of addresses contained in this scope. pub addresses: Vec
, } @@ -1006,9 +1015,9 @@ impl Part for AddressesScopedList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MetadataItems { - /// Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project. + /// Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project. pub key: String, - /// Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes. + /// Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes. pub value: String, } @@ -1022,9 +1031,9 @@ impl Part for MetadataItems {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InstancesScopedListWarningData { - /// [Output Only] A key for the warning data. + /// [Output Only] A key for the warning data. pub key: String, - /// [Output Only] A warning data value corresponding to the key. + /// [Output Only] A warning data value corresponding to the key. pub value: String, } @@ -1044,16 +1053,16 @@ impl Part for InstancesScopedListWarningData {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AddressList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A list of Address resources. + /// [Output Only] A list of Address resources. pub items: Vec
, - /// [Output Only] Type of resource. Always compute#addressList for lists of addresses. + /// [Output Only] Type of resource. Always compute#addressList for lists of addresses. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for the resource. + /// [Output Only] Server defined URL for the resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -1072,16 +1081,16 @@ impl ResponseResult for AddressList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DiskTypeList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A list of Disk Type resources. + /// [Output Only] A list of Disk Type resources. pub items: Vec, - /// [Output Only] Type of resource. Always compute#diskTypeList for disk types. + /// [Output Only] Type of resource. Always compute#diskTypeList for disk types. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for this resource. + /// [Output Only] Server defined URL for this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -1100,16 +1109,16 @@ impl ResponseResult for DiskTypeList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AddressAggregatedList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A map of scoped address lists. + /// [Output Only] A map of scoped address lists. pub items: HashMap, - /// [Output Only] Type of resource. Always compute#addressAggregatedList for aggregated lists of addresses. + /// [Output Only] Type of resource. Always compute#addressAggregatedList for aggregated lists of addresses. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for this resource. + /// [Output Only] Server defined URL for this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -1123,16 +1132,16 @@ impl ResponseResult for AddressAggregatedList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UrlMapValidationResult { - /// no description provided + /// no description provided #[serde(alias="testFailures")] pub test_failures: Vec, - /// no description provided + /// no description provided #[serde(alias="loadErrors")] pub load_errors: Vec, - /// Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons. + /// Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons. #[serde(alias="loadSucceeded")] pub load_succeeded: bool, - /// If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure. + /// If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure. #[serde(alias="testPassed")] pub test_passed: bool, } @@ -1146,11 +1155,11 @@ impl Part for UrlMapValidationResult {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TargetPoolsScopedListWarning { - /// [Output Only] Optional human-readable details for this warning. + /// [Output Only] Optional human-readable details for this warning. pub message: String, - /// [Output Only] The warning type identifier for this warning. + /// [Output Only] The warning type identifier for this warning. pub code: String, - /// [Output Only] Metadata for this warning in key: value format. + /// [Output Only] Metadata for this warning in key: value format. pub data: Vec, } @@ -1164,15 +1173,15 @@ impl Part for TargetPoolsScopedListWarning {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PathMatcher { - /// The URL to the BackendService resource. This will be used if none of the 'pathRules' defined by this PathMatcher is met by the URL's path portion. + /// The URL to the BackendService resource. This will be used if none of the 'pathRules' defined by this PathMatcher is met by the URL's path portion. #[serde(alias="defaultService")] pub default_service: String, - /// The list of path rules. + /// The list of path rules. #[serde(alias="pathRules")] pub path_rules: Vec, - /// no description provided + /// no description provided pub description: String, - /// The name to which this PathMatcher is referred by the HostRule. + /// The name to which this PathMatcher is referred by the HostRule. pub name: String, } @@ -1185,9 +1194,9 @@ impl Part for PathMatcher {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TargetInstancesScopedListWarningData { - /// [Output Only] A key for the warning data. + /// [Output Only] A key for the warning data. pub key: String, - /// [Output Only] A warning data value corresponding to the key. + /// [Output Only] A warning data value corresponding to the key. pub value: String, } @@ -1206,16 +1215,16 @@ impl Part for TargetInstancesScopedListWarningData {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SnapshotList { - /// A token used to continue a truncated list request (output only). + /// A token used to continue a truncated list request (output only). #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of Snapshot resources. + /// A list of Snapshot resources. pub items: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -1235,27 +1244,27 @@ impl ResponseResult for SnapshotList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Region { - /// [Output Only] Status of the region, either UP or DOWN. + /// [Output Only] Status of the region, either UP or DOWN. pub status: String, - /// [Output Only] Type of the resource. Always compute#region for regions. + /// [Output Only] Type of the resource. Always compute#region for regions. pub kind: String, - /// [Output Only] Textual description of the resource. + /// [Output Only] Textual description of the resource. pub description: String, - /// [Output Only] The deprecation status associated with this region. + /// [Output Only] The deprecation status associated with this region. pub deprecated: DeprecationStatus, - /// [Output Only] Quotas assigned to this region. + /// [Output Only] Quotas assigned to this region. pub quotas: Vec, - /// [Output Only] A list of zones available in this region, in the form of resource URLs. + /// [Output Only] A list of zones available in this region, in the form of resource URLs. pub zones: Vec, - /// [Output Only] Creation timestamp in RFC3339 text format. + /// [Output Only] Creation timestamp in RFC3339 text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: String, - /// [Output Only] Unique identifier for the resource; defined by the server . + /// [Output Only] Unique identifier for the resource; defined by the server . pub id: String, - /// [Output Only] Server defined URL for the resource. + /// [Output Only] Server defined URL for the resource. #[serde(alias="selfLink")] pub self_link: String, - /// [Output Only] Name of the resource. + /// [Output Only] Name of the resource. pub name: String, } @@ -1269,9 +1278,9 @@ impl ResponseResult for Region {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PathRule { - /// The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. + /// The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. pub paths: Vec, - /// The URL of the BackendService resource if this rule is matched. + /// The URL of the BackendService resource if this rule is matched. pub service: String, } @@ -1284,9 +1293,9 @@ impl Part for PathRule {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ServiceAccount { - /// The list of scopes to be made available for this service account. + /// The list of scopes to be made available for this service account. pub scopes: Vec, - /// Email address of the service account. + /// Email address of the service account. pub email: String, } @@ -1308,27 +1317,27 @@ impl Part for ServiceAccount {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Project { - /// [Output Only] Type of the resource. Always compute#project for projects. + /// [Output Only] Type of the resource. Always compute#project for projects. pub kind: String, - /// An optional textual description of the resource. + /// An optional textual description of the resource. pub description: String, - /// Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information. + /// Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information. #[serde(alias="commonInstanceMetadata")] pub common_instance_metadata: Metadata, - /// [Output Only] Quotas assigned to this project. + /// [Output Only] Quotas assigned to this project. pub quotas: Vec, - /// The location in Cloud Storage and naming method of the daily usage report. + /// The location in Cloud Storage and naming method of the daily usage report. #[serde(alias="usageExportLocation")] pub usage_export_location: UsageExportLocation, - /// [Output Only] Creation timestamp in RFC3339 text format. + /// [Output Only] Creation timestamp in RFC3339 text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for the resource. + /// [Output Only] Server defined URL for the resource. #[serde(alias="selfLink")] pub self_link: String, - /// Name of the resource. + /// Name of the resource. pub name: String, } @@ -1342,9 +1351,9 @@ impl ResponseResult for Project {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct MachineTypesScopedListWarningData { - /// [Output Only] A key for the warning data. + /// [Output Only] A key for the warning data. pub key: String, - /// [Output Only] A warning data value corresponding to the key. + /// [Output Only] A warning data value corresponding to the key. pub value: String, } @@ -1366,38 +1375,38 @@ impl Part for MachineTypesScopedListWarningData {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Snapshot { - /// The status of the persistent disk snapshot (output only). + /// The status of the persistent disk snapshot (output only). pub status: Option, - /// Type of the resource. + /// Type of the resource. pub kind: Option, - /// A size of the the storage used by the snapshot. As snapshots share storage this number is expected to change with snapshot creation/deletion. + /// A size of the the storage used by the snapshot. As snapshots share storage this number is expected to change with snapshot creation/deletion. #[serde(alias="storageBytes")] pub storage_bytes: Option, - /// An optional textual description of the resource; provided by the client when the resource is created. + /// An optional textual description of the resource; provided by the client when the resource is created. pub description: Option, - /// The source disk used to create this snapshot. + /// The source disk used to create this snapshot. #[serde(alias="sourceDisk")] pub source_disk: Option, - /// Creation timestamp in RFC3339 text format (output only). + /// Creation timestamp in RFC3339 text format (output only). #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// The 'id' value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name. + /// The 'id' value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name. #[serde(alias="sourceDiskId")] pub source_disk_id: Option, - /// Size of the persistent disk snapshot, specified in GB (output only). + /// Size of the persistent disk snapshot, specified in GB (output only). #[serde(alias="diskSizeGb")] pub disk_size_gb: Option, - /// Public visible licenses. + /// Public visible licenses. pub licenses: Option>, - /// An indicator whether storageBytes is in a stable state, or it is being adjusted as a result of shared storage reallocation. + /// An indicator whether storageBytes is in a stable state, or it is being adjusted as a result of shared storage reallocation. #[serde(alias="storageBytesStatus")] pub storage_bytes_status: Option, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: Option, - /// Server defined URL for the resource (output only). + /// Server defined URL for the resource (output only). #[serde(alias="selfLink")] pub self_link: Option, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. pub name: Option, } @@ -1412,9 +1421,9 @@ impl ResponseResult for Snapshot {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DiskTypesScopedList { - /// [Output Only] Informational warning which replaces the list of disk types when the list is empty. + /// [Output Only] Informational warning which replaces the list of disk types when the list is empty. pub warning: DiskTypesScopedListWarning, - /// [Output Only] List of disk types contained in this scope. + /// [Output Only] List of disk types contained in this scope. #[serde(alias="diskTypes")] pub disk_types: Vec, } @@ -1439,36 +1448,36 @@ impl Part for DiskTypesScopedList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct BackendService { - /// Type of the resource. + /// Type of the resource. pub kind: Option, - /// no description provided + /// no description provided pub protocol: Option, - /// An optional textual description of the resource; provided by the client when the resource is created. + /// An optional textual description of the resource; provided by the client when the resource is created. pub description: Option, - /// How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. + /// How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. #[serde(alias="timeoutSec")] pub timeout_sec: Option, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: Option, - /// The list of backends that serve this BackendService. + /// The list of backends that serve this BackendService. pub backends: Option>, - /// Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService. + /// Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService. pub fingerprint: Option, - /// Name of backend port. The same name should appear in the resource views referenced by this service. Required. + /// Name of backend port. The same name should appear in the resource views referenced by this service. Required. #[serde(alias="portName")] pub port_name: Option, - /// The list of URLs to the HttpHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required. + /// The list of URLs to the HttpHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required. #[serde(alias="healthChecks")] pub health_checks: Option>, - /// Creation timestamp in RFC3339 text format (output only). + /// Creation timestamp in RFC3339 text format (output only). #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// Deprecated in favor of port_name. The TCP port to connect on the backend. The default value is 80. + /// Deprecated in favor of port_name. The TCP port to connect on the backend. The default value is 80. pub port: Option, - /// Server defined URL for the resource (output only). + /// Server defined URL for the resource (output only). #[serde(alias="selfLink")] pub self_link: Option, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. pub name: Option, } @@ -1483,11 +1492,11 @@ impl ResponseResult for BackendService {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct HostRule { - /// The list of host patterns to match. They must be valid hostnames except that they may start with *. or *-. The * acts like a glob and will match any string of atoms (separated by .s and -s) to the left. + /// The list of host patterns to match. They must be valid hostnames except that they may start with *. or *-. The * acts like a glob and will match any string of atoms (separated by .s and -s) to the left. pub hosts: Vec, - /// no description provided + /// no description provided pub description: String, - /// The name of the PathMatcher to match the path portion of the URL, if the this HostRule matches the URL's host portion. + /// The name of the PathMatcher to match the path portion of the URL, if the this HostRule matches the URL's host portion. #[serde(alias="pathMatcher")] pub path_matcher: String, } @@ -1506,7 +1515,7 @@ impl Part for HostRule {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct ResourceGroupReference { - /// A URI referencing one of the resource views listed in the backend service. + /// A URI referencing one of the resource views listed in the backend service. pub group: Option, } @@ -1524,16 +1533,16 @@ impl RequestValue for ResourceGroupReference {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct MachineTypeList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A list of Machine Type resources. + /// [Output Only] A list of Machine Type resources. pub items: Vec, - /// [Output Only] Type of resource. Always compute#machineTypeList for lists of machine types. + /// [Output Only] Type of resource. Always compute#machineTypeList for lists of machine types. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for this resource. + /// [Output Only] Server defined URL for this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -1547,9 +1556,9 @@ impl ResponseResult for MachineTypeList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DisksScopedListWarningData { - /// [Output Only] A key for the warning data. + /// [Output Only] A key for the warning data. pub key: String, - /// [Output Only] A warning data value corresponding to the key. + /// [Output Only] A warning data value corresponding to the key. pub value: String, } @@ -1563,9 +1572,9 @@ impl Part for DisksScopedListWarningData {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationWarningsData { - /// [Output Only] A key for the warning data. + /// [Output Only] A key for the warning data. pub key: String, - /// [Output Only] A warning data value corresponding to the key. + /// [Output Only] A warning data value corresponding to the key. pub value: String, } @@ -1585,16 +1594,16 @@ impl Part for OperationWarningsData {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ForwardingRuleList { - /// A token used to continue a truncated list request (output only). + /// A token used to continue a truncated list request (output only). #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of ForwardingRule resources. + /// A list of ForwardingRule resources. pub items: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -1608,11 +1617,11 @@ impl ResponseResult for ForwardingRuleList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ForwardingRulesScopedListWarning { - /// [Output Only] Optional human-readable details for this warning. + /// [Output Only] Optional human-readable details for this warning. pub message: String, - /// [Output Only] The warning type identifier for this warning. + /// [Output Only] The warning type identifier for this warning. pub code: String, - /// [Output Only] Metadata for this warning in key: value format. + /// [Output Only] Metadata for this warning in key: value format. pub data: Vec, } @@ -1631,16 +1640,16 @@ impl Part for ForwardingRulesScopedListWarning {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct FirewallList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A list of Firewall resources. + /// [Output Only] A list of Firewall resources. pub items: Vec, - /// [Output Only] Type of resource. Always compute#firewallList for lists of firewalls. + /// [Output Only] Type of resource. Always compute#firewallList for lists of firewalls. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for this resource. + /// [Output Only] Server defined URL for this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -1654,13 +1663,13 @@ impl ResponseResult for FirewallList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UrlMapTest { - /// Path portion of the URL. + /// Path portion of the URL. pub path: String, - /// Host portion of the URL. + /// Host portion of the URL. pub host: String, - /// Description of this test case. + /// Description of this test case. pub description: String, - /// Expected BackendService resource the given URL should be mapped to. + /// Expected BackendService resource the given URL should be mapped to. pub service: String, } @@ -1683,9 +1692,9 @@ impl Part for UrlMapTest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Firewall { - /// [Output Ony] Type of the resource. Always compute#firewall for firewall rules. + /// [Output Ony] Type of the resource. Always compute#firewall for firewall rules. pub kind: Option, - /// An optional textual description of the resource; provided by the client when the resource is created. + /// An optional textual description of the resource; provided by the client when the resource is created. pub description: Option, /// A list of instance tags which this rule applies to. One or both of sourceRanges and sourceTags may be set. /// @@ -1697,19 +1706,19 @@ pub struct Firewall { /// If both properties are set, an inbound connection is allowed if the range or the tag of the source matches the sourceRanges OR matches the sourceTags property; the connection does not need to match both properties. #[serde(alias="sourceRanges")] pub source_ranges: Option>, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. pub name: Option, - /// A list of instance tags indicating sets of instances located on network which may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network. + /// A list of instance tags indicating sets of instances located on network which may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network. #[serde(alias="targetTags")] pub target_tags: Option>, - /// The list of rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. + /// The list of rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. pub allowed: Option>, - /// [Output Only] Creation timestamp in RFC3339text format. + /// [Output Only] Creation timestamp in RFC3339text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: Option, - /// [Output Only] Server defined URL for the resource. + /// [Output Only] Server defined URL for the resource. #[serde(alias="selfLink")] pub self_link: Option, /// URL of the network resource for this firewall rule. This field is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used: @@ -1732,11 +1741,11 @@ impl ResponseResult for Firewall {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationWarnings { - /// [Output Only] Optional human-readable details for this warning. + /// [Output Only] Optional human-readable details for this warning. pub message: String, - /// [Output Only] The warning type identifier for this warning. + /// [Output Only] The warning type identifier for this warning. pub code: String, - /// [Output Only] Metadata for this warning in key: value format. + /// [Output Only] Metadata for this warning in key: value format. pub data: Vec, } @@ -1757,16 +1766,16 @@ impl Part for OperationWarnings {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationList { - /// [Output Only] A token used to continue a truncate. + /// [Output Only] A token used to continue a truncate. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] The operation resources. + /// [Output Only] The operation resources. pub items: Vec, - /// [Output Only] Type of resource. Always compute#operations for Operations resource. + /// [Output Only] Type of resource. Always compute#operations for Operations resource. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for this resource. + /// [Output Only] Server defined URL for this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -1789,26 +1798,26 @@ impl ResponseResult for OperationList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetInstance { - /// NAT option controlling how IPs are NAT'ed to the VM. Currently only NO_NAT (default value) is supported. + /// NAT option controlling how IPs are NAT'ed to the VM. Currently only NO_NAT (default value) is supported. #[serde(alias="natPolicy")] pub nat_policy: Option, - /// An optional textual description of the resource; provided by the client when the resource is created. + /// An optional textual description of the resource; provided by the client when the resource is created. pub description: Option, - /// URL of the zone where the target instance resides (output only). + /// URL of the zone where the target instance resides (output only). pub zone: Option, - /// Type of the resource. + /// Type of the resource. pub kind: Option, - /// The URL to the instance that terminates the relevant traffic. + /// The URL to the instance that terminates the relevant traffic. pub instance: Option, - /// Creation timestamp in RFC3339 text format (output only). + /// Creation timestamp in RFC3339 text format (output only). #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: Option, - /// Server defined URL for the resource (output only). + /// Server defined URL for the resource (output only). #[serde(alias="selfLink")] pub self_link: Option, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. pub name: Option, } @@ -1828,16 +1837,16 @@ impl ResponseResult for TargetInstance {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TargetInstanceAggregatedList { - /// A token used to continue a truncated list request (output only). + /// A token used to continue a truncated list request (output only). #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A map of scoped target instance lists. + /// A map of scoped target instance lists. pub items: HashMap, - /// Type of resource. + /// Type of resource. pub kind: String, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -1856,16 +1865,16 @@ impl ResponseResult for TargetInstanceAggregatedList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DiskTypeAggregatedList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A map of scoped disk type lists. + /// [Output Only] A map of scoped disk type lists. pub items: HashMap, - /// [Output Only] Type of resource. Always compute#diskTypeAggregatedList. + /// [Output Only] Type of resource. Always compute#diskTypeAggregatedList. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for this resource. + /// [Output Only] Server defined URL for this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -1887,21 +1896,21 @@ impl ResponseResult for DiskTypeAggregatedList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InstanceTemplate { - /// Type of the resource. + /// Type of the resource. pub kind: Option, - /// An optional textual description of the instance template resource; provided by the client when the resource is created. + /// An optional textual description of the instance template resource; provided by the client when the resource is created. pub description: Option, - /// Name of the instance template resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035 + /// Name of the instance template resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035 pub name: Option, - /// Creation timestamp in RFC3339 text format (output only). + /// Creation timestamp in RFC3339 text format (output only). #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// The instance properties portion of this instance template resource. + /// The instance properties portion of this instance template resource. pub properties: Option, - /// Server defined URL for the resource (output only). + /// Server defined URL for the resource (output only). #[serde(alias="selfLink")] pub self_link: Option, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: Option, } @@ -1916,15 +1925,15 @@ impl ResponseResult for InstanceTemplate {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct HealthStatus { - /// URL of the instance resource. + /// URL of the instance resource. pub instance: String, - /// Health state of the instance. + /// Health state of the instance. #[serde(alias="healthState")] pub health_state: String, - /// The IP address represented by this resource. + /// The IP address represented by this resource. #[serde(alias="ipAddress")] pub ip_address: String, - /// The port on the instance. + /// The port on the instance. pub port: i32, } @@ -1942,16 +1951,16 @@ impl Part for HealthStatus {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct MachineTypeAggregatedList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A map of scoped machine type lists. + /// [Output Only] A map of scoped machine type lists. pub items: HashMap, - /// [Output Only] Type of resource. Always compute#machineTypeAggregatedList for aggregated lists of machine types. + /// [Output Only] Type of resource. Always compute#machineTypeAggregatedList for aggregated lists of machine types. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for this resource. + /// [Output Only] Server defined URL for this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -1970,7 +1979,7 @@ impl ResponseResult for MachineTypeAggregatedList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UrlMapsValidateResponse { - /// no description provided + /// no description provided pub result: UrlMapValidationResult, } @@ -1983,10 +1992,10 @@ impl ResponseResult for UrlMapsValidateResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ForwardingRulesScopedList { - /// List of forwarding rules contained in this scope. + /// List of forwarding rules contained in this scope. #[serde(alias="forwardingRules")] pub forwarding_rules: Vec, - /// Informational warning which replaces the list of forwarding rules when the list is empty. + /// Informational warning which replaces the list of forwarding rules when the list is empty. pub warning: ForwardingRulesScopedListWarning, } @@ -2074,61 +2083,61 @@ impl Part for ForwardingRulesScopedList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Operation { - /// [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE. + /// [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE. pub status: String, - /// [Output Only] The time that this operation was requested. This is in RFC3339 text format. + /// [Output Only] The time that this operation was requested. This is in RFC3339 text format. #[serde(alias="insertTime")] pub insert_time: String, - /// [Output Only] If warning messages are generated during processing of the operation, this field will be populated. + /// [Output Only] If warning messages are generated during processing of the operation, this field will be populated. pub warnings: Vec, - /// [Output Only] If errors are generated during processing of the operation, this field will be populated. + /// [Output Only] If errors are generated during processing of the operation, this field will be populated. pub error: OperationError, - /// [Output Only] Unique target ID which identifies a particular incarnation of the target. + /// [Output Only] Unique target ID which identifies a particular incarnation of the target. #[serde(alias="targetId")] pub target_id: String, - /// [Output Only] URL of the resource the operation is mutating. + /// [Output Only] URL of the resource the operation is mutating. #[serde(alias="targetLink")] pub target_link: String, - /// [Output Only] The time that this operation was started by the server. This is in RFC3339 text format. + /// [Output Only] The time that this operation was started by the server. This is in RFC3339 text format. #[serde(alias="startTime")] pub start_time: String, - /// [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project + /// [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project #[serde(alias="clientOperationId")] pub client_operation_id: String, - /// [Output Only] Creation timestamp in RFC3339 text format. + /// [Output Only] Creation timestamp in RFC3339 text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Type of the resource. Always compute#Operation for Operation resources. + /// [Output Only] Type of the resource. Always compute#Operation for Operation resources. pub kind: String, - /// [Output Only] Name of the resource. + /// [Output Only] Name of the resource. pub name: String, - /// [Output Only] URL of the zone where the operation resides. + /// [Output Only] URL of the zone where the operation resides. pub zone: String, - /// [Output Only] URL of the region where the operation resides. Only applicable for regional resources. + /// [Output Only] URL of the region where the operation resides. Only applicable for regional resources. pub region: String, - /// [Output Only] Server defined URL for the resource. + /// [Output Only] Server defined URL for the resource. #[serde(alias="selfLink")] pub self_link: String, - /// [Output Only] Type of the operation, such as insert, update, and delete. + /// [Output Only] Type of the operation, such as insert, update, and delete. #[serde(alias="operationType")] pub operation_type: String, - /// [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. + /// [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. #[serde(alias="httpErrorMessage")] pub http_error_message: String, - /// [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses. + /// [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses. pub progress: i32, - /// [Output Only] The time that this operation was completed. This is in RFC3339 text format. + /// [Output Only] The time that this operation was completed. This is in RFC3339 text format. #[serde(alias="endTime")] pub end_time: String, - /// [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404. + /// [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404. #[serde(alias="httpErrorStatusCode")] pub http_error_status_code: i32, - /// [Output Only] An optional textual description of the current status of the operation. + /// [Output Only] An optional textual description of the current status of the operation. #[serde(alias="statusMessage")] pub status_message: String, - /// [Output Only] User who requested the operation, for example: user@example.com. + /// [Output Only] User who requested the operation, for example: user@example.com. pub user: String, } @@ -2151,7 +2160,7 @@ impl ResponseResult for Operation {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Disk { - /// [Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING. + /// [Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING. pub status: Option, /// The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: /// - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot @@ -2159,12 +2168,12 @@ pub struct Disk { /// - global/snapshots/snapshot #[serde(alias="sourceSnapshot")] pub source_snapshot: Option, - /// An optional textual description of the resource; provided by the client when the resource is created. + /// An optional textual description of the resource; provided by the client when the resource is created. pub description: Option, - /// The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used. + /// The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used. #[serde(alias="sourceImageId")] pub source_image_id: Option, - /// Any applicable publicly visible licenses. + /// Any applicable publicly visible licenses. pub licenses: Option>, /// The source image used to create this disk. If the source image is deleted from the system, this field will not be set, even if an image with the same name has been re-created. /// @@ -2179,31 +2188,31 @@ pub struct Disk { /// where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases. #[serde(alias="sourceImage")] pub source_image: Option, - /// [Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used. + /// [Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used. #[serde(alias="sourceSnapshotId")] pub source_snapshot_id: Option, - /// [Output Only] Creation timestamp in RFC3339 text format. + /// [Output Only] Creation timestamp in RFC3339 text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: Option, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. pub name: Option, - /// [Output Only] Type of the resource. Always compute#disk for disks. + /// [Output Only] Type of the resource. Always compute#disk for disks. pub kind: Option, /// Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk. /// /// If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. #[serde(alias="sizeGb")] pub size_gb: Option, - /// [Output Only] URL of the zone where the disk resides. + /// [Output Only] URL of the zone where the disk resides. pub zone: Option, - /// URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created. + /// URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created. #[serde(alias="type")] pub type_: Option, - /// Internal use only. + /// Internal use only. pub options: Option, - /// [Output Only] Server-defined fully-qualified URL for this resource. + /// [Output Only] Server-defined fully-qualified URL for this resource. #[serde(alias="selfLink")] pub self_link: Option, } @@ -2224,16 +2233,16 @@ impl ResponseResult for Disk {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TargetHttpProxyList { - /// A token used to continue a truncated list request (output only). + /// A token used to continue a truncated list request (output only). #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of TargetHttpProxy resources. + /// A list of TargetHttpProxy resources. pub items: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -2252,15 +2261,15 @@ impl ResponseResult for TargetHttpProxyList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DeprecationStatus { - /// An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DELETED. + /// An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DELETED. pub deleted: Option, - /// An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DEPRECATED. + /// An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DEPRECATED. pub deprecated: Option, - /// The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. + /// The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. pub state: Option, - /// An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to OBSOLETE. + /// An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to OBSOLETE. pub obsolete: Option, - /// The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. + /// The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. pub replacement: Option, } @@ -2273,11 +2282,11 @@ impl RequestValue for DeprecationStatus {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DisksScopedListWarning { - /// [Output Only] Optional human-readable details for this warning. + /// [Output Only] Optional human-readable details for this warning. pub message: String, - /// [Output Only] The warning type identifier for this warning. + /// [Output Only] The warning type identifier for this warning. pub code: String, - /// [Output Only] Metadata for this warning in key: value format. + /// [Output Only] Metadata for this warning in key: value format. pub data: Vec, } @@ -2299,25 +2308,25 @@ impl Part for DisksScopedListWarning {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Network { - /// [Output Only] Type of the resource. Always compute#network for networks. + /// [Output Only] Type of the resource. Always compute#network for networks. pub kind: Option, - /// An optional textual description of the resource; provided by the client when the resource is created. + /// An optional textual description of the resource; provided by the client when the resource is created. pub description: Option, - /// The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created. + /// The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created. #[serde(alias="IPv4Range")] pub i_pv4_range: Option, - /// A gateway address for default routing to other networks. This value is read only and is selected by the Google Compute Engine, typically as the first usable address in the IPv4Range. + /// A gateway address for default routing to other networks. This value is read only and is selected by the Google Compute Engine, typically as the first usable address in the IPv4Range. #[serde(alias="gatewayIPv4")] pub gateway_i_pv4: Option, - /// [Output Only] Creation timestamp in RFC3339 text format. + /// [Output Only] Creation timestamp in RFC3339 text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: Option, - /// [Output Only] Server defined URL for the resource. + /// [Output Only] Server defined URL for the resource. #[serde(alias="selfLink")] pub self_link: Option, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. pub name: Option, } @@ -2338,28 +2347,28 @@ impl ResponseResult for Network {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Zone { - /// [Output Only] Status of the zone, either UP or DOWN. + /// [Output Only] Status of the zone, either UP or DOWN. pub status: String, - /// [Output Only] Type of the resource. Always kind#zone for zones. + /// [Output Only] Type of the resource. Always kind#zone for zones. pub kind: String, - /// [Output Only] Textual description of the resource. + /// [Output Only] Textual description of the resource. pub description: String, - /// [Output Only] Any scheduled maintenance windows for this zone. When the zone is in a maintenance window, all resources which reside in the zone will be unavailable. For more information, see Maintenance Windows + /// [Output Only] Any scheduled maintenance windows for this zone. When the zone is in a maintenance window, all resources which reside in the zone will be unavailable. For more information, see Maintenance Windows #[serde(alias="maintenanceWindows")] pub maintenance_windows: Vec, - /// [Output Only] The deprecation status associated with this zone. + /// [Output Only] The deprecation status associated with this zone. pub deprecated: DeprecationStatus, - /// [Output Only] Full URL reference to the region which hosts the zone. + /// [Output Only] Full URL reference to the region which hosts the zone. pub region: String, - /// [Output Only] Creation timestamp in RFC3339 text format. + /// [Output Only] Creation timestamp in RFC3339 text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for the resource. + /// [Output Only] Server defined URL for the resource. #[serde(alias="selfLink")] pub self_link: String, - /// [Output Only] Name of the resource. + /// [Output Only] Name of the resource. pub name: String, } @@ -2385,32 +2394,32 @@ impl ResponseResult for Zone {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ForwardingRule { - /// Type of the resource. + /// Type of the resource. pub kind: Option, - /// An optional textual description of the resource; provided by the client when the resource is created. + /// An optional textual description of the resource; provided by the client when the resource is created. pub description: Option, - /// Applicable only when 'IPProtocol' is 'TCP', 'UDP' or 'SCTP', only packets addressed to ports in the specified range will be forwarded to 'target'. If 'portRange' is left empty (default value), all ports are forwarded. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. + /// Applicable only when 'IPProtocol' is 'TCP', 'UDP' or 'SCTP', only packets addressed to ports in the specified range will be forwarded to 'target'. If 'portRange' is left empty (default value), all ports are forwarded. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. #[serde(alias="portRange")] pub port_range: Option, - /// URL of the region where the regional forwarding rule resides (output only). This field is not applicable to global forwarding rules. + /// URL of the region where the regional forwarding rule resides (output only). This field is not applicable to global forwarding rules. pub region: Option, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. pub name: Option, - /// Creation timestamp in RFC3339 text format (output only). + /// Creation timestamp in RFC3339 text format (output only). #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// The IP protocol to which this rule applies, valid options are 'TCP', 'UDP', 'ESP', 'AH' or 'SCTP'. + /// The IP protocol to which this rule applies, valid options are 'TCP', 'UDP', 'ESP', 'AH' or 'SCTP'. #[serde(alias="IPProtocol")] pub ip_protocol: Option, - /// Value of the reserved IP address that this forwarding rule is serving on behalf of. For global forwarding rules, the address must be a global IP; for regional forwarding rules, the address must live in the same region as the forwarding rule. If left empty (default value), an ephemeral IP from the same scope (global or regional) will be assigned. + /// Value of the reserved IP address that this forwarding rule is serving on behalf of. For global forwarding rules, the address must be a global IP; for regional forwarding rules, the address must live in the same region as the forwarding rule. If left empty (default value), an ephemeral IP from the same scope (global or regional) will be assigned. #[serde(alias="IPAddress")] pub ip_address: Option, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: Option, - /// Server defined URL for the resource (output only). + /// Server defined URL for the resource (output only). #[serde(alias="selfLink")] pub self_link: Option, - /// The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global TargetHttpProxy resource. + /// The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global TargetHttpProxy resource. pub target: Option, } @@ -2430,14 +2439,14 @@ impl ResponseResult for ForwardingRule {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccessConfig { - /// [Output Only] Type of the resource. Always compute#accessConfig for access configs. + /// [Output Only] Type of the resource. Always compute#accessConfig for access configs. pub kind: Option, - /// The type of configuration. The default and only option is ONE_TO_ONE_NAT. + /// The type of configuration. The default and only option is ONE_TO_ONE_NAT. #[serde(alias="type")] pub type_: Option, - /// Name of this access configuration. + /// Name of this access configuration. pub name: Option, - /// An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. + /// An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. #[serde(alias="natIP")] pub nat_ip: Option, } @@ -2456,7 +2465,7 @@ impl RequestValue for AccessConfig {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct UrlMapReference { - /// no description provided + /// no description provided #[serde(alias="urlMap")] pub url_map: Option, } @@ -2470,11 +2479,11 @@ impl RequestValue for UrlMapReference {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationErrorErrors { - /// [Output Only] An optional, human-readable error message. + /// [Output Only] An optional, human-readable error message. pub message: String, - /// [Output Only] The error type identifier for this error. + /// [Output Only] The error type identifier for this error. pub code: String, - /// [Output Only] Indicates the field in the request which caused the error. This property is optional. + /// [Output Only] Indicates the field in the request which caused the error. This property is optional. pub location: String, } @@ -2498,37 +2507,37 @@ impl Part for OperationErrorErrors {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct HttpHealthCheck { - /// Type of the resource. + /// Type of the resource. pub kind: Option, - /// An optional textual description of the resource; provided by the client when the resource is created. + /// An optional textual description of the resource; provided by the client when the resource is created. pub description: Option, - /// How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec. + /// How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec. #[serde(alias="timeoutSec")] pub timeout_sec: Option, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. pub name: Option, - /// How often (in seconds) to send a health check. The default value is 5 seconds. + /// How often (in seconds) to send a health check. The default value is 5 seconds. #[serde(alias="checkIntervalSec")] pub check_interval_sec: Option, - /// A so-far healthy VM will be marked unhealthy after this many consecutive failures. The default value is 2. + /// A so-far healthy VM will be marked unhealthy after this many consecutive failures. The default value is 2. #[serde(alias="unhealthyThreshold")] pub unhealthy_threshold: Option, - /// A so-far unhealthy VM will be marked healthy after this many consecutive successes. The default value is 2. + /// A so-far unhealthy VM will be marked healthy after this many consecutive successes. The default value is 2. #[serde(alias="healthyThreshold")] pub healthy_threshold: Option, - /// The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. + /// The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. pub host: Option, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: Option, - /// Creation timestamp in RFC3339 text format (output only). + /// Creation timestamp in RFC3339 text format (output only). #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// The TCP port number for the HTTP health check request. The default value is 80. + /// The TCP port number for the HTTP health check request. The default value is 80. pub port: Option, - /// Server defined URL for the resource (output only). + /// Server defined URL for the resource (output only). #[serde(alias="selfLink")] pub self_link: Option, - /// The request path of the HTTP health check request. The default value is "/". + /// The request path of the HTTP health check request. The default value is "/". #[serde(alias="requestPath")] pub request_path: Option, } @@ -2549,10 +2558,10 @@ impl ResponseResult for HttpHealthCheck {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UsageExportLocation { - /// The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This is just the bucket name, with no gs:// or https://storage.googleapis.com/ in front of it. + /// The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This is just the bucket name, with no gs:// or https://storage.googleapis.com/ in front of it. #[serde(alias="bucketName")] pub bucket_name: Option, - /// An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions. + /// An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions. #[serde(alias="reportNamePrefix")] pub report_name_prefix: Option, } @@ -2566,11 +2575,11 @@ impl RequestValue for UsageExportLocation {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AddressesScopedListWarning { - /// [Output Only] Optional human-readable details for this warning. + /// [Output Only] Optional human-readable details for this warning. pub message: String, - /// [Output Only] The warning type identifier for this warning. + /// [Output Only] The warning type identifier for this warning. pub code: String, - /// [Output Only] Metadata for this warning in key: value format. + /// [Output Only] Metadata for this warning in key: value format. pub data: Vec, } @@ -2584,7 +2593,7 @@ impl Part for AddressesScopedListWarning {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct HealthCheckReference { - /// no description provided + /// no description provided #[serde(alias="healthCheck")] pub health_check: String, } @@ -2603,9 +2612,9 @@ impl Part for HealthCheckReference {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TargetPoolInstanceHealth { - /// Type of resource. + /// Type of resource. pub kind: String, - /// no description provided + /// no description provided #[serde(alias="healthStatus")] pub health_status: Vec, } @@ -2619,9 +2628,9 @@ impl ResponseResult for TargetPoolInstanceHealth {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DiskTypesScopedListWarningData { - /// [Output Only] A key for the warning data. + /// [Output Only] A key for the warning data. pub key: String, - /// [Output Only] A warning data value corresponding to the key. + /// [Output Only] A warning data value corresponding to the key. pub value: String, } @@ -2640,16 +2649,16 @@ impl Part for DiskTypesScopedListWarningData {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InstanceAggregatedList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A map of scoped instance lists. + /// [Output Only] A map of scoped instance lists. pub items: HashMap, - /// [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources. + /// [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for this resource. + /// [Output Only] Server defined URL for this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -2670,41 +2679,41 @@ impl ResponseResult for InstanceAggregatedList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct MachineType { - /// [Output Only] The tumber of CPUs exposed to the instance. + /// [Output Only] The tumber of CPUs exposed to the instance. #[serde(alias="guestCpus")] pub guest_cpus: i32, - /// [Deprecated] This property is deprecated and will never be populated with any relevant values. + /// [Deprecated] This property is deprecated and will never be populated with any relevant values. #[serde(alias="imageSpaceGb")] pub image_space_gb: i32, - /// Type of the resource. + /// Type of the resource. pub kind: String, - /// [Output Only] An optional textual description of the resource. + /// [Output Only] An optional textual description of the resource. pub description: String, - /// [Output Only] The name of the zone where the machine type resides, such as us-central1-a. + /// [Output Only] The name of the zone where the machine type resides, such as us-central1-a. pub zone: String, - /// [Output Only] Maximum total persistent disks size (GB) allowed. + /// [Output Only] Maximum total persistent disks size (GB) allowed. #[serde(alias="maximumPersistentDisksSizeGb")] pub maximum_persistent_disks_size_gb: String, - /// [Output Only] The deprecation status associated with this machine type. + /// [Output Only] The deprecation status associated with this machine type. pub deprecated: DeprecationStatus, - /// [Output Only] Maximum persistent disks allowed. + /// [Output Only] Maximum persistent disks allowed. #[serde(alias="maximumPersistentDisks")] pub maximum_persistent_disks: i32, - /// [Output Only] The amount of physical memory available to the instance, defined in MB. + /// [Output Only] The amount of physical memory available to the instance, defined in MB. #[serde(alias="memoryMb")] pub memory_mb: i32, - /// [Output Only] List of extended scratch disks assigned to the instance. + /// [Output Only] List of extended scratch disks assigned to the instance. #[serde(alias="scratchDisks")] pub scratch_disks: Vec, - /// [Output Only] Creation timestamp in RFC3339 text format. + /// [Output Only] Creation timestamp in RFC3339 text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for the resource. + /// [Output Only] Server defined URL for the resource. #[serde(alias="selfLink")] pub self_link: String, - /// [Output Only] Name of the resource. + /// [Output Only] Name of the resource. pub name: String, } @@ -2718,11 +2727,11 @@ impl ResponseResult for MachineType {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationsScopedListWarning { - /// [Output Only] Optional human-readable details for this warning. + /// [Output Only] Optional human-readable details for this warning. pub message: String, - /// [Output Only] The warning type identifier for this warning. + /// [Output Only] The warning type identifier for this warning. pub code: String, - /// [Output Only] Metadata for this warning in key: value format. + /// [Output Only] Metadata for this warning in key: value format. pub data: Vec, } @@ -2741,9 +2750,9 @@ impl Part for OperationsScopedListWarning {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct BackendServiceGroupHealth { - /// Type of resource. + /// Type of resource. pub kind: String, - /// no description provided + /// no description provided #[serde(alias="healthStatus")] pub health_status: Vec, } @@ -2815,10 +2824,10 @@ impl RequestValue for DiskMoveRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AttachedDiskInitializeParams { - /// Specifies the size of the disk in base-2 GB. + /// Specifies the size of the disk in base-2 GB. #[serde(alias="diskSizeGb")] pub disk_size_gb: String, - /// Specifies the disk name. If not specified, the default is to use the name of the instance. + /// Specifies the disk name. If not specified, the default is to use the name of the instance. #[serde(alias="diskName")] pub disk_name: String, /// A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example: @@ -2853,15 +2862,15 @@ impl Part for AttachedDiskInitializeParams {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ZoneMaintenanceWindows { - /// [Output Only] Ending time of the maintenance window, in RFC3339 format. + /// [Output Only] Ending time of the maintenance window, in RFC3339 format. #[serde(alias="endTime")] pub end_time: String, - /// [Output Only] Textual description of the maintenance window. + /// [Output Only] Textual description of the maintenance window. pub description: String, - /// [Output Only] Starting time of the maintenance window, in RFC3339 format. + /// [Output Only] Starting time of the maintenance window, in RFC3339 format. #[serde(alias="beginTime")] pub begin_time: String, - /// [Output Only] Name of the maintenance window. + /// [Output Only] Name of the maintenance window. pub name: String, } @@ -2880,16 +2889,16 @@ impl Part for ZoneMaintenanceWindows {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InstanceList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A list of Instance resources. + /// [Output Only] A list of Instance resources. pub items: Vec, - /// [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources. + /// [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for this resource. + /// [Output Only] Server defined URL for this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -2925,16 +2934,16 @@ pub struct TargetPool { /// In case where 'failoverRatio' is not set or all the VMs in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy. #[serde(alias="failoverRatio")] pub failover_ratio: Option, - /// An optional textual description of the resource; provided by the client when the resource is created. + /// An optional textual description of the resource; provided by the client when the resource is created. pub description: Option, - /// URL of the region where the target pool resides (output only). + /// URL of the region where the target pool resides (output only). pub region: Option, - /// Type of the resource. + /// Type of the resource. pub kind: Option, - /// Sesssion affinity option, must be one of the following values: 'NONE': Connections from the same client IP may go to any VM in the pool; 'CLIENT_IP': Connections from the same client IP will go to the same VM in the pool while that VM remains healthy. 'CLIENT_IP_PROTO': Connections from the same client IP with the same IP protocol will go to the same VM in the pool while that VM remains healthy. + /// Sesssion affinity option, must be one of the following values: 'NONE': Connections from the same client IP may go to any VM in the pool; 'CLIENT_IP': Connections from the same client IP will go to the same VM in the pool while that VM remains healthy. 'CLIENT_IP_PROTO': Connections from the same client IP with the same IP protocol will go to the same VM in the pool while that VM remains healthy. #[serde(alias="sessionAffinity")] pub session_affinity: Option, - /// A list of resource URLs to the member VMs serving this pool. They must live in zones contained in the same region as this pool. + /// A list of resource URLs to the member VMs serving this pool. They must live in zones contained in the same region as this pool. pub instances: Option>, /// This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its 'failoverRatio' field is properly set to a value between [0, 1]. /// @@ -2943,18 +2952,18 @@ pub struct TargetPool { /// In case where 'failoverRatio' and 'backupPool' are not set, or all the VMs in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy. #[serde(alias="backupPool")] pub backup_pool: Option, - /// A list of URLs to the HttpHealthCheck resource. A member VM in this pool is considered healthy if and only if all specified health checks pass. An empty list means all member VMs will be considered healthy at all times. + /// A list of URLs to the HttpHealthCheck resource. A member VM in this pool is considered healthy if and only if all specified health checks pass. An empty list means all member VMs will be considered healthy at all times. #[serde(alias="healthChecks")] pub health_checks: Option>, - /// Creation timestamp in RFC3339 text format (output only). + /// Creation timestamp in RFC3339 text format (output only). #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: Option, - /// Server defined URL for the resource (output only). + /// Server defined URL for the resource (output only). #[serde(alias="selfLink")] pub self_link: Option, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. pub name: Option, } @@ -2969,9 +2978,9 @@ impl ResponseResult for TargetPool {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TargetPoolsScopedListWarningData { - /// [Output Only] A key for the warning data. + /// [Output Only] A key for the warning data. pub key: String, - /// [Output Only] A warning data value corresponding to the key. + /// [Output Only] A warning data value corresponding to the key. pub value: String, } @@ -2985,9 +2994,9 @@ impl Part for TargetPoolsScopedListWarningData {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InstancesScopedList { - /// [Output Only] List of instances contained in this scope. + /// [Output Only] List of instances contained in this scope. pub instances: Vec, - /// [Output Only] Informational warning which replaces the list of instances when the list is empty. + /// [Output Only] Informational warning which replaces the list of instances when the list is empty. pub warning: InstancesScopedListWarning, } @@ -3008,27 +3017,27 @@ impl Part for InstancesScopedList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Address { - /// [Output Only] The status of the address, which can be either IN_USE or RESERVED. An address that is RESERVED is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available. + /// [Output Only] The status of the address, which can be either IN_USE or RESERVED. An address that is RESERVED is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available. pub status: Option, - /// [Output Only] Type of the resource. Always compute#address for addresses. + /// [Output Only] Type of the resource. Always compute#address for addresses. pub kind: Option, - /// An optional textual description of the resource; provided by the client when the resource is created. + /// An optional textual description of the resource; provided by the client when the resource is created. pub description: Option, - /// [Output Only] URL of the region where the regional address resides. This field is not applicable to global addresses. + /// [Output Only] URL of the region where the regional address resides. This field is not applicable to global addresses. pub region: Option, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. pub name: Option, - /// The static external IP address represented by this resource. + /// The static external IP address represented by this resource. pub address: Option, - /// [Output Only] Creation timestamp in RFC3339 text format. + /// [Output Only] Creation timestamp in RFC3339 text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: Option, - /// [Output Only] Server defined URL for the resource. + /// [Output Only] Server defined URL for the resource. #[serde(alias="selfLink")] pub self_link: Option, - /// [Output Only] The URLs of the resources that are using this address. + /// [Output Only] The URLs of the resources that are using this address. pub users: Option>, } @@ -3042,7 +3051,7 @@ impl ResponseResult for Address {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationError { - /// [Output Only] The array of errors encountered while processing this operation. + /// [Output Only] The array of errors encountered while processing this operation. pub errors: Vec, } @@ -3056,7 +3065,7 @@ impl Part for OperationError {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FirewallAllowed { - /// The IP protocol that is allowed for this rule. The protocol type is required when creating a firewall. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp), or the IP protocol number. + /// The IP protocol that is allowed for this rule. The protocol type is required when creating a firewall. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp), or the IP protocol number. #[serde(alias="IPProtocol")] pub ip_protocol: String, /// An optional list of ports which are allowed. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, connections through any port are allowed @@ -3080,7 +3089,7 @@ impl Part for FirewallAllowed {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct TargetPoolsAddHealthCheckRequest { - /// Health check URLs to be added to targetPool. + /// Health check URLs to be added to targetPool. #[serde(alias="healthChecks")] pub health_checks: Option>, } @@ -3099,16 +3108,16 @@ impl RequestValue for TargetPoolsAddHealthCheckRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct NetworkList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A list of Network resources. + /// [Output Only] A list of Network resources. pub items: Vec, - /// [Output Only] Type of resource. Always compute#networkList for lists of networks. + /// [Output Only] Type of resource. Always compute#networkList for lists of networks. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for this resource . + /// [Output Only] Server defined URL for this resource . #[serde(alias="selfLink")] pub self_link: String, } @@ -3127,16 +3136,16 @@ impl ResponseResult for NetworkList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ZoneList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A list of Zone resources. + /// [Output Only] A list of Zone resources. pub items: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -3150,11 +3159,11 @@ impl ResponseResult for ZoneList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct MachineTypesScopedListWarning { - /// [Output Only] Optional human-readable details for this warning. + /// [Output Only] Optional human-readable details for this warning. pub message: String, - /// [Output Only] The warning type identifier for this warning. + /// [Output Only] The warning type identifier for this warning. pub code: String, - /// [Output Only] Metadata for this warning in key: value format. + /// [Output Only] Metadata for this warning in key: value format. pub data: Vec, } @@ -3173,7 +3182,7 @@ impl Part for MachineTypesScopedListWarning {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct InstanceReference { - /// no description provided + /// no description provided pub instance: Option, } @@ -3191,16 +3200,16 @@ impl RequestValue for InstanceReference {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InstanceTemplateList { - /// A token used to continue a truncated list request (output only). + /// A token used to continue a truncated list request (output only). #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of InstanceTemplate resources. + /// A list of InstanceTemplate resources. pub items: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -3219,16 +3228,16 @@ impl ResponseResult for InstanceTemplateList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TargetInstanceList { - /// A token used to continue a truncated list request (output only). + /// A token used to continue a truncated list request (output only). #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of TargetInstance resources. + /// A list of TargetInstance resources. pub items: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -3247,16 +3256,16 @@ impl ResponseResult for TargetInstanceList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct HttpHealthCheckList { - /// A token used to continue a truncated list request (output only). + /// A token used to continue a truncated list request (output only). #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of HttpHealthCheck resources. + /// A list of HttpHealthCheck resources. pub items: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -3275,14 +3284,14 @@ impl ResponseResult for HttpHealthCheckList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct License { - /// If true, the customer will be charged license fee for running software that contains this license on an instance. + /// If true, the customer will be charged license fee for running software that contains this license on an instance. #[serde(alias="chargesUseFee")] pub charges_use_fee: bool, - /// [Output Only] Type of resource. Always compute#license for licenses. + /// [Output Only] Type of resource. Always compute#license for licenses. pub kind: String, - /// Name of the resource. The name must be 1-63 characters long, and comply with RCF1035. + /// Name of the resource. The name must be 1-63 characters long, and comply with RCF1035. pub name: String, - /// [Output Only] Server defined URL for the resource. + /// [Output Only] Server defined URL for the resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -3307,30 +3316,30 @@ pub struct AttachedDisk { /// If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks. #[serde(alias="deviceName")] pub device_name: Option, - /// [Output Only] Type of the resource. Always compute#attachedDisk for attached disks. + /// [Output Only] Type of the resource. Always compute#attachedDisk for attached disks. pub kind: Option, /// [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. /// /// This property is mutually exclusive with the source property; you can only define one or the other, but not both. #[serde(alias="initializeParams")] pub initialize_params: Option, - /// Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). + /// Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). #[serde(alias="autoDelete")] pub auto_delete: Option, - /// Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value. + /// Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value. pub index: Option, - /// Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. + /// Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. pub boot: Option, - /// no description provided + /// no description provided pub interface: Option, - /// The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. + /// The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. pub mode: Option, - /// [Output Only] Any valid publicly visible licenses. + /// [Output Only] Any valid publicly visible licenses. pub licenses: Option>, - /// Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. + /// Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. #[serde(alias="type")] pub type_: Option, - /// Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks. + /// Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks. pub source: Option, } @@ -3343,11 +3352,11 @@ impl RequestValue for AttachedDisk {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Quota { - /// [Output Only] Current usage of this metric. + /// [Output Only] Current usage of this metric. pub usage: f64, - /// [Output Only] Name of the quota metric. + /// [Output Only] Name of the quota metric. pub metric: String, - /// [Output Only] Quota limit for this metric. + /// [Output Only] Quota limit for this metric. pub limit: f64, } @@ -3368,42 +3377,42 @@ impl Part for Quota {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Route { - /// The URL to a gateway that should handle matching packets. + /// The URL to a gateway that should handle matching packets. #[serde(alias="nextHopGateway")] pub next_hop_gateway: Option, - /// The URL of the local network if it should handle matching packets. + /// The URL of the local network if it should handle matching packets. #[serde(alias="nextHopNetwork")] pub next_hop_network: Option, - /// Type of the resource. + /// Type of the resource. pub kind: Option, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. pub name: Option, - /// A list of instance tags to which this route applies. + /// A list of instance tags to which this route applies. pub tags: Option>, - /// The URL to an instance that should handle matching packets. + /// The URL to an instance that should handle matching packets. #[serde(alias="nextHopInstance")] pub next_hop_instance: Option, - /// If potential misconfigurations are detected for this route, this field will be populated with warning messages. + /// If potential misconfigurations are detected for this route, this field will be populated with warning messages. pub warnings: Option>, - /// Breaks ties between Routes of equal specificity. Routes with smaller values win when tied with routes with larger values. + /// Breaks ties between Routes of equal specificity. Routes with smaller values win when tied with routes with larger values. pub priority: Option, - /// The network IP address of an instance that should handle matching packets. + /// The network IP address of an instance that should handle matching packets. #[serde(alias="nextHopIp")] pub next_hop_ip: Option, - /// An optional textual description of the resource; provided by the client when the resource is created. + /// An optional textual description of the resource; provided by the client when the resource is created. pub description: Option, - /// Which packets does this route apply to? + /// Which packets does this route apply to? #[serde(alias="destRange")] pub dest_range: Option, - /// Creation timestamp in RFC3339 text format (output only). + /// Creation timestamp in RFC3339 text format (output only). #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: Option, - /// Server defined URL for the resource (output only). + /// Server defined URL for the resource (output only). #[serde(alias="selfLink")] pub self_link: Option, - /// URL of the network to which this route is applied; provided by the client when the route is created. + /// URL of the network to which this route is applied; provided by the client when the route is created. pub network: Option, } @@ -3418,11 +3427,11 @@ impl ResponseResult for Route {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TargetInstancesScopedListWarning { - /// [Output Only] Optional human-readable details for this warning. + /// [Output Only] Optional human-readable details for this warning. pub message: String, - /// [Output Only] The warning type identifier for this warning. + /// [Output Only] The warning type identifier for this warning. pub code: String, - /// [Output Only] Metadata for this warning in key: value format. + /// [Output Only] Metadata for this warning in key: value format. pub data: Vec, } @@ -3443,7 +3452,7 @@ impl Part for TargetInstancesScopedListWarning {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct TargetReference { - /// no description provided + /// no description provided pub target: Option, } @@ -3456,13 +3465,13 @@ impl RequestValue for TargetReference {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct NetworkInterface { - /// An array of configurations for this interface. Currently, , - /// [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface. + /// [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface. #[serde(alias="networkIP")] pub network_ip: String, - /// [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc. + /// [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc. pub name: String, /// URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used: /// @@ -3489,16 +3498,16 @@ impl Part for NetworkInterface {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ForwardingRuleAggregatedList { - /// A token used to continue a truncated list request (output only). + /// A token used to continue a truncated list request (output only). #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A map of scoped forwarding rule lists. + /// A map of scoped forwarding rule lists. pub items: HashMap, - /// Type of resource. + /// Type of resource. pub kind: String, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -3512,14 +3521,14 @@ impl ResponseResult for ForwardingRuleAggregatedList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TestFailure { - /// no description provided + /// no description provided pub path: String, - /// no description provided + /// no description provided #[serde(alias="actualService")] pub actual_service: String, - /// no description provided + /// no description provided pub host: String, - /// no description provided + /// no description provided #[serde(alias="expectedService")] pub expected_service: String, } @@ -3533,7 +3542,7 @@ impl Part for TestFailure {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct MachineTypeScratchDisks { - /// Size of the scratch disk, defined in GB. + /// Size of the scratch disk, defined in GB. #[serde(alias="diskGb")] pub disk_gb: i32, } @@ -3553,16 +3562,16 @@ impl Part for MachineTypeScratchDisks {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TargetPoolAggregatedList { - /// A token used to continue a truncated list request (output only). + /// A token used to continue a truncated list request (output only). #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A map of scoped target pool lists. + /// A map of scoped target pool lists. pub items: HashMap, - /// Type of resource. + /// Type of resource. pub kind: String, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -3576,10 +3585,10 @@ impl ResponseResult for TargetPoolAggregatedList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TargetInstancesScopedList { - /// List of target instances contained in this scope. + /// List of target instances contained in this scope. #[serde(alias="targetInstances")] pub target_instances: Vec, - /// Informational warning which replaces the list of addresses when the list is empty. + /// Informational warning which replaces the list of addresses when the list is empty. pub warning: TargetInstancesScopedListWarning, } @@ -3603,32 +3612,32 @@ impl Part for TargetInstancesScopedList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UrlMap { - /// Type of the resource. + /// Type of the resource. pub kind: Option, - /// An optional textual description of the resource; provided by the client when the resource is created. + /// An optional textual description of the resource; provided by the client when the resource is created. pub description: Option, - /// The URL of the BackendService resource if none of the hostRules match. + /// The URL of the BackendService resource if none of the hostRules match. #[serde(alias="defaultService")] pub default_service: Option, - /// The list of expected URL mappings. Request to update this UrlMap will succeed only all of the test cases pass. + /// The list of expected URL mappings. Request to update this UrlMap will succeed only all of the test cases pass. pub tests: Option>, - /// The list of HostRules to use against the URL. + /// The list of HostRules to use against the URL. #[serde(alias="hostRules")] pub host_rules: Option>, - /// Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap. + /// Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap. pub fingerprint: Option, - /// The list of named PathMatchers to use against the URL. + /// The list of named PathMatchers to use against the URL. #[serde(alias="pathMatchers")] pub path_matchers: Option>, - /// Creation timestamp in RFC3339 text format (output only). + /// Creation timestamp in RFC3339 text format (output only). #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: Option, - /// Server defined URL for the resource (output only). + /// Server defined URL for the resource (output only). #[serde(alias="selfLink")] pub self_link: Option, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. pub name: Option, } @@ -3643,9 +3652,9 @@ impl ResponseResult for UrlMap {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RouteWarningsData { - /// [Output Only] A key for the warning data. + /// [Output Only] A key for the warning data. pub key: String, - /// [Output Only] A warning data value corresponding to the key. + /// [Output Only] A warning data value corresponding to the key. pub value: String, } @@ -3664,16 +3673,16 @@ impl Part for RouteWarningsData {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct RouteList { - /// A token used to continue a truncated list request (output only). + /// A token used to continue a truncated list request (output only). #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of Route resources. + /// A list of Route resources. pub items: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -3692,7 +3701,7 @@ impl ResponseResult for RouteList {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct TargetPoolsRemoveInstanceRequest { - /// URLs of the instances to be removed from targetPool. + /// URLs of the instances to be removed from targetPool. pub instances: Option>, } @@ -3710,16 +3719,16 @@ impl RequestValue for TargetPoolsRemoveInstanceRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TargetPoolList { - /// A token used to continue a truncated list request (output only). + /// A token used to continue a truncated list request (output only). #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of TargetPool resources. + /// A list of TargetPool resources. pub items: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -3733,27 +3742,27 @@ impl ResponseResult for TargetPoolList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct InstanceProperties { - /// Allows instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false. + /// Allows instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false. #[serde(alias="canIpForward")] pub can_ip_forward: bool, - /// An optional textual description for the instances created based on the instance template resource; provided by the client when the template is created. + /// An optional textual description for the instances created based on the instance template resource; provided by the client when the template is created. pub description: String, - /// A list of tags to be applied to the instances created based on this template used to identify valid sources or targets for network firewalls. Provided by the client on instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. + /// A list of tags to be applied to the instances created based on this template used to identify valid sources or targets for network firewalls. Provided by the client on instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. pub tags: Tags, - /// Array of disks associated with instance created based on this template. + /// Array of disks associated with instance created based on this template. pub disks: Vec, - /// Scheduling options for the instances created based on this template. + /// Scheduling options for the instances created based on this template. pub scheduling: Scheduling, - /// Name of the machine type resource describing which machine type to use to host the instances created based on this template; provided by the client when the instance template is created. + /// Name of the machine type resource describing which machine type to use to host the instances created based on this template; provided by the client when the instance template is created. #[serde(alias="machineType")] pub machine_type: String, - /// A list of service accounts each with specified scopes, for which access tokens are to be made available to the instances created based on this template, through metadata queries. + /// A list of service accounts each with specified scopes, for which access tokens are to be made available to the instances created based on this template, through metadata queries. #[serde(alias="serviceAccounts")] pub service_accounts: Vec, - /// Array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instances created based based on this template will have no external internet access. + /// Array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instances created based based on this template will have no external internet access. #[serde(alias="networkInterfaces")] pub network_interfaces: Vec, - /// Metadata key/value pairs assigned to instances created based on this template. Consists of custom metadata or predefined keys; see Instance documentation for more information. + /// Metadata key/value pairs assigned to instances created based on this template. Consists of custom metadata or predefined keys; see Instance documentation for more information. pub metadata: Metadata, } @@ -3771,7 +3780,7 @@ impl Part for InstanceProperties {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct TargetPoolsRemoveHealthCheckRequest { - /// Health check URLs to be removed from targetPool. + /// Health check URLs to be removed from targetPool. #[serde(alias="healthChecks")] pub health_checks: Option>, } @@ -3785,9 +3794,9 @@ impl RequestValue for TargetPoolsRemoveHealthCheckRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DisksScopedList { - /// [Output Only] List of disks contained in this scope. + /// [Output Only] List of disks contained in this scope. pub disks: Vec, - /// [Output Only] Informational warning which replaces the list of disks when the list is empty. + /// [Output Only] Informational warning which replaces the list of disks when the list is empty. pub warning: DisksScopedListWarning, } @@ -3809,26 +3818,26 @@ impl Part for DisksScopedList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Image { - /// [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY. + /// [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY. pub status: Option, - /// [Output Only] Type of the resource. Always compute#image for images. + /// [Output Only] Type of the resource. Always compute#image for images. pub kind: Option, - /// Textual description of the resource; provided by the client when the resource is created. + /// Textual description of the resource; provided by the client when the resource is created. pub description: Option, - /// The parameters of the raw disk image. + /// The parameters of the raw disk image. #[serde(alias="rawDisk")] pub raw_disk: Option, - /// The deprecation status associated with this image. + /// The deprecation status associated with this image. pub deprecated: Option, - /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + /// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. pub name: Option, - /// Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). + /// Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). #[serde(alias="archiveSizeBytes")] pub archive_size_bytes: Option, - /// The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name. + /// The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name. #[serde(alias="sourceDiskId")] pub source_disk_id: Option, - /// Size of the image when restored onto a persistent disk (in GB). + /// Size of the image when restored onto a persistent disk (in GB). #[serde(alias="diskSizeGb")] pub disk_size_gb: Option, /// URL of the The source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values: @@ -3837,17 +3846,17 @@ pub struct Image { /// - zones/zone/disks/disk #[serde(alias="sourceDisk")] pub source_disk: Option, - /// Any applicable publicly visible licenses. + /// Any applicable publicly visible licenses. pub licenses: Option>, - /// [Output Only] Creation timestamp in RFC3339 text format. + /// [Output Only] Creation timestamp in RFC3339 text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: Option, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: Option, - /// [Output Only] Server defined URL for the resource. + /// [Output Only] Server defined URL for the resource. #[serde(alias="selfLink")] pub self_link: Option, - /// The type of the image used to create this disk. The default and only value is RAW + /// The type of the image used to create this disk. The default and only value is RAW #[serde(alias="sourceType")] pub source_type: Option, } @@ -3868,16 +3877,16 @@ impl ResponseResult for Image {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DiskList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A list of persistent disks. + /// [Output Only] A list of persistent disks. pub items: Vec, - /// [Output Only] Type of resource. Always compute#diskList for lists of disks. + /// [Output Only] Type of resource. Always compute#diskList for lists of disks. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for this resource. + /// [Output Only] Server defined URL for this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -3891,12 +3900,12 @@ impl ResponseResult for DiskList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ImageRawDisk { - /// The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created. + /// The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created. #[serde(alias="containerType")] pub container_type: String, - /// The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both. + /// The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both. pub source: String, - /// An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created. + /// An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created. #[serde(alias="sha1Checksum")] pub sha1_checksum: String, } @@ -3911,9 +3920,9 @@ impl Part for ImageRawDisk {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationsScopedListWarningData { - /// [Output Only] A key for the warning data. + /// [Output Only] A key for the warning data. pub key: String, - /// [Output Only] A warning data value corresponding to the key. + /// [Output Only] A warning data value corresponding to the key. pub value: String, } @@ -3932,16 +3941,16 @@ impl Part for OperationsScopedListWarningData {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct BackendServiceList { - /// A token used to continue a truncated list request (output only). + /// A token used to continue a truncated list request (output only). #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A list of BackendService resources. + /// A list of BackendService resources. pub items: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: String, - /// Server defined URL for this resource (output only). + /// Server defined URL for this resource (output only). #[serde(alias="selfLink")] pub self_link: String, } @@ -3955,9 +3964,9 @@ impl ResponseResult for BackendServiceList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AddressesScopedListWarningData { - /// [Output Only] A key for the warning data. + /// [Output Only] A key for the warning data. pub key: String, - /// [Output Only] A warning data value corresponding to the key. + /// [Output Only] A warning data value corresponding to the key. pub value: String, } @@ -3971,11 +3980,11 @@ impl Part for AddressesScopedListWarningData {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RouteWarnings { - /// [Output Only] Optional human-readable details for this warning. + /// [Output Only] Optional human-readable details for this warning. pub message: String, - /// [Output Only] The warning type identifier for this warning. + /// [Output Only] The warning type identifier for this warning. pub code: String, - /// [Output Only] Metadata for this warning in key: value format. + /// [Output Only] Metadata for this warning in key: value format. pub data: Vec, } @@ -3994,10 +4003,10 @@ impl Part for RouteWarnings {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Scheduling { - /// Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). + /// Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). #[serde(alias="automaticRestart")] pub automatic_restart: Option, - /// Defines the maintenance behavior for this instance. The default behavior is MIGRATE. For more information, see Setting maintenance behavior. + /// Defines the maintenance behavior for this instance. The default behavior is MIGRATE. For more information, see Setting maintenance behavior. #[serde(alias="onHostMaintenance")] pub on_host_maintenance: Option, } @@ -4011,9 +4020,9 @@ impl RequestValue for Scheduling {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TargetPoolsScopedList { - /// Informational warning which replaces the list of addresses when the list is empty. + /// Informational warning which replaces the list of addresses when the list is empty. pub warning: TargetPoolsScopedListWarning, - /// List of target pools contained in this scope. + /// List of target pools contained in this scope. #[serde(alias="targetPools")] pub target_pools: Vec, } @@ -4032,16 +4041,16 @@ impl Part for TargetPoolsScopedList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct RegionList { - /// [Output Only] A token used to continue a truncated list request. + /// [Output Only] A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// [Output Only] A list of Region resources. + /// [Output Only] A list of Region resources. pub items: Vec, - /// [Output Only] Type of resource. Always compute#regionList for lists of regions. + /// [Output Only] Type of resource. Always compute#regionList for lists of regions. pub kind: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Server defined URL for this resource. + /// [Output Only] Server defined URL for this resource. #[serde(alias="selfLink")] pub self_link: String, } @@ -4055,23 +4064,23 @@ impl ResponseResult for RegionList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Backend { - /// The multiplier (a value between 0 and 1e6) of the max capacity (CPU or RPS, depending on 'balancingMode') the group should serve up to. 0 means the group is totally drained. Default value is 1. Valid range is [0, 1e6]. + /// The multiplier (a value between 0 and 1e6) of the max capacity (CPU or RPS, depending on 'balancingMode') the group should serve up to. 0 means the group is totally drained. Default value is 1. Valid range is [0, 1e6]. #[serde(alias="capacityScaler")] pub capacity_scaler: f32, - /// The max RPS of the group. Can be used with either balancing mode, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set. + /// The max RPS of the group. Can be used with either balancing mode, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set. #[serde(alias="maxRate")] pub max_rate: i32, - /// URL of a zonal Cloud Resource View resource. This resource view defines the list of instances that serve traffic. Member virtual machine instances from each resource view must live in the same zone as the resource view itself. No two backends in a backend service are allowed to use same Resource View resource. + /// URL of a zonal Cloud Resource View resource. This resource view defines the list of instances that serve traffic. Member virtual machine instances from each resource view must live in the same zone as the resource view itself. No two backends in a backend service are allowed to use same Resource View resource. pub group: String, - /// An optional textual description of the resource, which is provided by the client when the resource is created. + /// An optional textual description of the resource, which is provided by the client when the resource is created. pub description: String, - /// Used when 'balancingMode' is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0, 1]. + /// Used when 'balancingMode' is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0, 1]. #[serde(alias="maxUtilization")] pub max_utilization: f32, - /// The max RPS that a single backed instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. + /// The max RPS that a single backed instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. #[serde(alias="maxRatePerInstance")] pub max_rate_per_instance: f32, - /// The balancing mode of this backend, default is UTILIZATION. + /// The balancing mode of this backend, default is UTILIZATION. #[serde(alias="balancingMode")] pub balancing_mode: String, } @@ -4118,13 +4127,19 @@ pub struct DiskMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for DiskMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for DiskMethods<'a, C, NC, A> {} impl<'a, C, NC, A> DiskMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified persistent disk. + /// Deletes the specified persistent disk. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `disk` - Name of the persistent disk to delete. pub fn delete(&self, project: &str, zone: &str, disk: &str) -> DiskDeleteCall<'a, C, NC, A> { DiskDeleteCall { hub: self.hub, @@ -4139,7 +4154,11 @@ impl<'a, C, NC, A> DiskMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of disks grouped by scope. + /// Retrieves the list of disks grouped by scope. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. pub fn aggregated_list(&self, project: &str) -> DiskAggregatedListCall<'a, C, NC, A> { DiskAggregatedListCall { hub: self.hub, @@ -4155,7 +4174,12 @@ impl<'a, C, NC, A> DiskMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of persistent disks contained within the specified zone. + /// Retrieves the list of persistent disks contained within the specified zone. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. pub fn list(&self, project: &str, zone: &str) -> DiskListCall<'a, C, NC, A> { DiskListCall { hub: self.hub, @@ -4172,7 +4196,13 @@ impl<'a, C, NC, A> DiskMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a persistent disk in the specified project using the data included in the request. + /// Creates a persistent disk in the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. pub fn insert(&self, request: &Disk, project: &str, zone: &str) -> DiskInsertCall<'a, C, NC, A> { DiskInsertCall { hub: self.hub, @@ -4188,7 +4218,14 @@ impl<'a, C, NC, A> DiskMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a snapshot of this disk. + /// Creates a snapshot of this disk. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `disk` - Name of the persistent disk to snapshot. pub fn create_snapshot(&self, request: &Snapshot, project: &str, zone: &str, disk: &str) -> DiskCreateSnapshotCall<'a, C, NC, A> { DiskCreateSnapshotCall { hub: self.hub, @@ -4204,7 +4241,13 @@ impl<'a, C, NC, A> DiskMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns a specified persistent disk. + /// Returns a specified persistent disk. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `disk` - Name of the persistent disk to return. pub fn get(&self, project: &str, zone: &str, disk: &str) -> DiskGetCall<'a, C, NC, A> { DiskGetCall { hub: self.hub, @@ -4254,13 +4297,18 @@ pub struct AddresseMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AddresseMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AddresseMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AddresseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of address resources contained within the specified region. + /// Retrieves the list of address resources contained within the specified region. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `region` - The name of the region for this request. pub fn list(&self, project: &str, region: &str) -> AddresseListCall<'a, C, NC, A> { AddresseListCall { hub: self.hub, @@ -4277,7 +4325,11 @@ impl<'a, C, NC, A> AddresseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of addresses grouped by scope. + /// Retrieves the list of addresses grouped by scope. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. pub fn aggregated_list(&self, project: &str) -> AddresseAggregatedListCall<'a, C, NC, A> { AddresseAggregatedListCall { hub: self.hub, @@ -4293,7 +4345,13 @@ impl<'a, C, NC, A> AddresseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified address resource. + /// Returns the specified address resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `region` - The name of the region for this request. + /// * `address` - Name of the address resource to return. pub fn get(&self, project: &str, region: &str, address: &str) -> AddresseGetCall<'a, C, NC, A> { AddresseGetCall { hub: self.hub, @@ -4308,7 +4366,13 @@ impl<'a, C, NC, A> AddresseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates an address resource in the specified project using the data included in the request. + /// Creates an address resource in the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. + /// * `region` - The name of the region for this request. pub fn insert(&self, request: &Address, project: &str, region: &str) -> AddresseInsertCall<'a, C, NC, A> { AddresseInsertCall { hub: self.hub, @@ -4323,7 +4387,13 @@ impl<'a, C, NC, A> AddresseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified address resource. + /// Deletes the specified address resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `region` - The name of the region for this request. + /// * `address` - Name of the address resource to delete. pub fn delete(&self, project: &str, region: &str, address: &str) -> AddresseDeleteCall<'a, C, NC, A> { AddresseDeleteCall { hub: self.hub, @@ -4373,13 +4443,18 @@ pub struct UrlMapMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for UrlMapMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for UrlMapMethods<'a, C, NC, A> {} impl<'a, C, NC, A> UrlMapMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a UrlMap resource in the specified project using the data included in the request. + /// Creates a UrlMap resource in the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. pub fn insert(&self, request: &UrlMap, project: &str) -> UrlMapInsertCall<'a, C, NC, A> { UrlMapInsertCall { hub: self.hub, @@ -4393,7 +4468,12 @@ impl<'a, C, NC, A> UrlMapMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified UrlMap resource. + /// Returns the specified UrlMap resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `urlMap` - Name of the UrlMap resource to return. pub fn get(&self, project: &str, url_map: &str) -> UrlMapGetCall<'a, C, NC, A> { UrlMapGetCall { hub: self.hub, @@ -4407,7 +4487,13 @@ impl<'a, C, NC, A> UrlMapMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Run static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. + /// Run static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. + /// * `urlMap` - Name of the UrlMap resource to be validated as. pub fn validate(&self, request: &UrlMapsValidateRequest, project: &str, url_map: &str) -> UrlMapValidateCall<'a, C, NC, A> { UrlMapValidateCall { hub: self.hub, @@ -4422,7 +4508,11 @@ impl<'a, C, NC, A> UrlMapMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of UrlMap resources available to the specified project. + /// Retrieves the list of UrlMap resources available to the specified project. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. pub fn list(&self, project: &str) -> UrlMapListCall<'a, C, NC, A> { UrlMapListCall { hub: self.hub, @@ -4438,7 +4528,13 @@ impl<'a, C, NC, A> UrlMapMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update the entire content of the UrlMap resource. This method supports patch semantics. + /// Update the entire content of the UrlMap resource. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. + /// * `urlMap` - Name of the UrlMap resource to update. pub fn patch(&self, request: &UrlMap, project: &str, url_map: &str) -> UrlMapPatchCall<'a, C, NC, A> { UrlMapPatchCall { hub: self.hub, @@ -4453,7 +4549,13 @@ impl<'a, C, NC, A> UrlMapMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update the entire content of the UrlMap resource. + /// Update the entire content of the UrlMap resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. + /// * `urlMap` - Name of the UrlMap resource to update. pub fn update(&self, request: &UrlMap, project: &str, url_map: &str) -> UrlMapUpdateCall<'a, C, NC, A> { UrlMapUpdateCall { hub: self.hub, @@ -4468,7 +4570,12 @@ impl<'a, C, NC, A> UrlMapMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified UrlMap resource. + /// Deletes the specified UrlMap resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `urlMap` - Name of the UrlMap resource to delete. pub fn delete(&self, project: &str, url_map: &str) -> UrlMapDeleteCall<'a, C, NC, A> { UrlMapDeleteCall { hub: self.hub, @@ -4517,13 +4624,18 @@ pub struct GlobalAddresseMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for GlobalAddresseMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for GlobalAddresseMethods<'a, C, NC, A> {} impl<'a, C, NC, A> GlobalAddresseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates an address resource in the specified project using the data included in the request. + /// Creates an address resource in the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. pub fn insert(&self, request: &Address, project: &str) -> GlobalAddresseInsertCall<'a, C, NC, A> { GlobalAddresseInsertCall { hub: self.hub, @@ -4537,7 +4649,11 @@ impl<'a, C, NC, A> GlobalAddresseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of global address resources. + /// Retrieves the list of global address resources. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. pub fn list(&self, project: &str) -> GlobalAddresseListCall<'a, C, NC, A> { GlobalAddresseListCall { hub: self.hub, @@ -4553,7 +4669,12 @@ impl<'a, C, NC, A> GlobalAddresseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified address resource. + /// Returns the specified address resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `address` - Name of the address resource to return. pub fn get(&self, project: &str, address: &str) -> GlobalAddresseGetCall<'a, C, NC, A> { GlobalAddresseGetCall { hub: self.hub, @@ -4567,7 +4688,12 @@ impl<'a, C, NC, A> GlobalAddresseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified address resource. + /// Deletes the specified address resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `address` - Name of the address resource to delete. pub fn delete(&self, project: &str, address: &str) -> GlobalAddresseDeleteCall<'a, C, NC, A> { GlobalAddresseDeleteCall { hub: self.hub, @@ -4616,13 +4742,18 @@ pub struct SnapshotMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for SnapshotMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for SnapshotMethods<'a, C, NC, A> {} impl<'a, C, NC, A> SnapshotMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified persistent disk snapshot resource. + /// Returns the specified persistent disk snapshot resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `snapshot` - Name of the persistent disk snapshot resource to return. pub fn get(&self, project: &str, snapshot: &str) -> SnapshotGetCall<'a, C, NC, A> { SnapshotGetCall { hub: self.hub, @@ -4636,7 +4767,11 @@ impl<'a, C, NC, A> SnapshotMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of persistent disk snapshot resources contained within the specified project. + /// Retrieves the list of persistent disk snapshot resources contained within the specified project. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. pub fn list(&self, project: &str) -> SnapshotListCall<'a, C, NC, A> { SnapshotListCall { hub: self.hub, @@ -4652,7 +4787,12 @@ impl<'a, C, NC, A> SnapshotMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified persistent disk snapshot resource. + /// Deletes the specified persistent disk snapshot resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `snapshot` - Name of the persistent disk snapshot resource to delete. pub fn delete(&self, project: &str, snapshot: &str) -> SnapshotDeleteCall<'a, C, NC, A> { SnapshotDeleteCall { hub: self.hub, @@ -4701,13 +4841,19 @@ pub struct DiskTypeMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for DiskTypeMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for DiskTypeMethods<'a, C, NC, A> {} impl<'a, C, NC, A> DiskTypeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified disk type resource. + /// Returns the specified disk type resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `diskType` - Name of the disk type resource to return. pub fn get(&self, project: &str, zone: &str, disk_type: &str) -> DiskTypeGetCall<'a, C, NC, A> { DiskTypeGetCall { hub: self.hub, @@ -4722,7 +4868,11 @@ impl<'a, C, NC, A> DiskTypeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of disk type resources grouped by scope. + /// Retrieves the list of disk type resources grouped by scope. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. pub fn aggregated_list(&self, project: &str) -> DiskTypeAggregatedListCall<'a, C, NC, A> { DiskTypeAggregatedListCall { hub: self.hub, @@ -4738,7 +4888,12 @@ impl<'a, C, NC, A> DiskTypeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of disk type resources available to the specified project. + /// Retrieves the list of disk type resources available to the specified project. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. pub fn list(&self, project: &str, zone: &str) -> DiskTypeListCall<'a, C, NC, A> { DiskTypeListCall { hub: self.hub, @@ -4790,13 +4945,18 @@ pub struct ZoneMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ZoneMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ZoneMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ZoneMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified zone resource. + /// Returns the specified zone resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - Name of the zone resource to return. pub fn get(&self, project: &str, zone: &str) -> ZoneGetCall<'a, C, NC, A> { ZoneGetCall { hub: self.hub, @@ -4810,7 +4970,11 @@ impl<'a, C, NC, A> ZoneMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of zone resources available to the specified project. + /// Retrieves the list of zone resources available to the specified project. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. pub fn list(&self, project: &str) -> ZoneListCall<'a, C, NC, A> { ZoneListCall { hub: self.hub, @@ -4861,13 +5025,20 @@ pub struct InstanceMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for InstanceMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for InstanceMethods<'a, C, NC, A> {} impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Sets an instance's scheduling options. + /// Sets an instance's scheduling options. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `instance` - Instance name. pub fn set_scheduling(&self, request: &Scheduling, project: &str, zone: &str, instance: &str) -> InstanceSetSchedulingCall<'a, C, NC, A> { InstanceSetSchedulingCall { hub: self.hub, @@ -4883,7 +5054,13 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified Instance resource. For more information, see Shutting down an instance. + /// Deletes the specified Instance resource. For more information, see Shutting down an instance. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `instance` - Name of the instance resource to delete. pub fn delete(&self, project: &str, zone: &str, instance: &str) -> InstanceDeleteCall<'a, C, NC, A> { InstanceDeleteCall { hub: self.hub, @@ -4898,7 +5075,13 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified instance's serial port output. + /// Returns the specified instance's serial port output. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `instance` - Name of the instance scoping this request. pub fn get_serial_port_output(&self, project: &str, zone: &str, instance: &str) -> InstanceGetSerialPortOutputCall<'a, C, NC, A> { InstanceGetSerialPortOutputCall { hub: self.hub, @@ -4913,7 +5096,15 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Sets the auto-delete flag for a disk attached to an instance. + /// Sets the auto-delete flag for a disk attached to an instance. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `instance` - The instance name. + /// * `autoDelete` - Whether to auto-delete the disk when the instance is deleted. + /// * `deviceName` - The device name of the disk to modify. pub fn set_disk_auto_delete(&self, project: &str, zone: &str, instance: &str, auto_delete: bool, device_name: &str) -> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> { InstanceSetDiskAutoDeleteCall { hub: self.hub, @@ -4930,7 +5121,15 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Adds an access config to an instance's network interface. + /// Adds an access config to an instance's network interface. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `instance` - The instance name for this request. + /// * `networkInterface` - The name of the network interface to add to this instance. pub fn add_access_config(&self, request: &AccessConfig, project: &str, zone: &str, instance: &str, network_interface: &str) -> InstanceAddAccessConfigCall<'a, C, NC, A> { InstanceAddAccessConfigCall { hub: self.hub, @@ -4947,7 +5146,13 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// This method starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance. + /// This method starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `instance` - Name of the instance resource to start. pub fn start(&self, project: &str, zone: &str, instance: &str) -> InstanceStartCall<'a, C, NC, A> { InstanceStartCall { hub: self.hub, @@ -4962,7 +5167,13 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified instance resource. + /// Returns the specified instance resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the The name of the zone for this request.. + /// * `instance` - Name of the instance resource to return. pub fn get(&self, project: &str, zone: &str, instance: &str) -> InstanceGetCall<'a, C, NC, A> { InstanceGetCall { hub: self.hub, @@ -4977,7 +5188,14 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Sets tags for the specified instance to the data included in the request. + /// Sets tags for the specified instance to the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `instance` - Name of the instance scoping this request. pub fn set_tags(&self, request: &Tags, project: &str, zone: &str, instance: &str) -> InstanceSetTagCall<'a, C, NC, A> { InstanceSetTagCall { hub: self.hub, @@ -4993,7 +5211,14 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Sets metadata for the specified instance to the data included in the request. + /// Sets metadata for the specified instance to the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `instance` - Name of the instance scoping this request. pub fn set_metadata(&self, request: &Metadata, project: &str, zone: &str, instance: &str) -> InstanceSetMetadataCall<'a, C, NC, A> { InstanceSetMetadataCall { hub: self.hub, @@ -5009,7 +5234,14 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Detaches a disk from an instance. + /// Detaches a disk from an instance. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `instance` - Instance name. + /// * `deviceName` - Disk device name to detach. pub fn detach_disk(&self, project: &str, zone: &str, instance: &str, device_name: &str) -> InstanceDetachDiskCall<'a, C, NC, A> { InstanceDetachDiskCall { hub: self.hub, @@ -5025,7 +5257,13 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// This method stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses,will continue to be charged until they are deleted. For more information, see Stopping an instance. + /// This method stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses,will continue to be charged until they are deleted. For more information, see Stopping an instance. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `instance` - Name of the instance resource to start. pub fn stop(&self, project: &str, zone: &str, instance: &str) -> InstanceStopCall<'a, C, NC, A> { InstanceStopCall { hub: self.hub, @@ -5040,7 +5278,13 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates an instance resource in the specified project using the data included in the request. + /// Creates an instance resource in the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. pub fn insert(&self, request: &Instance, project: &str, zone: &str) -> InstanceInsertCall<'a, C, NC, A> { InstanceInsertCall { hub: self.hub, @@ -5055,7 +5299,13 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Performs a hard reset on the instance. + /// Performs a hard reset on the instance. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `instance` - Name of the instance scoping this request. pub fn reset(&self, project: &str, zone: &str, instance: &str) -> InstanceResetCall<'a, C, NC, A> { InstanceResetCall { hub: self.hub, @@ -5070,7 +5320,15 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an access config from an instance's network interface. + /// Deletes an access config from an instance's network interface. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `instance` - The instance name for this request. + /// * `accessConfig` - The name of the access config to delete. + /// * `networkInterface` - The name of the network interface. pub fn delete_access_config(&self, project: &str, zone: &str, instance: &str, access_config: &str, network_interface: &str) -> InstanceDeleteAccessConfigCall<'a, C, NC, A> { InstanceDeleteAccessConfigCall { hub: self.hub, @@ -5087,7 +5345,14 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Attaches a Disk resource to an instance. + /// Attaches a Disk resource to an instance. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `instance` - Instance name. pub fn attach_disk(&self, request: &AttachedDisk, project: &str, zone: &str, instance: &str) -> InstanceAttachDiskCall<'a, C, NC, A> { InstanceAttachDiskCall { hub: self.hub, @@ -5103,7 +5368,12 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of instance resources contained within the specified zone. + /// Retrieves the list of instance resources contained within the specified zone. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. pub fn list(&self, project: &str, zone: &str) -> InstanceListCall<'a, C, NC, A> { InstanceListCall { hub: self.hub, @@ -5118,6 +5388,10 @@ impl<'a, C, NC, A> InstanceMethods<'a, C, NC, A> { } } + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. pub fn aggregated_list(&self, project: &str) -> InstanceAggregatedListCall<'a, C, NC, A> { InstanceAggregatedListCall { hub: self.hub, @@ -5168,13 +5442,19 @@ pub struct BackendServiceMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for BackendServiceMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for BackendServiceMethods<'a, C, NC, A> {} impl<'a, C, NC, A> BackendServiceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the most recent health check results for this BackendService. + /// Gets the most recent health check results for this BackendService. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - No description provided. + /// * `backendService` - Name of the BackendService resource to which the queried instance belongs. pub fn get_health(&self, request: &ResourceGroupReference, project: &str, backend_service: &str) -> BackendServiceGetHealthCall<'a, C, NC, A> { BackendServiceGetHealthCall { hub: self.hub, @@ -5189,7 +5469,12 @@ impl<'a, C, NC, A> BackendServiceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified BackendService resource. + /// Deletes the specified BackendService resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `backendService` - Name of the BackendService resource to delete. pub fn delete(&self, project: &str, backend_service: &str) -> BackendServiceDeleteCall<'a, C, NC, A> { BackendServiceDeleteCall { hub: self.hub, @@ -5203,7 +5488,12 @@ impl<'a, C, NC, A> BackendServiceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified BackendService resource. + /// Returns the specified BackendService resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `backendService` - Name of the BackendService resource to return. pub fn get(&self, project: &str, backend_service: &str) -> BackendServiceGetCall<'a, C, NC, A> { BackendServiceGetCall { hub: self.hub, @@ -5217,7 +5507,13 @@ impl<'a, C, NC, A> BackendServiceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update the entire content of the BackendService resource. + /// Update the entire content of the BackendService resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. + /// * `backendService` - Name of the BackendService resource to update. pub fn update(&self, request: &BackendService, project: &str, backend_service: &str) -> BackendServiceUpdateCall<'a, C, NC, A> { BackendServiceUpdateCall { hub: self.hub, @@ -5232,7 +5528,11 @@ impl<'a, C, NC, A> BackendServiceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of BackendService resources available to the specified project. + /// Retrieves the list of BackendService resources available to the specified project. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. pub fn list(&self, project: &str) -> BackendServiceListCall<'a, C, NC, A> { BackendServiceListCall { hub: self.hub, @@ -5248,7 +5548,13 @@ impl<'a, C, NC, A> BackendServiceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Update the entire content of the BackendService resource. This method supports patch semantics. + /// Update the entire content of the BackendService resource. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. + /// * `backendService` - Name of the BackendService resource to update. pub fn patch(&self, request: &BackendService, project: &str, backend_service: &str) -> BackendServicePatchCall<'a, C, NC, A> { BackendServicePatchCall { hub: self.hub, @@ -5263,7 +5569,12 @@ impl<'a, C, NC, A> BackendServiceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a BackendService resource in the specified project using the data included in the request. + /// Creates a BackendService resource in the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. pub fn insert(&self, request: &BackendService, project: &str) -> BackendServiceInsertCall<'a, C, NC, A> { BackendServiceInsertCall { hub: self.hub, @@ -5312,13 +5623,18 @@ pub struct LicenseMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for LicenseMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for LicenseMethods<'a, C, NC, A> {} impl<'a, C, NC, A> LicenseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified license resource. + /// Returns the specified license resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `license` - Name of the license resource to return. pub fn get(&self, project: &str, license: &str) -> LicenseGetCall<'a, C, NC, A> { LicenseGetCall { hub: self.hub, @@ -5367,13 +5683,18 @@ pub struct NetworkMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for NetworkMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for NetworkMethods<'a, C, NC, A> {} impl<'a, C, NC, A> NetworkMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a network resource in the specified project using the data included in the request. + /// Creates a network resource in the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. pub fn insert(&self, request: &Network, project: &str) -> NetworkInsertCall<'a, C, NC, A> { NetworkInsertCall { hub: self.hub, @@ -5387,7 +5708,11 @@ impl<'a, C, NC, A> NetworkMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of network resources available to the specified project. + /// Retrieves the list of network resources available to the specified project. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. pub fn list(&self, project: &str) -> NetworkListCall<'a, C, NC, A> { NetworkListCall { hub: self.hub, @@ -5403,7 +5728,12 @@ impl<'a, C, NC, A> NetworkMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified network resource. + /// Deletes the specified network resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `network` - Name of the network resource to delete. pub fn delete(&self, project: &str, network: &str) -> NetworkDeleteCall<'a, C, NC, A> { NetworkDeleteCall { hub: self.hub, @@ -5417,7 +5747,12 @@ impl<'a, C, NC, A> NetworkMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified network resource. + /// Returns the specified network resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `network` - Name of the network resource to return. pub fn get(&self, project: &str, network: &str) -> NetworkGetCall<'a, C, NC, A> { NetworkGetCall { hub: self.hub, @@ -5466,13 +5801,17 @@ pub struct GlobalOperationMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for GlobalOperationMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for GlobalOperationMethods<'a, C, NC, A> {} impl<'a, C, NC, A> GlobalOperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of operation resources contained within the specified project. + /// Retrieves the list of operation resources contained within the specified project. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. pub fn list(&self, project: &str) -> GlobalOperationListCall<'a, C, NC, A> { GlobalOperationListCall { hub: self.hub, @@ -5488,7 +5827,12 @@ impl<'a, C, NC, A> GlobalOperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the specified operation resource. + /// Retrieves the specified operation resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `operation` - Name of the operation resource to return. pub fn get(&self, project: &str, operation: &str) -> GlobalOperationGetCall<'a, C, NC, A> { GlobalOperationGetCall { hub: self.hub, @@ -5502,7 +5846,12 @@ impl<'a, C, NC, A> GlobalOperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified operation resource. + /// Deletes the specified operation resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `operation` - Name of the operation resource to delete. pub fn delete(&self, project: &str, operation: &str) -> GlobalOperationDeleteCall<'a, C, NC, A> { GlobalOperationDeleteCall { hub: self.hub, @@ -5516,7 +5865,11 @@ impl<'a, C, NC, A> GlobalOperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of all operations grouped by scope. + /// Retrieves the list of all operations grouped by scope. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. pub fn aggregated_list(&self, project: &str) -> GlobalOperationAggregatedListCall<'a, C, NC, A> { GlobalOperationAggregatedListCall { hub: self.hub, @@ -5567,13 +5920,17 @@ pub struct RegionMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for RegionMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for RegionMethods<'a, C, NC, A> {} impl<'a, C, NC, A> RegionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of region resources available to the specified project. + /// Retrieves the list of region resources available to the specified project. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. pub fn list(&self, project: &str) -> RegionListCall<'a, C, NC, A> { RegionListCall { hub: self.hub, @@ -5589,7 +5946,12 @@ impl<'a, C, NC, A> RegionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified region resource. + /// Returns the specified region resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `region` - Name of the region resource to return. pub fn get(&self, project: &str, region: &str) -> RegionGetCall<'a, C, NC, A> { RegionGetCall { hub: self.hub, @@ -5638,13 +6000,17 @@ pub struct ForwardingRuleMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ForwardingRuleMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ForwardingRuleMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ForwardingRuleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of forwarding rules grouped by scope. + /// Retrieves the list of forwarding rules grouped by scope. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. pub fn aggregated_list(&self, project: &str) -> ForwardingRuleAggregatedListCall<'a, C, NC, A> { ForwardingRuleAggregatedListCall { hub: self.hub, @@ -5660,7 +6026,13 @@ impl<'a, C, NC, A> ForwardingRuleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a ForwardingRule resource in the specified project and region using the data included in the request. + /// Creates a ForwardingRule resource in the specified project and region using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. + /// * `region` - Name of the region scoping this request. pub fn insert(&self, request: &ForwardingRule, project: &str, region: &str) -> ForwardingRuleInsertCall<'a, C, NC, A> { ForwardingRuleInsertCall { hub: self.hub, @@ -5675,7 +6047,14 @@ impl<'a, C, NC, A> ForwardingRuleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Changes target url for forwarding rule. + /// Changes target url for forwarding rule. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. + /// * `region` - Name of the region scoping this request. + /// * `forwardingRule` - Name of the ForwardingRule resource in which target is to be set. pub fn set_target(&self, request: &TargetReference, project: &str, region: &str, forwarding_rule: &str) -> ForwardingRuleSetTargetCall<'a, C, NC, A> { ForwardingRuleSetTargetCall { hub: self.hub, @@ -5691,7 +6070,13 @@ impl<'a, C, NC, A> ForwardingRuleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified ForwardingRule resource. + /// Returns the specified ForwardingRule resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `region` - Name of the region scoping this request. + /// * `forwardingRule` - Name of the ForwardingRule resource to return. pub fn get(&self, project: &str, region: &str, forwarding_rule: &str) -> ForwardingRuleGetCall<'a, C, NC, A> { ForwardingRuleGetCall { hub: self.hub, @@ -5706,7 +6091,12 @@ impl<'a, C, NC, A> ForwardingRuleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of ForwardingRule resources available to the specified project and region. + /// Retrieves the list of ForwardingRule resources available to the specified project and region. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `region` - Name of the region scoping this request. pub fn list(&self, project: &str, region: &str) -> ForwardingRuleListCall<'a, C, NC, A> { ForwardingRuleListCall { hub: self.hub, @@ -5723,7 +6113,13 @@ impl<'a, C, NC, A> ForwardingRuleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified ForwardingRule resource. + /// Deletes the specified ForwardingRule resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `region` - Name of the region scoping this request. + /// * `forwardingRule` - Name of the ForwardingRule resource to delete. pub fn delete(&self, project: &str, region: &str, forwarding_rule: &str) -> ForwardingRuleDeleteCall<'a, C, NC, A> { ForwardingRuleDeleteCall { hub: self.hub, @@ -5773,13 +6169,18 @@ pub struct TargetPoolMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for TargetPoolMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for TargetPoolMethods<'a, C, NC, A> {} impl<'a, C, NC, A> TargetPoolMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of TargetPool resources available to the specified project and region. + /// Retrieves the list of TargetPool resources available to the specified project and region. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `region` - Name of the region scoping this request. pub fn list(&self, project: &str, region: &str) -> TargetPoolListCall<'a, C, NC, A> { TargetPoolListCall { hub: self.hub, @@ -5796,7 +6197,14 @@ impl<'a, C, NC, A> TargetPoolMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Adds health check URL to targetPool. + /// Adds health check URL to targetPool. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - No description provided. + /// * `region` - Name of the region scoping this request. + /// * `targetPool` - Name of the TargetPool resource to which health_check_url is to be added. pub fn add_health_check(&self, request: &TargetPoolsAddHealthCheckRequest, project: &str, region: &str, target_pool: &str) -> TargetPoolAddHealthCheckCall<'a, C, NC, A> { TargetPoolAddHealthCheckCall { hub: self.hub, @@ -5812,7 +6220,13 @@ impl<'a, C, NC, A> TargetPoolMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a TargetPool resource in the specified project and region using the data included in the request. + /// Creates a TargetPool resource in the specified project and region using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. + /// * `region` - Name of the region scoping this request. pub fn insert(&self, request: &TargetPool, project: &str, region: &str) -> TargetPoolInsertCall<'a, C, NC, A> { TargetPoolInsertCall { hub: self.hub, @@ -5827,7 +6241,14 @@ impl<'a, C, NC, A> TargetPoolMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Removes health check URL from targetPool. + /// Removes health check URL from targetPool. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - No description provided. + /// * `region` - Name of the region scoping this request. + /// * `targetPool` - Name of the TargetPool resource to which health_check_url is to be removed. pub fn remove_health_check(&self, request: &TargetPoolsRemoveHealthCheckRequest, project: &str, region: &str, target_pool: &str) -> TargetPoolRemoveHealthCheckCall<'a, C, NC, A> { TargetPoolRemoveHealthCheckCall { hub: self.hub, @@ -5843,7 +6264,14 @@ impl<'a, C, NC, A> TargetPoolMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the most recent health check results for each IP for the given instance that is referenced by given TargetPool. + /// Gets the most recent health check results for each IP for the given instance that is referenced by given TargetPool. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - No description provided. + /// * `region` - Name of the region scoping this request. + /// * `targetPool` - Name of the TargetPool resource to which the queried instance belongs. pub fn get_health(&self, request: &InstanceReference, project: &str, region: &str, target_pool: &str) -> TargetPoolGetHealthCall<'a, C, NC, A> { TargetPoolGetHealthCall { hub: self.hub, @@ -5859,7 +6287,14 @@ impl<'a, C, NC, A> TargetPoolMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Changes backup pool configurations. + /// Changes backup pool configurations. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. + /// * `region` - Name of the region scoping this request. + /// * `targetPool` - Name of the TargetPool resource for which the backup is to be set. pub fn set_backup(&self, request: &TargetReference, project: &str, region: &str, target_pool: &str) -> TargetPoolSetBackupCall<'a, C, NC, A> { TargetPoolSetBackupCall { hub: self.hub, @@ -5876,7 +6311,11 @@ impl<'a, C, NC, A> TargetPoolMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of target pools grouped by scope. + /// Retrieves the list of target pools grouped by scope. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. pub fn aggregated_list(&self, project: &str) -> TargetPoolAggregatedListCall<'a, C, NC, A> { TargetPoolAggregatedListCall { hub: self.hub, @@ -5892,7 +6331,13 @@ impl<'a, C, NC, A> TargetPoolMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified TargetPool resource. + /// Returns the specified TargetPool resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `region` - Name of the region scoping this request. + /// * `targetPool` - Name of the TargetPool resource to return. pub fn get(&self, project: &str, region: &str, target_pool: &str) -> TargetPoolGetCall<'a, C, NC, A> { TargetPoolGetCall { hub: self.hub, @@ -5907,7 +6352,14 @@ impl<'a, C, NC, A> TargetPoolMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Adds instance url to targetPool. + /// Adds instance url to targetPool. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - No description provided. + /// * `region` - Name of the region scoping this request. + /// * `targetPool` - Name of the TargetPool resource to which instance_url is to be added. pub fn add_instance(&self, request: &TargetPoolsAddInstanceRequest, project: &str, region: &str, target_pool: &str) -> TargetPoolAddInstanceCall<'a, C, NC, A> { TargetPoolAddInstanceCall { hub: self.hub, @@ -5923,7 +6375,14 @@ impl<'a, C, NC, A> TargetPoolMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Removes instance URL from targetPool. + /// Removes instance URL from targetPool. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - No description provided. + /// * `region` - Name of the region scoping this request. + /// * `targetPool` - Name of the TargetPool resource to which instance_url is to be removed. pub fn remove_instance(&self, request: &TargetPoolsRemoveInstanceRequest, project: &str, region: &str, target_pool: &str) -> TargetPoolRemoveInstanceCall<'a, C, NC, A> { TargetPoolRemoveInstanceCall { hub: self.hub, @@ -5939,7 +6398,13 @@ impl<'a, C, NC, A> TargetPoolMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified TargetPool resource. + /// Deletes the specified TargetPool resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `region` - Name of the region scoping this request. + /// * `targetPool` - Name of the TargetPool resource to delete. pub fn delete(&self, project: &str, region: &str, target_pool: &str) -> TargetPoolDeleteCall<'a, C, NC, A> { TargetPoolDeleteCall { hub: self.hub, @@ -5989,13 +6454,18 @@ pub struct TargetInstanceMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for TargetInstanceMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for TargetInstanceMethods<'a, C, NC, A> {} impl<'a, C, NC, A> TargetInstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of TargetInstance resources available to the specified project and zone. + /// Retrieves the list of TargetInstance resources available to the specified project and zone. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `zone` - Name of the zone scoping this request. pub fn list(&self, project: &str, zone: &str) -> TargetInstanceListCall<'a, C, NC, A> { TargetInstanceListCall { hub: self.hub, @@ -6012,7 +6482,13 @@ impl<'a, C, NC, A> TargetInstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a TargetInstance resource in the specified project and zone using the data included in the request. + /// Creates a TargetInstance resource in the specified project and zone using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. + /// * `zone` - Name of the zone scoping this request. pub fn insert(&self, request: &TargetInstance, project: &str, zone: &str) -> TargetInstanceInsertCall<'a, C, NC, A> { TargetInstanceInsertCall { hub: self.hub, @@ -6027,7 +6503,11 @@ impl<'a, C, NC, A> TargetInstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of target instances grouped by scope. + /// Retrieves the list of target instances grouped by scope. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. pub fn aggregated_list(&self, project: &str) -> TargetInstanceAggregatedListCall<'a, C, NC, A> { TargetInstanceAggregatedListCall { hub: self.hub, @@ -6043,7 +6523,13 @@ impl<'a, C, NC, A> TargetInstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified TargetInstance resource. + /// Returns the specified TargetInstance resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `zone` - Name of the zone scoping this request. + /// * `targetInstance` - Name of the TargetInstance resource to return. pub fn get(&self, project: &str, zone: &str, target_instance: &str) -> TargetInstanceGetCall<'a, C, NC, A> { TargetInstanceGetCall { hub: self.hub, @@ -6058,7 +6544,13 @@ impl<'a, C, NC, A> TargetInstanceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified TargetInstance resource. + /// Deletes the specified TargetInstance resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `zone` - Name of the zone scoping this request. + /// * `targetInstance` - Name of the TargetInstance resource to delete. pub fn delete(&self, project: &str, zone: &str, target_instance: &str) -> TargetInstanceDeleteCall<'a, C, NC, A> { TargetInstanceDeleteCall { hub: self.hub, @@ -6108,13 +6600,18 @@ pub struct GlobalForwardingRuleMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for GlobalForwardingRuleMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for GlobalForwardingRuleMethods<'a, C, NC, A> {} impl<'a, C, NC, A> GlobalForwardingRuleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified ForwardingRule resource. + /// Returns the specified ForwardingRule resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `forwardingRule` - Name of the ForwardingRule resource to return. pub fn get(&self, project: &str, forwarding_rule: &str) -> GlobalForwardingRuleGetCall<'a, C, NC, A> { GlobalForwardingRuleGetCall { hub: self.hub, @@ -6128,7 +6625,12 @@ impl<'a, C, NC, A> GlobalForwardingRuleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified ForwardingRule resource. + /// Deletes the specified ForwardingRule resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `forwardingRule` - Name of the ForwardingRule resource to delete. pub fn delete(&self, project: &str, forwarding_rule: &str) -> GlobalForwardingRuleDeleteCall<'a, C, NC, A> { GlobalForwardingRuleDeleteCall { hub: self.hub, @@ -6142,7 +6644,13 @@ impl<'a, C, NC, A> GlobalForwardingRuleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Changes target url for forwarding rule. + /// Changes target url for forwarding rule. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. + /// * `forwardingRule` - Name of the ForwardingRule resource in which target is to be set. pub fn set_target(&self, request: &TargetReference, project: &str, forwarding_rule: &str) -> GlobalForwardingRuleSetTargetCall<'a, C, NC, A> { GlobalForwardingRuleSetTargetCall { hub: self.hub, @@ -6157,7 +6665,12 @@ impl<'a, C, NC, A> GlobalForwardingRuleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a ForwardingRule resource in the specified project and region using the data included in the request. + /// Creates a ForwardingRule resource in the specified project and region using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. pub fn insert(&self, request: &ForwardingRule, project: &str) -> GlobalForwardingRuleInsertCall<'a, C, NC, A> { GlobalForwardingRuleInsertCall { hub: self.hub, @@ -6171,7 +6684,11 @@ impl<'a, C, NC, A> GlobalForwardingRuleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of ForwardingRule resources available to the specified project. + /// Retrieves the list of ForwardingRule resources available to the specified project. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. pub fn list(&self, project: &str) -> GlobalForwardingRuleListCall<'a, C, NC, A> { GlobalForwardingRuleListCall { hub: self.hub, @@ -6222,13 +6739,17 @@ pub struct ImageMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ImageMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ImageMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ImageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of image resources available to the specified project. + /// Retrieves the list of image resources available to the specified project. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. pub fn list(&self, project: &str) -> ImageListCall<'a, C, NC, A> { ImageListCall { hub: self.hub, @@ -6244,7 +6765,12 @@ impl<'a, C, NC, A> ImageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified image resource. + /// Deletes the specified image resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `image` - Name of the image resource to delete. pub fn delete(&self, project: &str, image: &str) -> ImageDeleteCall<'a, C, NC, A> { ImageDeleteCall { hub: self.hub, @@ -6261,6 +6787,12 @@ impl<'a, C, NC, A> ImageMethods<'a, C, NC, A> { /// Sets the deprecation status of an image. /// /// If an empty request body is given, clears the deprecation status instead. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. + /// * `image` - Image name. pub fn deprecate(&self, request: &DeprecationStatus, project: &str, image: &str) -> ImageDeprecateCall<'a, C, NC, A> { ImageDeprecateCall { hub: self.hub, @@ -6275,7 +6807,12 @@ impl<'a, C, NC, A> ImageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates an image resource in the specified project using the data included in the request. + /// Creates an image resource in the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. pub fn insert(&self, request: &Image, project: &str) -> ImageInsertCall<'a, C, NC, A> { ImageInsertCall { hub: self.hub, @@ -6289,7 +6826,12 @@ impl<'a, C, NC, A> ImageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified image resource. + /// Returns the specified image resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `image` - Name of the image resource to return. pub fn get(&self, project: &str, image: &str) -> ImageGetCall<'a, C, NC, A> { ImageGetCall { hub: self.hub, @@ -6338,13 +6880,17 @@ pub struct MachineTypeMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for MachineTypeMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for MachineTypeMethods<'a, C, NC, A> {} impl<'a, C, NC, A> MachineTypeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of machine type resources grouped by scope. + /// Retrieves the list of machine type resources grouped by scope. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. pub fn aggregated_list(&self, project: &str) -> MachineTypeAggregatedListCall<'a, C, NC, A> { MachineTypeAggregatedListCall { hub: self.hub, @@ -6360,7 +6906,13 @@ impl<'a, C, NC, A> MachineTypeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified machine type resource. + /// Returns the specified machine type resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. + /// * `machineType` - Name of the machine type resource to return. pub fn get(&self, project: &str, zone: &str, machine_type: &str) -> MachineTypeGetCall<'a, C, NC, A> { MachineTypeGetCall { hub: self.hub, @@ -6375,7 +6927,12 @@ impl<'a, C, NC, A> MachineTypeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of machine type resources available to the specified project. + /// Retrieves the list of machine type resources available to the specified project. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - The name of the zone for this request. pub fn list(&self, project: &str, zone: &str) -> MachineTypeListCall<'a, C, NC, A> { MachineTypeListCall { hub: self.hub, @@ -6427,13 +6984,18 @@ pub struct ProjectMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ProjectMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ProjectMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Moves a persistent disk from one zone to another. + /// Moves a persistent disk from one zone to another. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. pub fn move_disk(&self, request: &DiskMoveRequest, project: &str) -> ProjectMoveDiskCall<'a, C, NC, A> { ProjectMoveDiskCall { hub: self.hub, @@ -6447,7 +7009,12 @@ impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Sets metadata common to all instances within the specified project using the data included in the request. + /// Sets metadata common to all instances within the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. pub fn set_common_instance_metadata(&self, request: &Metadata, project: &str) -> ProjectSetCommonInstanceMetadataCall<'a, C, NC, A> { ProjectSetCommonInstanceMetadataCall { hub: self.hub, @@ -6461,7 +7028,11 @@ impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified project resource. + /// Returns the specified project resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. pub fn get(&self, project: &str) -> ProjectGetCall<'a, C, NC, A> { ProjectGetCall { hub: self.hub, @@ -6474,7 +7045,12 @@ impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Moves an instance and its attached persistent disks from one zone to another. + /// Moves an instance and its attached persistent disks from one zone to another. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. pub fn move_instance(&self, request: &InstanceMoveRequest, project: &str) -> ProjectMoveInstanceCall<'a, C, NC, A> { ProjectMoveInstanceCall { hub: self.hub, @@ -6488,7 +7064,12 @@ impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. + /// Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. pub fn set_usage_export_bucket(&self, request: &UsageExportLocation, project: &str) -> ProjectSetUsageExportBucketCall<'a, C, NC, A> { ProjectSetUsageExportBucketCall { hub: self.hub, @@ -6537,13 +7118,18 @@ pub struct HttpHealthCheckMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for HttpHealthCheckMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for HttpHealthCheckMethods<'a, C, NC, A> {} impl<'a, C, NC, A> HttpHealthCheckMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified HttpHealthCheck resource. + /// Returns the specified HttpHealthCheck resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `httpHealthCheck` - Name of the HttpHealthCheck resource to return. pub fn get(&self, project: &str, http_health_check: &str) -> HttpHealthCheckGetCall<'a, C, NC, A> { HttpHealthCheckGetCall { hub: self.hub, @@ -6557,7 +7143,13 @@ impl<'a, C, NC, A> HttpHealthCheckMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports patch semantics. + /// Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. + /// * `httpHealthCheck` - Name of the HttpHealthCheck resource to update. pub fn patch(&self, request: &HttpHealthCheck, project: &str, http_health_check: &str) -> HttpHealthCheckPatchCall<'a, C, NC, A> { HttpHealthCheckPatchCall { hub: self.hub, @@ -6572,7 +7164,11 @@ impl<'a, C, NC, A> HttpHealthCheckMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of HttpHealthCheck resources available to the specified project. + /// Retrieves the list of HttpHealthCheck resources available to the specified project. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. pub fn list(&self, project: &str) -> HttpHealthCheckListCall<'a, C, NC, A> { HttpHealthCheckListCall { hub: self.hub, @@ -6588,7 +7184,12 @@ impl<'a, C, NC, A> HttpHealthCheckMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified HttpHealthCheck resource. + /// Deletes the specified HttpHealthCheck resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `httpHealthCheck` - Name of the HttpHealthCheck resource to delete. pub fn delete(&self, project: &str, http_health_check: &str) -> HttpHealthCheckDeleteCall<'a, C, NC, A> { HttpHealthCheckDeleteCall { hub: self.hub, @@ -6602,7 +7203,12 @@ impl<'a, C, NC, A> HttpHealthCheckMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a HttpHealthCheck resource in the specified project using the data included in the request. + /// Creates a HttpHealthCheck resource in the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. pub fn insert(&self, request: &HttpHealthCheck, project: &str) -> HttpHealthCheckInsertCall<'a, C, NC, A> { HttpHealthCheckInsertCall { hub: self.hub, @@ -6616,7 +7222,13 @@ impl<'a, C, NC, A> HttpHealthCheckMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a HttpHealthCheck resource in the specified project using the data included in the request. + /// Updates a HttpHealthCheck resource in the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. + /// * `httpHealthCheck` - Name of the HttpHealthCheck resource to update. pub fn update(&self, request: &HttpHealthCheck, project: &str, http_health_check: &str) -> HttpHealthCheckUpdateCall<'a, C, NC, A> { HttpHealthCheckUpdateCall { hub: self.hub, @@ -6666,13 +7278,18 @@ pub struct InstanceTemplateMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for InstanceTemplateMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for InstanceTemplateMethods<'a, C, NC, A> {} impl<'a, C, NC, A> InstanceTemplateMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified instance template resource. + /// Deletes the specified instance template resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `instanceTemplate` - Name of the instance template resource to delete. pub fn delete(&self, project: &str, instance_template: &str) -> InstanceTemplateDeleteCall<'a, C, NC, A> { InstanceTemplateDeleteCall { hub: self.hub, @@ -6686,7 +7303,12 @@ impl<'a, C, NC, A> InstanceTemplateMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified instance template resource. + /// Returns the specified instance template resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `instanceTemplate` - Name of the instance template resource to return. pub fn get(&self, project: &str, instance_template: &str) -> InstanceTemplateGetCall<'a, C, NC, A> { InstanceTemplateGetCall { hub: self.hub, @@ -6700,7 +7322,11 @@ impl<'a, C, NC, A> InstanceTemplateMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of instance template resources contained within the specified project. + /// Retrieves the list of instance template resources contained within the specified project. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. pub fn list(&self, project: &str) -> InstanceTemplateListCall<'a, C, NC, A> { InstanceTemplateListCall { hub: self.hub, @@ -6716,7 +7342,12 @@ impl<'a, C, NC, A> InstanceTemplateMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates an instance template resource in the specified project using the data included in the request. + /// Creates an instance template resource in the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. pub fn insert(&self, request: &InstanceTemplate, project: &str) -> InstanceTemplateInsertCall<'a, C, NC, A> { InstanceTemplateInsertCall { hub: self.hub, @@ -6765,13 +7396,18 @@ pub struct TargetHttpProxyMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for TargetHttpProxyMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for TargetHttpProxyMethods<'a, C, NC, A> {} impl<'a, C, NC, A> TargetHttpProxyMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified TargetHttpProxy resource. + /// Deletes the specified TargetHttpProxy resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `targetHttpProxy` - Name of the TargetHttpProxy resource to delete. pub fn delete(&self, project: &str, target_http_proxy: &str) -> TargetHttpProxyDeleteCall<'a, C, NC, A> { TargetHttpProxyDeleteCall { hub: self.hub, @@ -6785,7 +7421,11 @@ impl<'a, C, NC, A> TargetHttpProxyMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of TargetHttpProxy resources available to the specified project. + /// Retrieves the list of TargetHttpProxy resources available to the specified project. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. pub fn list(&self, project: &str) -> TargetHttpProxyListCall<'a, C, NC, A> { TargetHttpProxyListCall { hub: self.hub, @@ -6801,7 +7441,12 @@ impl<'a, C, NC, A> TargetHttpProxyMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified TargetHttpProxy resource. + /// Returns the specified TargetHttpProxy resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `targetHttpProxy` - Name of the TargetHttpProxy resource to return. pub fn get(&self, project: &str, target_http_proxy: &str) -> TargetHttpProxyGetCall<'a, C, NC, A> { TargetHttpProxyGetCall { hub: self.hub, @@ -6815,7 +7460,13 @@ impl<'a, C, NC, A> TargetHttpProxyMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Changes the URL map for TargetHttpProxy. + /// Changes the URL map for TargetHttpProxy. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. + /// * `targetHttpProxy` - Name of the TargetHttpProxy resource whose URL map is to be set. pub fn set_url_map(&self, request: &UrlMapReference, project: &str, target_http_proxy: &str) -> TargetHttpProxySetUrlMapCall<'a, C, NC, A> { TargetHttpProxySetUrlMapCall { hub: self.hub, @@ -6830,7 +7481,12 @@ impl<'a, C, NC, A> TargetHttpProxyMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a TargetHttpProxy resource in the specified project using the data included in the request. + /// Creates a TargetHttpProxy resource in the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. pub fn insert(&self, request: &TargetHttpProxy, project: &str) -> TargetHttpProxyInsertCall<'a, C, NC, A> { TargetHttpProxyInsertCall { hub: self.hub, @@ -6879,13 +7535,19 @@ pub struct ZoneOperationMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ZoneOperationMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ZoneOperationMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ZoneOperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified zone-specific operation resource. + /// Deletes the specified zone-specific operation resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - Name of the zone scoping this request. + /// * `operation` - Name of the operation resource to delete. pub fn delete(&self, project: &str, zone: &str, operation: &str) -> ZoneOperationDeleteCall<'a, C, NC, A> { ZoneOperationDeleteCall { hub: self.hub, @@ -6900,7 +7562,12 @@ impl<'a, C, NC, A> ZoneOperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of operation resources contained within the specified zone. + /// Retrieves the list of operation resources contained within the specified zone. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - Name of the zone scoping this request. pub fn list(&self, project: &str, zone: &str) -> ZoneOperationListCall<'a, C, NC, A> { ZoneOperationListCall { hub: self.hub, @@ -6917,7 +7584,13 @@ impl<'a, C, NC, A> ZoneOperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the specified zone-specific operation resource. + /// Retrieves the specified zone-specific operation resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `zone` - Name of the zone scoping this request. + /// * `operation` - Name of the operation resource to return. pub fn get(&self, project: &str, zone: &str, operation: &str) -> ZoneOperationGetCall<'a, C, NC, A> { ZoneOperationGetCall { hub: self.hub, @@ -6967,13 +7640,18 @@ pub struct RouteMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for RouteMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for RouteMethods<'a, C, NC, A> {} impl<'a, C, NC, A> RouteMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified route resource. + /// Returns the specified route resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `route` - Name of the route resource to return. pub fn get(&self, project: &str, route: &str) -> RouteGetCall<'a, C, NC, A> { RouteGetCall { hub: self.hub, @@ -6987,7 +7665,12 @@ impl<'a, C, NC, A> RouteMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a route resource in the specified project using the data included in the request. + /// Creates a route resource in the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Name of the project scoping this request. pub fn insert(&self, request: &Route, project: &str) -> RouteInsertCall<'a, C, NC, A> { RouteInsertCall { hub: self.hub, @@ -7001,7 +7684,11 @@ impl<'a, C, NC, A> RouteMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of route resources available to the specified project. + /// Retrieves the list of route resources available to the specified project. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. pub fn list(&self, project: &str) -> RouteListCall<'a, C, NC, A> { RouteListCall { hub: self.hub, @@ -7017,7 +7704,12 @@ impl<'a, C, NC, A> RouteMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified route resource. + /// Deletes the specified route resource. + /// + /// # Arguments + /// + /// * `project` - Name of the project scoping this request. + /// * `route` - Name of the route resource to delete. pub fn delete(&self, project: &str, route: &str) -> RouteDeleteCall<'a, C, NC, A> { RouteDeleteCall { hub: self.hub, @@ -7066,13 +7758,19 @@ pub struct FirewallMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for FirewallMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for FirewallMethods<'a, C, NC, A> {} impl<'a, C, NC, A> FirewallMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the specified firewall resource with the data included in the request. This method supports patch semantics. + /// Updates the specified firewall resource with the data included in the request. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. + /// * `firewall` - Name of the firewall resource to update. pub fn patch(&self, request: &Firewall, project: &str, firewall: &str) -> FirewallPatchCall<'a, C, NC, A> { FirewallPatchCall { hub: self.hub, @@ -7087,7 +7785,12 @@ impl<'a, C, NC, A> FirewallMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the specified firewall resource. + /// Returns the specified firewall resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `firewall` - Name of the firewall resource to return. pub fn get(&self, project: &str, firewall: &str) -> FirewallGetCall<'a, C, NC, A> { FirewallGetCall { hub: self.hub, @@ -7101,7 +7804,12 @@ impl<'a, C, NC, A> FirewallMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a firewall resource in the specified project using the data included in the request. + /// Creates a firewall resource in the specified project using the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. pub fn insert(&self, request: &Firewall, project: &str) -> FirewallInsertCall<'a, C, NC, A> { FirewallInsertCall { hub: self.hub, @@ -7115,7 +7823,13 @@ impl<'a, C, NC, A> FirewallMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the specified firewall resource with the data included in the request. + /// Updates the specified firewall resource with the data included in the request. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Project ID for this request. + /// * `firewall` - Name of the firewall resource to update. pub fn update(&self, request: &Firewall, project: &str, firewall: &str) -> FirewallUpdateCall<'a, C, NC, A> { FirewallUpdateCall { hub: self.hub, @@ -7130,7 +7844,12 @@ impl<'a, C, NC, A> FirewallMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified firewall resource. + /// Deletes the specified firewall resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `firewall` - Name of the firewall resource to delete. pub fn delete(&self, project: &str, firewall: &str) -> FirewallDeleteCall<'a, C, NC, A> { FirewallDeleteCall { hub: self.hub, @@ -7144,7 +7863,11 @@ impl<'a, C, NC, A> FirewallMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of firewall resources available to the specified project. + /// Retrieves the list of firewall resources available to the specified project. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. pub fn list(&self, project: &str) -> FirewallListCall<'a, C, NC, A> { FirewallListCall { hub: self.hub, @@ -7195,13 +7918,18 @@ pub struct RegionOperationMethods<'a, C, NC, A> hub: &'a Compute, } -impl<'a, C, NC, A> ResourceMethodsBuilder for RegionOperationMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for RegionOperationMethods<'a, C, NC, A> {} impl<'a, C, NC, A> RegionOperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of operation resources contained within the specified region. + /// Retrieves the list of operation resources contained within the specified region. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `region` - Name of the region scoping this request. pub fn list(&self, project: &str, region: &str) -> RegionOperationListCall<'a, C, NC, A> { RegionOperationListCall { hub: self.hub, @@ -7218,7 +7946,13 @@ impl<'a, C, NC, A> RegionOperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes the specified region-specific operation resource. + /// Deletes the specified region-specific operation resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `region` - Name of the region scoping this request. + /// * `operation` - Name of the operation resource to delete. pub fn delete(&self, project: &str, region: &str, operation: &str) -> RegionOperationDeleteCall<'a, C, NC, A> { RegionOperationDeleteCall { hub: self.hub, @@ -7233,7 +7967,13 @@ impl<'a, C, NC, A> RegionOperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the specified region-specific operation resource. + /// Retrieves the specified region-specific operation resource. + /// + /// # Arguments + /// + /// * `project` - Project ID for this request. + /// * `region` - Name of the zone scoping this request. + /// * `operation` - Name of the operation resource to return. pub fn get(&self, project: &str, region: &str, operation: &str) -> RegionOperationGetCall<'a, C, NC, A> { RegionOperationGetCall { hub: self.hub, @@ -7258,7 +7998,7 @@ impl<'a, C, NC, A> RegionOperationMethods<'a, C, NC, A> { /// Deletes the specified persistent disk. /// /// A builder for the *delete* method supported by a *disk* resource. -/// It is not used directly, but through a `DiskMethods`. +/// It is not used directly, but through a `DiskMethods` instance. /// /// # Example /// @@ -7320,7 +8060,7 @@ impl<'a, C, NC, A> DiskDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "project", "zone", "disk"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7373,7 +8113,7 @@ impl<'a, C, NC, A> DiskDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7385,7 +8125,6 @@ impl<'a, C, NC, A> DiskDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -7395,7 +8134,7 @@ impl<'a, C, NC, A> DiskDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7406,7 +8145,7 @@ impl<'a, C, NC, A> DiskDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7415,13 +8154,13 @@ impl<'a, C, NC, A> DiskDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7433,7 +8172,7 @@ impl<'a, C, NC, A> DiskDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -7443,7 +8182,7 @@ impl<'a, C, NC, A> DiskDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> DiskDeleteCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -7453,7 +8192,7 @@ impl<'a, C, NC, A> DiskDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the persistent disk to delete. + /// Name of the persistent disk to delete. pub fn disk(mut self, new_value: &str) -> DiskDeleteCall<'a, C, NC, A> { self._disk = new_value.to_string(); self @@ -7514,7 +8253,7 @@ impl<'a, C, NC, A> DiskDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Retrieves the list of disks grouped by scope. /// /// A builder for the *aggregatedList* method supported by a *disk* resource. -/// It is not used directly, but through a `DiskMethods`. +/// It is not used directly, but through a `DiskMethods` instance. /// /// # Example /// @@ -7587,7 +8326,7 @@ impl<'a, C, NC, A> DiskAggregatedListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7640,7 +8379,7 @@ impl<'a, C, NC, A> DiskAggregatedListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7652,7 +8391,6 @@ impl<'a, C, NC, A> DiskAggregatedListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -7662,7 +8400,7 @@ impl<'a, C, NC, A> DiskAggregatedListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7673,7 +8411,7 @@ impl<'a, C, NC, A> DiskAggregatedListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7682,13 +8420,13 @@ impl<'a, C, NC, A> DiskAggregatedListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7700,7 +8438,7 @@ impl<'a, C, NC, A> DiskAggregatedListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskAggregatedListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -7708,7 +8446,7 @@ impl<'a, C, NC, A> DiskAggregatedListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> DiskAggregatedListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -7716,7 +8454,7 @@ impl<'a, C, NC, A> DiskAggregatedListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> DiskAggregatedListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -7724,7 +8462,7 @@ impl<'a, C, NC, A> DiskAggregatedListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> DiskAggregatedListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -7785,7 +8523,7 @@ impl<'a, C, NC, A> DiskAggregatedListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Retrieves the list of persistent disks contained within the specified zone. /// /// A builder for the *list* method supported by a *disk* resource. -/// It is not used directly, but through a `DiskMethods`. +/// It is not used directly, but through a `DiskMethods` instance. /// /// # Example /// @@ -7860,7 +8598,7 @@ impl<'a, C, NC, A> DiskListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "project", "zone", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7913,7 +8651,7 @@ impl<'a, C, NC, A> DiskListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7925,7 +8663,6 @@ impl<'a, C, NC, A> DiskListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -7935,7 +8672,7 @@ impl<'a, C, NC, A> DiskListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7946,7 +8683,7 @@ impl<'a, C, NC, A> DiskListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7955,13 +8692,13 @@ impl<'a, C, NC, A> DiskListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7973,7 +8710,7 @@ impl<'a, C, NC, A> DiskListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -7983,7 +8720,7 @@ impl<'a, C, NC, A> DiskListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> DiskListCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -7991,7 +8728,7 @@ impl<'a, C, NC, A> DiskListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> DiskListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -7999,7 +8736,7 @@ impl<'a, C, NC, A> DiskListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> DiskListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -8007,7 +8744,7 @@ impl<'a, C, NC, A> DiskListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> DiskListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -8068,7 +8805,7 @@ impl<'a, C, NC, A> DiskListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Creates a persistent disk in the specified project using the data included in the request. /// /// A builder for the *insert* method supported by a *disk* resource. -/// It is not used directly, but through a `DiskMethods`. +/// It is not used directly, but through a `DiskMethods` instance. /// /// # Example /// @@ -8140,7 +8877,7 @@ impl<'a, C, NC, A> DiskInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "project", "zone", "sourceImage"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8197,7 +8934,7 @@ impl<'a, C, NC, A> DiskInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8213,7 +8950,6 @@ impl<'a, C, NC, A> DiskInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -8223,7 +8959,7 @@ impl<'a, C, NC, A> DiskInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8234,7 +8970,7 @@ impl<'a, C, NC, A> DiskInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8243,13 +8979,13 @@ impl<'a, C, NC, A> DiskInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8270,7 +9006,7 @@ impl<'a, C, NC, A> DiskInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -8280,7 +9016,7 @@ impl<'a, C, NC, A> DiskInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> DiskInsertCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -8288,7 +9024,7 @@ impl<'a, C, NC, A> DiskInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *source image* query property to the given value. /// /// - /// Optional. Source image to restore onto a disk. + /// Optional. Source image to restore onto a disk. pub fn source_image(mut self, new_value: &str) -> DiskInsertCall<'a, C, NC, A> { self._source_image = Some(new_value.to_string()); self @@ -8349,7 +9085,7 @@ impl<'a, C, NC, A> DiskInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Creates a snapshot of this disk. /// /// A builder for the *createSnapshot* method supported by a *disk* resource. -/// It is not used directly, but through a `DiskMethods`. +/// It is not used directly, but through a `DiskMethods` instance. /// /// # Example /// @@ -8418,7 +9154,7 @@ impl<'a, C, NC, A> DiskCreateSnapshotCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "project", "zone", "disk"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8475,7 +9211,7 @@ impl<'a, C, NC, A> DiskCreateSnapshotCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8491,7 +9227,6 @@ impl<'a, C, NC, A> DiskCreateSnapshotCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -8501,7 +9236,7 @@ impl<'a, C, NC, A> DiskCreateSnapshotCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8512,7 +9247,7 @@ impl<'a, C, NC, A> DiskCreateSnapshotCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8521,13 +9256,13 @@ impl<'a, C, NC, A> DiskCreateSnapshotCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8548,7 +9283,7 @@ impl<'a, C, NC, A> DiskCreateSnapshotCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskCreateSnapshotCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -8558,7 +9293,7 @@ impl<'a, C, NC, A> DiskCreateSnapshotCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> DiskCreateSnapshotCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -8568,7 +9303,7 @@ impl<'a, C, NC, A> DiskCreateSnapshotCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the persistent disk to snapshot. + /// Name of the persistent disk to snapshot. pub fn disk(mut self, new_value: &str) -> DiskCreateSnapshotCall<'a, C, NC, A> { self._disk = new_value.to_string(); self @@ -8629,7 +9364,7 @@ impl<'a, C, NC, A> DiskCreateSnapshotCall<'a, C, NC, A> where NC: hyper::net::Ne /// Returns a specified persistent disk. /// /// A builder for the *get* method supported by a *disk* resource. -/// It is not used directly, but through a `DiskMethods`. +/// It is not used directly, but through a `DiskMethods` instance. /// /// # Example /// @@ -8691,7 +9426,7 @@ impl<'a, C, NC, A> DiskGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "project", "zone", "disk"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8744,7 +9479,7 @@ impl<'a, C, NC, A> DiskGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8756,7 +9491,6 @@ impl<'a, C, NC, A> DiskGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -8766,7 +9500,7 @@ impl<'a, C, NC, A> DiskGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8777,7 +9511,7 @@ impl<'a, C, NC, A> DiskGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8786,13 +9520,13 @@ impl<'a, C, NC, A> DiskGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8804,7 +9538,7 @@ impl<'a, C, NC, A> DiskGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -8814,7 +9548,7 @@ impl<'a, C, NC, A> DiskGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> DiskGetCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -8824,7 +9558,7 @@ impl<'a, C, NC, A> DiskGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the persistent disk to return. + /// Name of the persistent disk to return. pub fn disk(mut self, new_value: &str) -> DiskGetCall<'a, C, NC, A> { self._disk = new_value.to_string(); self @@ -8885,7 +9619,7 @@ impl<'a, C, NC, A> DiskGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Retrieves the list of address resources contained within the specified region. /// /// A builder for the *list* method supported by a *addresse* resource. -/// It is not used directly, but through a `AddresseMethods`. +/// It is not used directly, but through a `AddresseMethods` instance. /// /// # Example /// @@ -8960,7 +9694,7 @@ impl<'a, C, NC, A> AddresseListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "project", "region", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9013,7 +9747,7 @@ impl<'a, C, NC, A> AddresseListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9025,7 +9759,6 @@ impl<'a, C, NC, A> AddresseListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -9035,7 +9768,7 @@ impl<'a, C, NC, A> AddresseListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9046,7 +9779,7 @@ impl<'a, C, NC, A> AddresseListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9055,13 +9788,13 @@ impl<'a, C, NC, A> AddresseListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9073,7 +9806,7 @@ impl<'a, C, NC, A> AddresseListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> AddresseListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -9083,7 +9816,7 @@ impl<'a, C, NC, A> AddresseListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the region for this request. + /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> AddresseListCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -9091,7 +9824,7 @@ impl<'a, C, NC, A> AddresseListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> AddresseListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -9099,7 +9832,7 @@ impl<'a, C, NC, A> AddresseListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> AddresseListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -9107,7 +9840,7 @@ impl<'a, C, NC, A> AddresseListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> AddresseListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -9168,7 +9901,7 @@ impl<'a, C, NC, A> AddresseListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Retrieves the list of addresses grouped by scope. /// /// A builder for the *aggregatedList* method supported by a *addresse* resource. -/// It is not used directly, but through a `AddresseMethods`. +/// It is not used directly, but through a `AddresseMethods` instance. /// /// # Example /// @@ -9241,7 +9974,7 @@ impl<'a, C, NC, A> AddresseAggregatedListCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9294,7 +10027,7 @@ impl<'a, C, NC, A> AddresseAggregatedListCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9306,7 +10039,6 @@ impl<'a, C, NC, A> AddresseAggregatedListCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -9316,7 +10048,7 @@ impl<'a, C, NC, A> AddresseAggregatedListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9327,7 +10059,7 @@ impl<'a, C, NC, A> AddresseAggregatedListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9336,13 +10068,13 @@ impl<'a, C, NC, A> AddresseAggregatedListCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9354,7 +10086,7 @@ impl<'a, C, NC, A> AddresseAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> AddresseAggregatedListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -9362,7 +10094,7 @@ impl<'a, C, NC, A> AddresseAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> AddresseAggregatedListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -9370,7 +10102,7 @@ impl<'a, C, NC, A> AddresseAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> AddresseAggregatedListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -9378,7 +10110,7 @@ impl<'a, C, NC, A> AddresseAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> AddresseAggregatedListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -9439,7 +10171,7 @@ impl<'a, C, NC, A> AddresseAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Returns the specified address resource. /// /// A builder for the *get* method supported by a *addresse* resource. -/// It is not used directly, but through a `AddresseMethods`. +/// It is not used directly, but through a `AddresseMethods` instance. /// /// # Example /// @@ -9501,7 +10233,7 @@ impl<'a, C, NC, A> AddresseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "project", "region", "address"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9554,7 +10286,7 @@ impl<'a, C, NC, A> AddresseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9566,7 +10298,6 @@ impl<'a, C, NC, A> AddresseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -9576,7 +10307,7 @@ impl<'a, C, NC, A> AddresseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9587,7 +10318,7 @@ impl<'a, C, NC, A> AddresseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9596,13 +10327,13 @@ impl<'a, C, NC, A> AddresseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9614,7 +10345,7 @@ impl<'a, C, NC, A> AddresseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> AddresseGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -9624,7 +10355,7 @@ impl<'a, C, NC, A> AddresseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the region for this request. + /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> AddresseGetCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -9634,7 +10365,7 @@ impl<'a, C, NC, A> AddresseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the address resource to return. + /// Name of the address resource to return. pub fn address(mut self, new_value: &str) -> AddresseGetCall<'a, C, NC, A> { self._address = new_value.to_string(); self @@ -9695,7 +10426,7 @@ impl<'a, C, NC, A> AddresseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Creates an address resource in the specified project using the data included in the request. /// /// A builder for the *insert* method supported by a *addresse* resource. -/// It is not used directly, but through a `AddresseMethods`. +/// It is not used directly, but through a `AddresseMethods` instance. /// /// # Example /// @@ -9762,7 +10493,7 @@ impl<'a, C, NC, A> AddresseInsertCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "region"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9819,7 +10550,7 @@ impl<'a, C, NC, A> AddresseInsertCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9835,7 +10566,6 @@ impl<'a, C, NC, A> AddresseInsertCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -9845,7 +10575,7 @@ impl<'a, C, NC, A> AddresseInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9856,7 +10586,7 @@ impl<'a, C, NC, A> AddresseInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9865,13 +10595,13 @@ impl<'a, C, NC, A> AddresseInsertCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9892,7 +10622,7 @@ impl<'a, C, NC, A> AddresseInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> AddresseInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -9902,7 +10632,7 @@ impl<'a, C, NC, A> AddresseInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the region for this request. + /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> AddresseInsertCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -9963,7 +10693,7 @@ impl<'a, C, NC, A> AddresseInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Deletes the specified address resource. /// /// A builder for the *delete* method supported by a *addresse* resource. -/// It is not used directly, but through a `AddresseMethods`. +/// It is not used directly, but through a `AddresseMethods` instance. /// /// # Example /// @@ -10025,7 +10755,7 @@ impl<'a, C, NC, A> AddresseDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "region", "address"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10078,7 +10808,7 @@ impl<'a, C, NC, A> AddresseDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10090,7 +10820,6 @@ impl<'a, C, NC, A> AddresseDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -10100,7 +10829,7 @@ impl<'a, C, NC, A> AddresseDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10111,7 +10840,7 @@ impl<'a, C, NC, A> AddresseDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10120,13 +10849,13 @@ impl<'a, C, NC, A> AddresseDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10138,7 +10867,7 @@ impl<'a, C, NC, A> AddresseDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> AddresseDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -10148,7 +10877,7 @@ impl<'a, C, NC, A> AddresseDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the region for this request. + /// The name of the region for this request. pub fn region(mut self, new_value: &str) -> AddresseDeleteCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -10158,7 +10887,7 @@ impl<'a, C, NC, A> AddresseDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the address resource to delete. + /// Name of the address resource to delete. pub fn address(mut self, new_value: &str) -> AddresseDeleteCall<'a, C, NC, A> { self._address = new_value.to_string(); self @@ -10219,7 +10948,7 @@ impl<'a, C, NC, A> AddresseDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Creates a UrlMap resource in the specified project using the data included in the request. /// /// A builder for the *insert* method supported by a *urlMap* resource. -/// It is not used directly, but through a `UrlMapMethods`. +/// It is not used directly, but through a `UrlMapMethods` instance. /// /// # Example /// @@ -10284,7 +11013,7 @@ impl<'a, C, NC, A> UrlMapInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10341,7 +11070,7 @@ impl<'a, C, NC, A> UrlMapInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10357,7 +11086,6 @@ impl<'a, C, NC, A> UrlMapInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -10367,7 +11095,7 @@ impl<'a, C, NC, A> UrlMapInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10378,7 +11106,7 @@ impl<'a, C, NC, A> UrlMapInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10387,13 +11115,13 @@ impl<'a, C, NC, A> UrlMapInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10414,7 +11142,7 @@ impl<'a, C, NC, A> UrlMapInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> UrlMapInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -10475,7 +11203,7 @@ impl<'a, C, NC, A> UrlMapInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Returns the specified UrlMap resource. /// /// A builder for the *get* method supported by a *urlMap* resource. -/// It is not used directly, but through a `UrlMapMethods`. +/// It is not used directly, but through a `UrlMapMethods` instance. /// /// # Example /// @@ -10535,7 +11263,7 @@ impl<'a, C, NC, A> UrlMapGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "project", "urlMap"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10588,7 +11316,7 @@ impl<'a, C, NC, A> UrlMapGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10600,7 +11328,6 @@ impl<'a, C, NC, A> UrlMapGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -10610,7 +11337,7 @@ impl<'a, C, NC, A> UrlMapGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10621,7 +11348,7 @@ impl<'a, C, NC, A> UrlMapGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10630,13 +11357,13 @@ impl<'a, C, NC, A> UrlMapGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10648,7 +11375,7 @@ impl<'a, C, NC, A> UrlMapGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> UrlMapGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -10658,7 +11385,7 @@ impl<'a, C, NC, A> UrlMapGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the UrlMap resource to return. + /// Name of the UrlMap resource to return. pub fn url_map(mut self, new_value: &str) -> UrlMapGetCall<'a, C, NC, A> { self._url_map = new_value.to_string(); self @@ -10719,7 +11446,7 @@ impl<'a, C, NC, A> UrlMapGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Run static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. /// /// A builder for the *validate* method supported by a *urlMap* resource. -/// It is not used directly, but through a `UrlMapMethods`. +/// It is not used directly, but through a `UrlMapMethods` instance. /// /// # Example /// @@ -10786,7 +11513,7 @@ impl<'a, C, NC, A> UrlMapValidateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "urlMap"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10843,7 +11570,7 @@ impl<'a, C, NC, A> UrlMapValidateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10859,7 +11586,6 @@ impl<'a, C, NC, A> UrlMapValidateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -10869,7 +11595,7 @@ impl<'a, C, NC, A> UrlMapValidateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10880,7 +11606,7 @@ impl<'a, C, NC, A> UrlMapValidateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10889,13 +11615,13 @@ impl<'a, C, NC, A> UrlMapValidateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10916,7 +11642,7 @@ impl<'a, C, NC, A> UrlMapValidateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> UrlMapValidateCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -10926,7 +11652,7 @@ impl<'a, C, NC, A> UrlMapValidateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the UrlMap resource to be validated as. + /// Name of the UrlMap resource to be validated as. pub fn url_map(mut self, new_value: &str) -> UrlMapValidateCall<'a, C, NC, A> { self._url_map = new_value.to_string(); self @@ -10987,7 +11713,7 @@ impl<'a, C, NC, A> UrlMapValidateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieves the list of UrlMap resources available to the specified project. /// /// A builder for the *list* method supported by a *urlMap* resource. -/// It is not used directly, but through a `UrlMapMethods`. +/// It is not used directly, but through a `UrlMapMethods` instance. /// /// # Example /// @@ -11060,7 +11786,7 @@ impl<'a, C, NC, A> UrlMapListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11113,7 +11839,7 @@ impl<'a, C, NC, A> UrlMapListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11125,7 +11851,6 @@ impl<'a, C, NC, A> UrlMapListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -11135,7 +11860,7 @@ impl<'a, C, NC, A> UrlMapListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11146,7 +11871,7 @@ impl<'a, C, NC, A> UrlMapListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11155,13 +11880,13 @@ impl<'a, C, NC, A> UrlMapListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11173,7 +11898,7 @@ impl<'a, C, NC, A> UrlMapListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> UrlMapListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -11181,7 +11906,7 @@ impl<'a, C, NC, A> UrlMapListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> UrlMapListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -11189,7 +11914,7 @@ impl<'a, C, NC, A> UrlMapListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> UrlMapListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -11197,7 +11922,7 @@ impl<'a, C, NC, A> UrlMapListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> UrlMapListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -11258,7 +11983,7 @@ impl<'a, C, NC, A> UrlMapListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Update the entire content of the UrlMap resource. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *urlMap* resource. -/// It is not used directly, but through a `UrlMapMethods`. +/// It is not used directly, but through a `UrlMapMethods` instance. /// /// # Example /// @@ -11325,7 +12050,7 @@ impl<'a, C, NC, A> UrlMapPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "project", "urlMap"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11382,7 +12107,7 @@ impl<'a, C, NC, A> UrlMapPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11398,7 +12123,6 @@ impl<'a, C, NC, A> UrlMapPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -11408,7 +12132,7 @@ impl<'a, C, NC, A> UrlMapPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11419,7 +12143,7 @@ impl<'a, C, NC, A> UrlMapPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11428,13 +12152,13 @@ impl<'a, C, NC, A> UrlMapPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11455,7 +12179,7 @@ impl<'a, C, NC, A> UrlMapPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> UrlMapPatchCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -11465,7 +12189,7 @@ impl<'a, C, NC, A> UrlMapPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the UrlMap resource to update. + /// Name of the UrlMap resource to update. pub fn url_map(mut self, new_value: &str) -> UrlMapPatchCall<'a, C, NC, A> { self._url_map = new_value.to_string(); self @@ -11526,7 +12250,7 @@ impl<'a, C, NC, A> UrlMapPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Update the entire content of the UrlMap resource. /// /// A builder for the *update* method supported by a *urlMap* resource. -/// It is not used directly, but through a `UrlMapMethods`. +/// It is not used directly, but through a `UrlMapMethods` instance. /// /// # Example /// @@ -11593,7 +12317,7 @@ impl<'a, C, NC, A> UrlMapUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "project", "urlMap"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11650,7 +12374,7 @@ impl<'a, C, NC, A> UrlMapUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11666,7 +12390,6 @@ impl<'a, C, NC, A> UrlMapUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -11676,7 +12399,7 @@ impl<'a, C, NC, A> UrlMapUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11687,7 +12410,7 @@ impl<'a, C, NC, A> UrlMapUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11696,13 +12419,13 @@ impl<'a, C, NC, A> UrlMapUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11723,7 +12446,7 @@ impl<'a, C, NC, A> UrlMapUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> UrlMapUpdateCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -11733,7 +12456,7 @@ impl<'a, C, NC, A> UrlMapUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the UrlMap resource to update. + /// Name of the UrlMap resource to update. pub fn url_map(mut self, new_value: &str) -> UrlMapUpdateCall<'a, C, NC, A> { self._url_map = new_value.to_string(); self @@ -11794,7 +12517,7 @@ impl<'a, C, NC, A> UrlMapUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Deletes the specified UrlMap resource. /// /// A builder for the *delete* method supported by a *urlMap* resource. -/// It is not used directly, but through a `UrlMapMethods`. +/// It is not used directly, but through a `UrlMapMethods` instance. /// /// # Example /// @@ -11854,7 +12577,7 @@ impl<'a, C, NC, A> UrlMapDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "project", "urlMap"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11907,7 +12630,7 @@ impl<'a, C, NC, A> UrlMapDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11919,7 +12642,6 @@ impl<'a, C, NC, A> UrlMapDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -11929,7 +12651,7 @@ impl<'a, C, NC, A> UrlMapDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11940,7 +12662,7 @@ impl<'a, C, NC, A> UrlMapDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11949,13 +12671,13 @@ impl<'a, C, NC, A> UrlMapDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11967,7 +12689,7 @@ impl<'a, C, NC, A> UrlMapDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> UrlMapDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -11977,7 +12699,7 @@ impl<'a, C, NC, A> UrlMapDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the UrlMap resource to delete. + /// Name of the UrlMap resource to delete. pub fn url_map(mut self, new_value: &str) -> UrlMapDeleteCall<'a, C, NC, A> { self._url_map = new_value.to_string(); self @@ -12038,7 +12760,7 @@ impl<'a, C, NC, A> UrlMapDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Creates an address resource in the specified project using the data included in the request. /// /// A builder for the *insert* method supported by a *globalAddresse* resource. -/// It is not used directly, but through a `GlobalAddresseMethods`. +/// It is not used directly, but through a `GlobalAddresseMethods` instance. /// /// # Example /// @@ -12103,7 +12825,7 @@ impl<'a, C, NC, A> GlobalAddresseInsertCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12160,7 +12882,7 @@ impl<'a, C, NC, A> GlobalAddresseInsertCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12176,7 +12898,6 @@ impl<'a, C, NC, A> GlobalAddresseInsertCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -12186,7 +12907,7 @@ impl<'a, C, NC, A> GlobalAddresseInsertCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12197,7 +12918,7 @@ impl<'a, C, NC, A> GlobalAddresseInsertCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12206,13 +12927,13 @@ impl<'a, C, NC, A> GlobalAddresseInsertCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12233,7 +12954,7 @@ impl<'a, C, NC, A> GlobalAddresseInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> GlobalAddresseInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -12294,7 +13015,7 @@ impl<'a, C, NC, A> GlobalAddresseInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Retrieves the list of global address resources. /// /// A builder for the *list* method supported by a *globalAddresse* resource. -/// It is not used directly, but through a `GlobalAddresseMethods`. +/// It is not used directly, but through a `GlobalAddresseMethods` instance. /// /// # Example /// @@ -12367,7 +13088,7 @@ impl<'a, C, NC, A> GlobalAddresseListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12420,7 +13141,7 @@ impl<'a, C, NC, A> GlobalAddresseListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12432,7 +13153,6 @@ impl<'a, C, NC, A> GlobalAddresseListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -12442,7 +13162,7 @@ impl<'a, C, NC, A> GlobalAddresseListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12453,7 +13173,7 @@ impl<'a, C, NC, A> GlobalAddresseListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12462,13 +13182,13 @@ impl<'a, C, NC, A> GlobalAddresseListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12480,7 +13200,7 @@ impl<'a, C, NC, A> GlobalAddresseListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> GlobalAddresseListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -12488,7 +13208,7 @@ impl<'a, C, NC, A> GlobalAddresseListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> GlobalAddresseListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -12496,7 +13216,7 @@ impl<'a, C, NC, A> GlobalAddresseListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> GlobalAddresseListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -12504,7 +13224,7 @@ impl<'a, C, NC, A> GlobalAddresseListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> GlobalAddresseListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -12565,7 +13285,7 @@ impl<'a, C, NC, A> GlobalAddresseListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Returns the specified address resource. /// /// A builder for the *get* method supported by a *globalAddresse* resource. -/// It is not used directly, but through a `GlobalAddresseMethods`. +/// It is not used directly, but through a `GlobalAddresseMethods` instance. /// /// # Example /// @@ -12625,7 +13345,7 @@ impl<'a, C, NC, A> GlobalAddresseGetCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "project", "address"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12678,7 +13398,7 @@ impl<'a, C, NC, A> GlobalAddresseGetCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12690,7 +13410,6 @@ impl<'a, C, NC, A> GlobalAddresseGetCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -12700,7 +13419,7 @@ impl<'a, C, NC, A> GlobalAddresseGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12711,7 +13430,7 @@ impl<'a, C, NC, A> GlobalAddresseGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12720,13 +13439,13 @@ impl<'a, C, NC, A> GlobalAddresseGetCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12738,7 +13457,7 @@ impl<'a, C, NC, A> GlobalAddresseGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> GlobalAddresseGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -12748,7 +13467,7 @@ impl<'a, C, NC, A> GlobalAddresseGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the address resource to return. + /// Name of the address resource to return. pub fn address(mut self, new_value: &str) -> GlobalAddresseGetCall<'a, C, NC, A> { self._address = new_value.to_string(); self @@ -12809,7 +13528,7 @@ impl<'a, C, NC, A> GlobalAddresseGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Deletes the specified address resource. /// /// A builder for the *delete* method supported by a *globalAddresse* resource. -/// It is not used directly, but through a `GlobalAddresseMethods`. +/// It is not used directly, but through a `GlobalAddresseMethods` instance. /// /// # Example /// @@ -12869,7 +13588,7 @@ impl<'a, C, NC, A> GlobalAddresseDeleteCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "project", "address"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12922,7 +13641,7 @@ impl<'a, C, NC, A> GlobalAddresseDeleteCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12934,7 +13653,6 @@ impl<'a, C, NC, A> GlobalAddresseDeleteCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -12944,7 +13662,7 @@ impl<'a, C, NC, A> GlobalAddresseDeleteCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12955,7 +13673,7 @@ impl<'a, C, NC, A> GlobalAddresseDeleteCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12964,13 +13682,13 @@ impl<'a, C, NC, A> GlobalAddresseDeleteCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12982,7 +13700,7 @@ impl<'a, C, NC, A> GlobalAddresseDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> GlobalAddresseDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -12992,7 +13710,7 @@ impl<'a, C, NC, A> GlobalAddresseDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the address resource to delete. + /// Name of the address resource to delete. pub fn address(mut self, new_value: &str) -> GlobalAddresseDeleteCall<'a, C, NC, A> { self._address = new_value.to_string(); self @@ -13053,7 +13771,7 @@ impl<'a, C, NC, A> GlobalAddresseDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Returns the specified persistent disk snapshot resource. /// /// A builder for the *get* method supported by a *snapshot* resource. -/// It is not used directly, but through a `SnapshotMethods`. +/// It is not used directly, but through a `SnapshotMethods` instance. /// /// # Example /// @@ -13113,7 +13831,7 @@ impl<'a, C, NC, A> SnapshotGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "project", "snapshot"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13166,7 +13884,7 @@ impl<'a, C, NC, A> SnapshotGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13178,7 +13896,6 @@ impl<'a, C, NC, A> SnapshotGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -13188,7 +13905,7 @@ impl<'a, C, NC, A> SnapshotGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13199,7 +13916,7 @@ impl<'a, C, NC, A> SnapshotGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13208,13 +13925,13 @@ impl<'a, C, NC, A> SnapshotGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13226,7 +13943,7 @@ impl<'a, C, NC, A> SnapshotGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> SnapshotGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -13236,7 +13953,7 @@ impl<'a, C, NC, A> SnapshotGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the persistent disk snapshot resource to return. + /// Name of the persistent disk snapshot resource to return. pub fn snapshot(mut self, new_value: &str) -> SnapshotGetCall<'a, C, NC, A> { self._snapshot = new_value.to_string(); self @@ -13297,7 +14014,7 @@ impl<'a, C, NC, A> SnapshotGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Retrieves the list of persistent disk snapshot resources contained within the specified project. /// /// A builder for the *list* method supported by a *snapshot* resource. -/// It is not used directly, but through a `SnapshotMethods`. +/// It is not used directly, but through a `SnapshotMethods` instance. /// /// # Example /// @@ -13370,7 +14087,7 @@ impl<'a, C, NC, A> SnapshotListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13423,7 +14140,7 @@ impl<'a, C, NC, A> SnapshotListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13435,7 +14152,6 @@ impl<'a, C, NC, A> SnapshotListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -13445,7 +14161,7 @@ impl<'a, C, NC, A> SnapshotListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13456,7 +14172,7 @@ impl<'a, C, NC, A> SnapshotListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13465,13 +14181,13 @@ impl<'a, C, NC, A> SnapshotListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13483,7 +14199,7 @@ impl<'a, C, NC, A> SnapshotListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> SnapshotListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -13491,7 +14207,7 @@ impl<'a, C, NC, A> SnapshotListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> SnapshotListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -13499,7 +14215,7 @@ impl<'a, C, NC, A> SnapshotListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> SnapshotListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -13507,7 +14223,7 @@ impl<'a, C, NC, A> SnapshotListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> SnapshotListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -13568,7 +14284,7 @@ impl<'a, C, NC, A> SnapshotListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Deletes the specified persistent disk snapshot resource. /// /// A builder for the *delete* method supported by a *snapshot* resource. -/// It is not used directly, but through a `SnapshotMethods`. +/// It is not used directly, but through a `SnapshotMethods` instance. /// /// # Example /// @@ -13628,7 +14344,7 @@ impl<'a, C, NC, A> SnapshotDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "snapshot"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13681,7 +14397,7 @@ impl<'a, C, NC, A> SnapshotDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13693,7 +14409,6 @@ impl<'a, C, NC, A> SnapshotDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -13703,7 +14418,7 @@ impl<'a, C, NC, A> SnapshotDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13714,7 +14429,7 @@ impl<'a, C, NC, A> SnapshotDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13723,13 +14438,13 @@ impl<'a, C, NC, A> SnapshotDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13741,7 +14456,7 @@ impl<'a, C, NC, A> SnapshotDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> SnapshotDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -13751,7 +14466,7 @@ impl<'a, C, NC, A> SnapshotDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the persistent disk snapshot resource to delete. + /// Name of the persistent disk snapshot resource to delete. pub fn snapshot(mut self, new_value: &str) -> SnapshotDeleteCall<'a, C, NC, A> { self._snapshot = new_value.to_string(); self @@ -13812,7 +14527,7 @@ impl<'a, C, NC, A> SnapshotDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Returns the specified disk type resource. /// /// A builder for the *get* method supported by a *diskType* resource. -/// It is not used directly, but through a `DiskTypeMethods`. +/// It is not used directly, but through a `DiskTypeMethods` instance. /// /// # Example /// @@ -13874,7 +14589,7 @@ impl<'a, C, NC, A> DiskTypeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "project", "zone", "diskType"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13927,7 +14642,7 @@ impl<'a, C, NC, A> DiskTypeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13939,7 +14654,6 @@ impl<'a, C, NC, A> DiskTypeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -13949,7 +14663,7 @@ impl<'a, C, NC, A> DiskTypeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13960,7 +14674,7 @@ impl<'a, C, NC, A> DiskTypeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13969,13 +14683,13 @@ impl<'a, C, NC, A> DiskTypeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13987,7 +14701,7 @@ impl<'a, C, NC, A> DiskTypeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskTypeGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -13997,7 +14711,7 @@ impl<'a, C, NC, A> DiskTypeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> DiskTypeGetCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -14007,7 +14721,7 @@ impl<'a, C, NC, A> DiskTypeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the disk type resource to return. + /// Name of the disk type resource to return. pub fn disk_type(mut self, new_value: &str) -> DiskTypeGetCall<'a, C, NC, A> { self._disk_type = new_value.to_string(); self @@ -14068,7 +14782,7 @@ impl<'a, C, NC, A> DiskTypeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Retrieves the list of disk type resources grouped by scope. /// /// A builder for the *aggregatedList* method supported by a *diskType* resource. -/// It is not used directly, but through a `DiskTypeMethods`. +/// It is not used directly, but through a `DiskTypeMethods` instance. /// /// # Example /// @@ -14141,7 +14855,7 @@ impl<'a, C, NC, A> DiskTypeAggregatedListCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14194,7 +14908,7 @@ impl<'a, C, NC, A> DiskTypeAggregatedListCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14206,7 +14920,6 @@ impl<'a, C, NC, A> DiskTypeAggregatedListCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -14216,7 +14929,7 @@ impl<'a, C, NC, A> DiskTypeAggregatedListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14227,7 +14940,7 @@ impl<'a, C, NC, A> DiskTypeAggregatedListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14236,13 +14949,13 @@ impl<'a, C, NC, A> DiskTypeAggregatedListCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14254,7 +14967,7 @@ impl<'a, C, NC, A> DiskTypeAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskTypeAggregatedListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -14262,7 +14975,7 @@ impl<'a, C, NC, A> DiskTypeAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> DiskTypeAggregatedListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -14270,7 +14983,7 @@ impl<'a, C, NC, A> DiskTypeAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> DiskTypeAggregatedListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -14278,7 +14991,7 @@ impl<'a, C, NC, A> DiskTypeAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> DiskTypeAggregatedListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -14339,7 +15052,7 @@ impl<'a, C, NC, A> DiskTypeAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Retrieves the list of disk type resources available to the specified project. /// /// A builder for the *list* method supported by a *diskType* resource. -/// It is not used directly, but through a `DiskTypeMethods`. +/// It is not used directly, but through a `DiskTypeMethods` instance. /// /// # Example /// @@ -14414,7 +15127,7 @@ impl<'a, C, NC, A> DiskTypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "project", "zone", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14467,7 +15180,7 @@ impl<'a, C, NC, A> DiskTypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14479,7 +15192,6 @@ impl<'a, C, NC, A> DiskTypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -14489,7 +15201,7 @@ impl<'a, C, NC, A> DiskTypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14500,7 +15212,7 @@ impl<'a, C, NC, A> DiskTypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14509,13 +15221,13 @@ impl<'a, C, NC, A> DiskTypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14527,7 +15239,7 @@ impl<'a, C, NC, A> DiskTypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> DiskTypeListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -14537,7 +15249,7 @@ impl<'a, C, NC, A> DiskTypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> DiskTypeListCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -14545,7 +15257,7 @@ impl<'a, C, NC, A> DiskTypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> DiskTypeListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -14553,7 +15265,7 @@ impl<'a, C, NC, A> DiskTypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> DiskTypeListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -14561,7 +15273,7 @@ impl<'a, C, NC, A> DiskTypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> DiskTypeListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -14622,7 +15334,7 @@ impl<'a, C, NC, A> DiskTypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Returns the specified zone resource. /// /// A builder for the *get* method supported by a *zone* resource. -/// It is not used directly, but through a `ZoneMethods`. +/// It is not used directly, but through a `ZoneMethods` instance. /// /// # Example /// @@ -14682,7 +15394,7 @@ impl<'a, C, NC, A> ZoneGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "project", "zone"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14735,7 +15447,7 @@ impl<'a, C, NC, A> ZoneGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14747,7 +15459,6 @@ impl<'a, C, NC, A> ZoneGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -14757,7 +15468,7 @@ impl<'a, C, NC, A> ZoneGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14768,7 +15479,7 @@ impl<'a, C, NC, A> ZoneGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14777,13 +15488,13 @@ impl<'a, C, NC, A> ZoneGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14795,7 +15506,7 @@ impl<'a, C, NC, A> ZoneGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ZoneGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -14805,7 +15516,7 @@ impl<'a, C, NC, A> ZoneGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the zone resource to return. + /// Name of the zone resource to return. pub fn zone(mut self, new_value: &str) -> ZoneGetCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -14866,7 +15577,7 @@ impl<'a, C, NC, A> ZoneGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Retrieves the list of zone resources available to the specified project. /// /// A builder for the *list* method supported by a *zone* resource. -/// It is not used directly, but through a `ZoneMethods`. +/// It is not used directly, but through a `ZoneMethods` instance. /// /// # Example /// @@ -14939,7 +15650,7 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14992,7 +15703,7 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15004,7 +15715,6 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -15014,7 +15724,7 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15025,7 +15735,7 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15034,13 +15744,13 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15052,7 +15762,7 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ZoneListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -15060,7 +15770,7 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> ZoneListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -15068,7 +15778,7 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> ZoneListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -15076,7 +15786,7 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> ZoneListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -15137,7 +15847,7 @@ impl<'a, C, NC, A> ZoneListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets an instance's scheduling options. /// /// A builder for the *setScheduling* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -15206,7 +15916,7 @@ impl<'a, C, NC, A> InstanceSetSchedulingCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "project", "zone", "instance"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15263,7 +15973,7 @@ impl<'a, C, NC, A> InstanceSetSchedulingCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15279,7 +15989,6 @@ impl<'a, C, NC, A> InstanceSetSchedulingCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -15289,7 +15998,7 @@ impl<'a, C, NC, A> InstanceSetSchedulingCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15300,7 +16009,7 @@ impl<'a, C, NC, A> InstanceSetSchedulingCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15309,13 +16018,13 @@ impl<'a, C, NC, A> InstanceSetSchedulingCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15336,7 +16045,7 @@ impl<'a, C, NC, A> InstanceSetSchedulingCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceSetSchedulingCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -15346,7 +16055,7 @@ impl<'a, C, NC, A> InstanceSetSchedulingCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceSetSchedulingCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -15356,7 +16065,7 @@ impl<'a, C, NC, A> InstanceSetSchedulingCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Instance name. + /// Instance name. pub fn instance(mut self, new_value: &str) -> InstanceSetSchedulingCall<'a, C, NC, A> { self._instance = new_value.to_string(); self @@ -15417,7 +16126,7 @@ impl<'a, C, NC, A> InstanceSetSchedulingCall<'a, C, NC, A> where NC: hyper::net: /// Deletes the specified Instance resource. For more information, see Shutting down an instance. /// /// A builder for the *delete* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -15479,7 +16188,7 @@ impl<'a, C, NC, A> InstanceDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "zone", "instance"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15532,7 +16241,7 @@ impl<'a, C, NC, A> InstanceDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15544,7 +16253,6 @@ impl<'a, C, NC, A> InstanceDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -15554,7 +16262,7 @@ impl<'a, C, NC, A> InstanceDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15565,7 +16273,7 @@ impl<'a, C, NC, A> InstanceDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15574,13 +16282,13 @@ impl<'a, C, NC, A> InstanceDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15592,7 +16300,7 @@ impl<'a, C, NC, A> InstanceDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -15602,7 +16310,7 @@ impl<'a, C, NC, A> InstanceDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceDeleteCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -15612,7 +16320,7 @@ impl<'a, C, NC, A> InstanceDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the instance resource to delete. + /// Name of the instance resource to delete. pub fn instance(mut self, new_value: &str) -> InstanceDeleteCall<'a, C, NC, A> { self._instance = new_value.to_string(); self @@ -15673,7 +16381,7 @@ impl<'a, C, NC, A> InstanceDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Returns the specified instance's serial port output. /// /// A builder for the *getSerialPortOutput* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -15735,7 +16443,7 @@ impl<'a, C, NC, A> InstanceGetSerialPortOutputCall<'a, C, NC, A> where NC: hyper for &field in ["alt", "project", "zone", "instance"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15788,7 +16496,7 @@ impl<'a, C, NC, A> InstanceGetSerialPortOutputCall<'a, C, NC, A> where NC: hyper } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15800,7 +16508,6 @@ impl<'a, C, NC, A> InstanceGetSerialPortOutputCall<'a, C, NC, A> where NC: hyper dlg.pre_request(); req.send() - }; match req_result { @@ -15810,7 +16517,7 @@ impl<'a, C, NC, A> InstanceGetSerialPortOutputCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15821,7 +16528,7 @@ impl<'a, C, NC, A> InstanceGetSerialPortOutputCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15830,13 +16537,13 @@ impl<'a, C, NC, A> InstanceGetSerialPortOutputCall<'a, C, NC, A> where NC: hyper Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15848,7 +16555,7 @@ impl<'a, C, NC, A> InstanceGetSerialPortOutputCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceGetSerialPortOutputCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -15858,7 +16565,7 @@ impl<'a, C, NC, A> InstanceGetSerialPortOutputCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceGetSerialPortOutputCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -15868,7 +16575,7 @@ impl<'a, C, NC, A> InstanceGetSerialPortOutputCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the instance scoping this request. + /// Name of the instance scoping this request. pub fn instance(mut self, new_value: &str) -> InstanceGetSerialPortOutputCall<'a, C, NC, A> { self._instance = new_value.to_string(); self @@ -15929,7 +16636,7 @@ impl<'a, C, NC, A> InstanceGetSerialPortOutputCall<'a, C, NC, A> where NC: hyper /// Sets the auto-delete flag for a disk attached to an instance. /// /// A builder for the *setDiskAutoDelete* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -15995,7 +16702,7 @@ impl<'a, C, NC, A> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt", "project", "zone", "instance", "autoDelete", "deviceName"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16048,7 +16755,7 @@ impl<'a, C, NC, A> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16060,7 +16767,6 @@ impl<'a, C, NC, A> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -16070,7 +16776,7 @@ impl<'a, C, NC, A> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16081,7 +16787,7 @@ impl<'a, C, NC, A> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16090,13 +16796,13 @@ impl<'a, C, NC, A> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16108,7 +16814,7 @@ impl<'a, C, NC, A> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -16118,7 +16824,7 @@ impl<'a, C, NC, A> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -16128,7 +16834,7 @@ impl<'a, C, NC, A> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The instance name. + /// The instance name. pub fn instance(mut self, new_value: &str) -> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> { self._instance = new_value.to_string(); self @@ -16138,7 +16844,7 @@ impl<'a, C, NC, A> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Whether to auto-delete the disk when the instance is deleted. + /// Whether to auto-delete the disk when the instance is deleted. pub fn auto_delete(mut self, new_value: bool) -> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> { self._auto_delete = new_value; self @@ -16148,7 +16854,7 @@ impl<'a, C, NC, A> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The device name of the disk to modify. + /// The device name of the disk to modify. pub fn device_name(mut self, new_value: &str) -> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> { self._device_name = new_value.to_string(); self @@ -16209,7 +16915,7 @@ impl<'a, C, NC, A> InstanceSetDiskAutoDeleteCall<'a, C, NC, A> where NC: hyper:: /// Adds an access config to an instance's network interface. /// /// A builder for the *addAccessConfig* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -16280,7 +16986,7 @@ impl<'a, C, NC, A> InstanceAddAccessConfigCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "project", "zone", "instance", "networkInterface"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16337,7 +17043,7 @@ impl<'a, C, NC, A> InstanceAddAccessConfigCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16353,7 +17059,6 @@ impl<'a, C, NC, A> InstanceAddAccessConfigCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -16363,7 +17068,7 @@ impl<'a, C, NC, A> InstanceAddAccessConfigCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16374,7 +17079,7 @@ impl<'a, C, NC, A> InstanceAddAccessConfigCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16383,13 +17088,13 @@ impl<'a, C, NC, A> InstanceAddAccessConfigCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16410,7 +17115,7 @@ impl<'a, C, NC, A> InstanceAddAccessConfigCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceAddAccessConfigCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -16420,7 +17125,7 @@ impl<'a, C, NC, A> InstanceAddAccessConfigCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceAddAccessConfigCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -16430,7 +17135,7 @@ impl<'a, C, NC, A> InstanceAddAccessConfigCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The instance name for this request. + /// The instance name for this request. pub fn instance(mut self, new_value: &str) -> InstanceAddAccessConfigCall<'a, C, NC, A> { self._instance = new_value.to_string(); self @@ -16440,7 +17145,7 @@ impl<'a, C, NC, A> InstanceAddAccessConfigCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the network interface to add to this instance. + /// The name of the network interface to add to this instance. pub fn network_interface(mut self, new_value: &str) -> InstanceAddAccessConfigCall<'a, C, NC, A> { self._network_interface = new_value.to_string(); self @@ -16501,7 +17206,7 @@ impl<'a, C, NC, A> InstanceAddAccessConfigCall<'a, C, NC, A> where NC: hyper::ne /// This method starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance. /// /// A builder for the *start* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -16563,7 +17268,7 @@ impl<'a, C, NC, A> InstanceStartCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "project", "zone", "instance"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16616,7 +17321,7 @@ impl<'a, C, NC, A> InstanceStartCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16628,7 +17333,6 @@ impl<'a, C, NC, A> InstanceStartCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -16638,7 +17342,7 @@ impl<'a, C, NC, A> InstanceStartCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16649,7 +17353,7 @@ impl<'a, C, NC, A> InstanceStartCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16658,13 +17362,13 @@ impl<'a, C, NC, A> InstanceStartCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16676,7 +17380,7 @@ impl<'a, C, NC, A> InstanceStartCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceStartCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -16686,7 +17390,7 @@ impl<'a, C, NC, A> InstanceStartCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceStartCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -16696,7 +17400,7 @@ impl<'a, C, NC, A> InstanceStartCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the instance resource to start. + /// Name of the instance resource to start. pub fn instance(mut self, new_value: &str) -> InstanceStartCall<'a, C, NC, A> { self._instance = new_value.to_string(); self @@ -16757,7 +17461,7 @@ impl<'a, C, NC, A> InstanceStartCall<'a, C, NC, A> where NC: hyper::net::Network /// Returns the specified instance resource. /// /// A builder for the *get* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -16819,7 +17523,7 @@ impl<'a, C, NC, A> InstanceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "project", "zone", "instance"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16872,7 +17576,7 @@ impl<'a, C, NC, A> InstanceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16884,7 +17588,6 @@ impl<'a, C, NC, A> InstanceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -16894,7 +17597,7 @@ impl<'a, C, NC, A> InstanceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16905,7 +17608,7 @@ impl<'a, C, NC, A> InstanceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16914,13 +17617,13 @@ impl<'a, C, NC, A> InstanceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16932,7 +17635,7 @@ impl<'a, C, NC, A> InstanceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -16942,7 +17645,7 @@ impl<'a, C, NC, A> InstanceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the The name of the zone for this request.. + /// The name of the The name of the zone for this request.. pub fn zone(mut self, new_value: &str) -> InstanceGetCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -16952,7 +17655,7 @@ impl<'a, C, NC, A> InstanceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the instance resource to return. + /// Name of the instance resource to return. pub fn instance(mut self, new_value: &str) -> InstanceGetCall<'a, C, NC, A> { self._instance = new_value.to_string(); self @@ -17013,7 +17716,7 @@ impl<'a, C, NC, A> InstanceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets tags for the specified instance to the data included in the request. /// /// A builder for the *setTags* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -17082,7 +17785,7 @@ impl<'a, C, NC, A> InstanceSetTagCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "zone", "instance"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17139,7 +17842,7 @@ impl<'a, C, NC, A> InstanceSetTagCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17155,7 +17858,6 @@ impl<'a, C, NC, A> InstanceSetTagCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -17165,7 +17867,7 @@ impl<'a, C, NC, A> InstanceSetTagCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17176,7 +17878,7 @@ impl<'a, C, NC, A> InstanceSetTagCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -17185,13 +17887,13 @@ impl<'a, C, NC, A> InstanceSetTagCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -17212,7 +17914,7 @@ impl<'a, C, NC, A> InstanceSetTagCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceSetTagCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -17222,7 +17924,7 @@ impl<'a, C, NC, A> InstanceSetTagCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceSetTagCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -17232,7 +17934,7 @@ impl<'a, C, NC, A> InstanceSetTagCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the instance scoping this request. + /// Name of the instance scoping this request. pub fn instance(mut self, new_value: &str) -> InstanceSetTagCall<'a, C, NC, A> { self._instance = new_value.to_string(); self @@ -17293,7 +17995,7 @@ impl<'a, C, NC, A> InstanceSetTagCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets metadata for the specified instance to the data included in the request. /// /// A builder for the *setMetadata* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -17362,7 +18064,7 @@ impl<'a, C, NC, A> InstanceSetMetadataCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "project", "zone", "instance"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17419,7 +18121,7 @@ impl<'a, C, NC, A> InstanceSetMetadataCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17435,7 +18137,6 @@ impl<'a, C, NC, A> InstanceSetMetadataCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -17445,7 +18146,7 @@ impl<'a, C, NC, A> InstanceSetMetadataCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17456,7 +18157,7 @@ impl<'a, C, NC, A> InstanceSetMetadataCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -17465,13 +18166,13 @@ impl<'a, C, NC, A> InstanceSetMetadataCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -17492,7 +18193,7 @@ impl<'a, C, NC, A> InstanceSetMetadataCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceSetMetadataCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -17502,7 +18203,7 @@ impl<'a, C, NC, A> InstanceSetMetadataCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceSetMetadataCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -17512,7 +18213,7 @@ impl<'a, C, NC, A> InstanceSetMetadataCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the instance scoping this request. + /// Name of the instance scoping this request. pub fn instance(mut self, new_value: &str) -> InstanceSetMetadataCall<'a, C, NC, A> { self._instance = new_value.to_string(); self @@ -17573,7 +18274,7 @@ impl<'a, C, NC, A> InstanceSetMetadataCall<'a, C, NC, A> where NC: hyper::net::N /// Detaches a disk from an instance. /// /// A builder for the *detachDisk* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -17637,7 +18338,7 @@ impl<'a, C, NC, A> InstanceDetachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "project", "zone", "instance", "deviceName"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17690,7 +18391,7 @@ impl<'a, C, NC, A> InstanceDetachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17702,7 +18403,6 @@ impl<'a, C, NC, A> InstanceDetachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -17712,7 +18412,7 @@ impl<'a, C, NC, A> InstanceDetachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17723,7 +18423,7 @@ impl<'a, C, NC, A> InstanceDetachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -17732,13 +18432,13 @@ impl<'a, C, NC, A> InstanceDetachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -17750,7 +18450,7 @@ impl<'a, C, NC, A> InstanceDetachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceDetachDiskCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -17760,7 +18460,7 @@ impl<'a, C, NC, A> InstanceDetachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceDetachDiskCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -17770,7 +18470,7 @@ impl<'a, C, NC, A> InstanceDetachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Instance name. + /// Instance name. pub fn instance(mut self, new_value: &str) -> InstanceDetachDiskCall<'a, C, NC, A> { self._instance = new_value.to_string(); self @@ -17780,7 +18480,7 @@ impl<'a, C, NC, A> InstanceDetachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Disk device name to detach. + /// Disk device name to detach. pub fn device_name(mut self, new_value: &str) -> InstanceDetachDiskCall<'a, C, NC, A> { self._device_name = new_value.to_string(); self @@ -17841,7 +18541,7 @@ impl<'a, C, NC, A> InstanceDetachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne /// This method stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses,will continue to be charged until they are deleted. For more information, see Stopping an instance. /// /// A builder for the *stop* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -17903,7 +18603,7 @@ impl<'a, C, NC, A> InstanceStopCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "project", "zone", "instance"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17956,7 +18656,7 @@ impl<'a, C, NC, A> InstanceStopCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17968,7 +18668,6 @@ impl<'a, C, NC, A> InstanceStopCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -17978,7 +18677,7 @@ impl<'a, C, NC, A> InstanceStopCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17989,7 +18688,7 @@ impl<'a, C, NC, A> InstanceStopCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -17998,13 +18697,13 @@ impl<'a, C, NC, A> InstanceStopCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18016,7 +18715,7 @@ impl<'a, C, NC, A> InstanceStopCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceStopCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -18026,7 +18725,7 @@ impl<'a, C, NC, A> InstanceStopCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceStopCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -18036,7 +18735,7 @@ impl<'a, C, NC, A> InstanceStopCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the instance resource to start. + /// Name of the instance resource to start. pub fn instance(mut self, new_value: &str) -> InstanceStopCall<'a, C, NC, A> { self._instance = new_value.to_string(); self @@ -18097,7 +18796,7 @@ impl<'a, C, NC, A> InstanceStopCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Creates an instance resource in the specified project using the data included in the request. /// /// A builder for the *insert* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -18164,7 +18863,7 @@ impl<'a, C, NC, A> InstanceInsertCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "zone"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18221,7 +18920,7 @@ impl<'a, C, NC, A> InstanceInsertCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18237,7 +18936,6 @@ impl<'a, C, NC, A> InstanceInsertCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -18247,7 +18945,7 @@ impl<'a, C, NC, A> InstanceInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18258,7 +18956,7 @@ impl<'a, C, NC, A> InstanceInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -18267,13 +18965,13 @@ impl<'a, C, NC, A> InstanceInsertCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18294,7 +18992,7 @@ impl<'a, C, NC, A> InstanceInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -18304,7 +19002,7 @@ impl<'a, C, NC, A> InstanceInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceInsertCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -18365,7 +19063,7 @@ impl<'a, C, NC, A> InstanceInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Performs a hard reset on the instance. /// /// A builder for the *reset* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -18427,7 +19125,7 @@ impl<'a, C, NC, A> InstanceResetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "project", "zone", "instance"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18480,7 +19178,7 @@ impl<'a, C, NC, A> InstanceResetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18492,7 +19190,6 @@ impl<'a, C, NC, A> InstanceResetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -18502,7 +19199,7 @@ impl<'a, C, NC, A> InstanceResetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18513,7 +19210,7 @@ impl<'a, C, NC, A> InstanceResetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -18522,13 +19219,13 @@ impl<'a, C, NC, A> InstanceResetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18540,7 +19237,7 @@ impl<'a, C, NC, A> InstanceResetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceResetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -18550,7 +19247,7 @@ impl<'a, C, NC, A> InstanceResetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceResetCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -18560,7 +19257,7 @@ impl<'a, C, NC, A> InstanceResetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the instance scoping this request. + /// Name of the instance scoping this request. pub fn instance(mut self, new_value: &str) -> InstanceResetCall<'a, C, NC, A> { self._instance = new_value.to_string(); self @@ -18621,7 +19318,7 @@ impl<'a, C, NC, A> InstanceResetCall<'a, C, NC, A> where NC: hyper::net::Network /// Deletes an access config from an instance's network interface. /// /// A builder for the *deleteAccessConfig* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -18687,7 +19384,7 @@ impl<'a, C, NC, A> InstanceDeleteAccessConfigCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "project", "zone", "instance", "accessConfig", "networkInterface"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18740,7 +19437,7 @@ impl<'a, C, NC, A> InstanceDeleteAccessConfigCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18752,7 +19449,6 @@ impl<'a, C, NC, A> InstanceDeleteAccessConfigCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -18762,7 +19458,7 @@ impl<'a, C, NC, A> InstanceDeleteAccessConfigCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18773,7 +19469,7 @@ impl<'a, C, NC, A> InstanceDeleteAccessConfigCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -18782,13 +19478,13 @@ impl<'a, C, NC, A> InstanceDeleteAccessConfigCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18800,7 +19496,7 @@ impl<'a, C, NC, A> InstanceDeleteAccessConfigCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceDeleteAccessConfigCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -18810,7 +19506,7 @@ impl<'a, C, NC, A> InstanceDeleteAccessConfigCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceDeleteAccessConfigCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -18820,7 +19516,7 @@ impl<'a, C, NC, A> InstanceDeleteAccessConfigCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The instance name for this request. + /// The instance name for this request. pub fn instance(mut self, new_value: &str) -> InstanceDeleteAccessConfigCall<'a, C, NC, A> { self._instance = new_value.to_string(); self @@ -18830,7 +19526,7 @@ impl<'a, C, NC, A> InstanceDeleteAccessConfigCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the access config to delete. + /// The name of the access config to delete. pub fn access_config(mut self, new_value: &str) -> InstanceDeleteAccessConfigCall<'a, C, NC, A> { self._access_config = new_value.to_string(); self @@ -18840,7 +19536,7 @@ impl<'a, C, NC, A> InstanceDeleteAccessConfigCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the network interface. + /// The name of the network interface. pub fn network_interface(mut self, new_value: &str) -> InstanceDeleteAccessConfigCall<'a, C, NC, A> { self._network_interface = new_value.to_string(); self @@ -18901,7 +19597,7 @@ impl<'a, C, NC, A> InstanceDeleteAccessConfigCall<'a, C, NC, A> where NC: hyper: /// Attaches a Disk resource to an instance. /// /// A builder for the *attachDisk* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -18970,7 +19666,7 @@ impl<'a, C, NC, A> InstanceAttachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "project", "zone", "instance"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19027,7 +19723,7 @@ impl<'a, C, NC, A> InstanceAttachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19043,7 +19739,6 @@ impl<'a, C, NC, A> InstanceAttachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -19053,7 +19748,7 @@ impl<'a, C, NC, A> InstanceAttachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19064,7 +19759,7 @@ impl<'a, C, NC, A> InstanceAttachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19073,13 +19768,13 @@ impl<'a, C, NC, A> InstanceAttachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19100,7 +19795,7 @@ impl<'a, C, NC, A> InstanceAttachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceAttachDiskCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -19110,7 +19805,7 @@ impl<'a, C, NC, A> InstanceAttachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceAttachDiskCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -19120,7 +19815,7 @@ impl<'a, C, NC, A> InstanceAttachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Instance name. + /// Instance name. pub fn instance(mut self, new_value: &str) -> InstanceAttachDiskCall<'a, C, NC, A> { self._instance = new_value.to_string(); self @@ -19181,7 +19876,7 @@ impl<'a, C, NC, A> InstanceAttachDiskCall<'a, C, NC, A> where NC: hyper::net::Ne /// Retrieves the list of instance resources contained within the specified zone. /// /// A builder for the *list* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -19256,7 +19951,7 @@ impl<'a, C, NC, A> InstanceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "project", "zone", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19309,7 +20004,7 @@ impl<'a, C, NC, A> InstanceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19321,7 +20016,6 @@ impl<'a, C, NC, A> InstanceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -19331,7 +20025,7 @@ impl<'a, C, NC, A> InstanceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19342,7 +20036,7 @@ impl<'a, C, NC, A> InstanceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19351,13 +20045,13 @@ impl<'a, C, NC, A> InstanceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19369,7 +20063,7 @@ impl<'a, C, NC, A> InstanceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -19379,7 +20073,7 @@ impl<'a, C, NC, A> InstanceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> InstanceListCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -19387,7 +20081,7 @@ impl<'a, C, NC, A> InstanceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> InstanceListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -19395,7 +20089,7 @@ impl<'a, C, NC, A> InstanceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> InstanceListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -19403,7 +20097,7 @@ impl<'a, C, NC, A> InstanceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> InstanceListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -19462,7 +20156,7 @@ impl<'a, C, NC, A> InstanceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// A builder for the *aggregatedList* method supported by a *instance* resource. -/// It is not used directly, but through a `InstanceMethods`. +/// It is not used directly, but through a `InstanceMethods` instance. /// /// # Example /// @@ -19535,7 +20229,7 @@ impl<'a, C, NC, A> InstanceAggregatedListCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19588,7 +20282,7 @@ impl<'a, C, NC, A> InstanceAggregatedListCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19600,7 +20294,6 @@ impl<'a, C, NC, A> InstanceAggregatedListCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -19610,7 +20303,7 @@ impl<'a, C, NC, A> InstanceAggregatedListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19621,7 +20314,7 @@ impl<'a, C, NC, A> InstanceAggregatedListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19630,13 +20323,13 @@ impl<'a, C, NC, A> InstanceAggregatedListCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19648,7 +20341,7 @@ impl<'a, C, NC, A> InstanceAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> InstanceAggregatedListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -19656,7 +20349,7 @@ impl<'a, C, NC, A> InstanceAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> InstanceAggregatedListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -19664,7 +20357,7 @@ impl<'a, C, NC, A> InstanceAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> InstanceAggregatedListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -19672,7 +20365,7 @@ impl<'a, C, NC, A> InstanceAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> InstanceAggregatedListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -19733,7 +20426,7 @@ impl<'a, C, NC, A> InstanceAggregatedListCall<'a, C, NC, A> where NC: hyper::net /// Gets the most recent health check results for this BackendService. /// /// A builder for the *getHealth* method supported by a *backendService* resource. -/// It is not used directly, but through a `BackendServiceMethods`. +/// It is not used directly, but through a `BackendServiceMethods` instance. /// /// # Example /// @@ -19800,7 +20493,7 @@ impl<'a, C, NC, A> BackendServiceGetHealthCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "project", "backendService"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19857,7 +20550,7 @@ impl<'a, C, NC, A> BackendServiceGetHealthCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19873,7 +20566,6 @@ impl<'a, C, NC, A> BackendServiceGetHealthCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -19883,7 +20575,7 @@ impl<'a, C, NC, A> BackendServiceGetHealthCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19894,7 +20586,7 @@ impl<'a, C, NC, A> BackendServiceGetHealthCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19903,13 +20595,13 @@ impl<'a, C, NC, A> BackendServiceGetHealthCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19939,7 +20631,7 @@ impl<'a, C, NC, A> BackendServiceGetHealthCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the BackendService resource to which the queried instance belongs. + /// Name of the BackendService resource to which the queried instance belongs. pub fn backend_service(mut self, new_value: &str) -> BackendServiceGetHealthCall<'a, C, NC, A> { self._backend_service = new_value.to_string(); self @@ -20000,7 +20692,7 @@ impl<'a, C, NC, A> BackendServiceGetHealthCall<'a, C, NC, A> where NC: hyper::ne /// Deletes the specified BackendService resource. /// /// A builder for the *delete* method supported by a *backendService* resource. -/// It is not used directly, but through a `BackendServiceMethods`. +/// It is not used directly, but through a `BackendServiceMethods` instance. /// /// # Example /// @@ -20060,7 +20752,7 @@ impl<'a, C, NC, A> BackendServiceDeleteCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "project", "backendService"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -20113,7 +20805,7 @@ impl<'a, C, NC, A> BackendServiceDeleteCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -20125,7 +20817,6 @@ impl<'a, C, NC, A> BackendServiceDeleteCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -20135,7 +20826,7 @@ impl<'a, C, NC, A> BackendServiceDeleteCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -20146,7 +20837,7 @@ impl<'a, C, NC, A> BackendServiceDeleteCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -20155,13 +20846,13 @@ impl<'a, C, NC, A> BackendServiceDeleteCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -20173,7 +20864,7 @@ impl<'a, C, NC, A> BackendServiceDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> BackendServiceDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -20183,7 +20874,7 @@ impl<'a, C, NC, A> BackendServiceDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the BackendService resource to delete. + /// Name of the BackendService resource to delete. pub fn backend_service(mut self, new_value: &str) -> BackendServiceDeleteCall<'a, C, NC, A> { self._backend_service = new_value.to_string(); self @@ -20244,7 +20935,7 @@ impl<'a, C, NC, A> BackendServiceDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Returns the specified BackendService resource. /// /// A builder for the *get* method supported by a *backendService* resource. -/// It is not used directly, but through a `BackendServiceMethods`. +/// It is not used directly, but through a `BackendServiceMethods` instance. /// /// # Example /// @@ -20304,7 +20995,7 @@ impl<'a, C, NC, A> BackendServiceGetCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "project", "backendService"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -20357,7 +21048,7 @@ impl<'a, C, NC, A> BackendServiceGetCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -20369,7 +21060,6 @@ impl<'a, C, NC, A> BackendServiceGetCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -20379,7 +21069,7 @@ impl<'a, C, NC, A> BackendServiceGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -20390,7 +21080,7 @@ impl<'a, C, NC, A> BackendServiceGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -20399,13 +21089,13 @@ impl<'a, C, NC, A> BackendServiceGetCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -20417,7 +21107,7 @@ impl<'a, C, NC, A> BackendServiceGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> BackendServiceGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -20427,7 +21117,7 @@ impl<'a, C, NC, A> BackendServiceGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the BackendService resource to return. + /// Name of the BackendService resource to return. pub fn backend_service(mut self, new_value: &str) -> BackendServiceGetCall<'a, C, NC, A> { self._backend_service = new_value.to_string(); self @@ -20488,7 +21178,7 @@ impl<'a, C, NC, A> BackendServiceGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Update the entire content of the BackendService resource. /// /// A builder for the *update* method supported by a *backendService* resource. -/// It is not used directly, but through a `BackendServiceMethods`. +/// It is not used directly, but through a `BackendServiceMethods` instance. /// /// # Example /// @@ -20555,7 +21245,7 @@ impl<'a, C, NC, A> BackendServiceUpdateCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "project", "backendService"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -20612,7 +21302,7 @@ impl<'a, C, NC, A> BackendServiceUpdateCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -20628,7 +21318,6 @@ impl<'a, C, NC, A> BackendServiceUpdateCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -20638,7 +21327,7 @@ impl<'a, C, NC, A> BackendServiceUpdateCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -20649,7 +21338,7 @@ impl<'a, C, NC, A> BackendServiceUpdateCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -20658,13 +21347,13 @@ impl<'a, C, NC, A> BackendServiceUpdateCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -20685,7 +21374,7 @@ impl<'a, C, NC, A> BackendServiceUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> BackendServiceUpdateCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -20695,7 +21384,7 @@ impl<'a, C, NC, A> BackendServiceUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the BackendService resource to update. + /// Name of the BackendService resource to update. pub fn backend_service(mut self, new_value: &str) -> BackendServiceUpdateCall<'a, C, NC, A> { self._backend_service = new_value.to_string(); self @@ -20756,7 +21445,7 @@ impl<'a, C, NC, A> BackendServiceUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Retrieves the list of BackendService resources available to the specified project. /// /// A builder for the *list* method supported by a *backendService* resource. -/// It is not used directly, but through a `BackendServiceMethods`. +/// It is not used directly, but through a `BackendServiceMethods` instance. /// /// # Example /// @@ -20829,7 +21518,7 @@ impl<'a, C, NC, A> BackendServiceListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -20882,7 +21571,7 @@ impl<'a, C, NC, A> BackendServiceListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -20894,7 +21583,6 @@ impl<'a, C, NC, A> BackendServiceListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -20904,7 +21592,7 @@ impl<'a, C, NC, A> BackendServiceListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -20915,7 +21603,7 @@ impl<'a, C, NC, A> BackendServiceListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -20924,13 +21612,13 @@ impl<'a, C, NC, A> BackendServiceListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -20942,7 +21630,7 @@ impl<'a, C, NC, A> BackendServiceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> BackendServiceListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -20950,7 +21638,7 @@ impl<'a, C, NC, A> BackendServiceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> BackendServiceListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -20958,7 +21646,7 @@ impl<'a, C, NC, A> BackendServiceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> BackendServiceListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -20966,7 +21654,7 @@ impl<'a, C, NC, A> BackendServiceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> BackendServiceListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -21027,7 +21715,7 @@ impl<'a, C, NC, A> BackendServiceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Update the entire content of the BackendService resource. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *backendService* resource. -/// It is not used directly, but through a `BackendServiceMethods`. +/// It is not used directly, but through a `BackendServiceMethods` instance. /// /// # Example /// @@ -21094,7 +21782,7 @@ impl<'a, C, NC, A> BackendServicePatchCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "project", "backendService"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -21151,7 +21839,7 @@ impl<'a, C, NC, A> BackendServicePatchCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -21167,7 +21855,6 @@ impl<'a, C, NC, A> BackendServicePatchCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -21177,7 +21864,7 @@ impl<'a, C, NC, A> BackendServicePatchCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -21188,7 +21875,7 @@ impl<'a, C, NC, A> BackendServicePatchCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -21197,13 +21884,13 @@ impl<'a, C, NC, A> BackendServicePatchCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -21224,7 +21911,7 @@ impl<'a, C, NC, A> BackendServicePatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> BackendServicePatchCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -21234,7 +21921,7 @@ impl<'a, C, NC, A> BackendServicePatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the BackendService resource to update. + /// Name of the BackendService resource to update. pub fn backend_service(mut self, new_value: &str) -> BackendServicePatchCall<'a, C, NC, A> { self._backend_service = new_value.to_string(); self @@ -21295,7 +21982,7 @@ impl<'a, C, NC, A> BackendServicePatchCall<'a, C, NC, A> where NC: hyper::net::N /// Creates a BackendService resource in the specified project using the data included in the request. /// /// A builder for the *insert* method supported by a *backendService* resource. -/// It is not used directly, but through a `BackendServiceMethods`. +/// It is not used directly, but through a `BackendServiceMethods` instance. /// /// # Example /// @@ -21360,7 +22047,7 @@ impl<'a, C, NC, A> BackendServiceInsertCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -21417,7 +22104,7 @@ impl<'a, C, NC, A> BackendServiceInsertCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -21433,7 +22120,6 @@ impl<'a, C, NC, A> BackendServiceInsertCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -21443,7 +22129,7 @@ impl<'a, C, NC, A> BackendServiceInsertCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -21454,7 +22140,7 @@ impl<'a, C, NC, A> BackendServiceInsertCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -21463,13 +22149,13 @@ impl<'a, C, NC, A> BackendServiceInsertCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -21490,7 +22176,7 @@ impl<'a, C, NC, A> BackendServiceInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> BackendServiceInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -21551,7 +22237,7 @@ impl<'a, C, NC, A> BackendServiceInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Returns the specified license resource. /// /// A builder for the *get* method supported by a *license* resource. -/// It is not used directly, but through a `LicenseMethods`. +/// It is not used directly, but through a `LicenseMethods` instance. /// /// # Example /// @@ -21611,7 +22297,7 @@ impl<'a, C, NC, A> LicenseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "project", "license"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -21664,7 +22350,7 @@ impl<'a, C, NC, A> LicenseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -21676,7 +22362,6 @@ impl<'a, C, NC, A> LicenseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -21686,7 +22371,7 @@ impl<'a, C, NC, A> LicenseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -21697,7 +22382,7 @@ impl<'a, C, NC, A> LicenseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -21706,13 +22391,13 @@ impl<'a, C, NC, A> LicenseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -21724,7 +22409,7 @@ impl<'a, C, NC, A> LicenseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> LicenseGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -21734,7 +22419,7 @@ impl<'a, C, NC, A> LicenseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the license resource to return. + /// Name of the license resource to return. pub fn license(mut self, new_value: &str) -> LicenseGetCall<'a, C, NC, A> { self._license = new_value.to_string(); self @@ -21795,7 +22480,7 @@ impl<'a, C, NC, A> LicenseGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Creates a network resource in the specified project using the data included in the request. /// /// A builder for the *insert* method supported by a *network* resource. -/// It is not used directly, but through a `NetworkMethods`. +/// It is not used directly, but through a `NetworkMethods` instance. /// /// # Example /// @@ -21860,7 +22545,7 @@ impl<'a, C, NC, A> NetworkInsertCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -21917,7 +22602,7 @@ impl<'a, C, NC, A> NetworkInsertCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -21933,7 +22618,6 @@ impl<'a, C, NC, A> NetworkInsertCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -21943,7 +22627,7 @@ impl<'a, C, NC, A> NetworkInsertCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -21954,7 +22638,7 @@ impl<'a, C, NC, A> NetworkInsertCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -21963,13 +22647,13 @@ impl<'a, C, NC, A> NetworkInsertCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -21990,7 +22674,7 @@ impl<'a, C, NC, A> NetworkInsertCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> NetworkInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -22051,7 +22735,7 @@ impl<'a, C, NC, A> NetworkInsertCall<'a, C, NC, A> where NC: hyper::net::Network /// Retrieves the list of network resources available to the specified project. /// /// A builder for the *list* method supported by a *network* resource. -/// It is not used directly, but through a `NetworkMethods`. +/// It is not used directly, but through a `NetworkMethods` instance. /// /// # Example /// @@ -22124,7 +22808,7 @@ impl<'a, C, NC, A> NetworkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -22177,7 +22861,7 @@ impl<'a, C, NC, A> NetworkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -22189,7 +22873,6 @@ impl<'a, C, NC, A> NetworkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -22199,7 +22882,7 @@ impl<'a, C, NC, A> NetworkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -22210,7 +22893,7 @@ impl<'a, C, NC, A> NetworkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -22219,13 +22902,13 @@ impl<'a, C, NC, A> NetworkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -22237,7 +22920,7 @@ impl<'a, C, NC, A> NetworkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> NetworkListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -22245,7 +22928,7 @@ impl<'a, C, NC, A> NetworkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> NetworkListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -22253,7 +22936,7 @@ impl<'a, C, NC, A> NetworkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> NetworkListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -22261,7 +22944,7 @@ impl<'a, C, NC, A> NetworkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> NetworkListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -22322,7 +23005,7 @@ impl<'a, C, NC, A> NetworkListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Deletes the specified network resource. /// /// A builder for the *delete* method supported by a *network* resource. -/// It is not used directly, but through a `NetworkMethods`. +/// It is not used directly, but through a `NetworkMethods` instance. /// /// # Example /// @@ -22382,7 +23065,7 @@ impl<'a, C, NC, A> NetworkDeleteCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "project", "network"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -22435,7 +23118,7 @@ impl<'a, C, NC, A> NetworkDeleteCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -22447,7 +23130,6 @@ impl<'a, C, NC, A> NetworkDeleteCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -22457,7 +23139,7 @@ impl<'a, C, NC, A> NetworkDeleteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -22468,7 +23150,7 @@ impl<'a, C, NC, A> NetworkDeleteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -22477,13 +23159,13 @@ impl<'a, C, NC, A> NetworkDeleteCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -22495,7 +23177,7 @@ impl<'a, C, NC, A> NetworkDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> NetworkDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -22505,7 +23187,7 @@ impl<'a, C, NC, A> NetworkDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the network resource to delete. + /// Name of the network resource to delete. pub fn network(mut self, new_value: &str) -> NetworkDeleteCall<'a, C, NC, A> { self._network = new_value.to_string(); self @@ -22566,7 +23248,7 @@ impl<'a, C, NC, A> NetworkDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Returns the specified network resource. /// /// A builder for the *get* method supported by a *network* resource. -/// It is not used directly, but through a `NetworkMethods`. +/// It is not used directly, but through a `NetworkMethods` instance. /// /// # Example /// @@ -22626,7 +23308,7 @@ impl<'a, C, NC, A> NetworkGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "project", "network"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -22679,7 +23361,7 @@ impl<'a, C, NC, A> NetworkGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -22691,7 +23373,6 @@ impl<'a, C, NC, A> NetworkGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -22701,7 +23382,7 @@ impl<'a, C, NC, A> NetworkGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -22712,7 +23393,7 @@ impl<'a, C, NC, A> NetworkGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -22721,13 +23402,13 @@ impl<'a, C, NC, A> NetworkGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -22739,7 +23420,7 @@ impl<'a, C, NC, A> NetworkGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> NetworkGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -22749,7 +23430,7 @@ impl<'a, C, NC, A> NetworkGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the network resource to return. + /// Name of the network resource to return. pub fn network(mut self, new_value: &str) -> NetworkGetCall<'a, C, NC, A> { self._network = new_value.to_string(); self @@ -22810,7 +23491,7 @@ impl<'a, C, NC, A> NetworkGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Retrieves the list of operation resources contained within the specified project. /// /// A builder for the *list* method supported by a *globalOperation* resource. -/// It is not used directly, but through a `GlobalOperationMethods`. +/// It is not used directly, but through a `GlobalOperationMethods` instance. /// /// # Example /// @@ -22883,7 +23564,7 @@ impl<'a, C, NC, A> GlobalOperationListCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -22936,7 +23617,7 @@ impl<'a, C, NC, A> GlobalOperationListCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -22948,7 +23629,6 @@ impl<'a, C, NC, A> GlobalOperationListCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -22958,7 +23638,7 @@ impl<'a, C, NC, A> GlobalOperationListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -22969,7 +23649,7 @@ impl<'a, C, NC, A> GlobalOperationListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -22978,13 +23658,13 @@ impl<'a, C, NC, A> GlobalOperationListCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -22996,7 +23676,7 @@ impl<'a, C, NC, A> GlobalOperationListCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> GlobalOperationListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -23004,7 +23684,7 @@ impl<'a, C, NC, A> GlobalOperationListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> GlobalOperationListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -23012,7 +23692,7 @@ impl<'a, C, NC, A> GlobalOperationListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> GlobalOperationListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -23020,7 +23700,7 @@ impl<'a, C, NC, A> GlobalOperationListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> GlobalOperationListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -23081,7 +23761,7 @@ impl<'a, C, NC, A> GlobalOperationListCall<'a, C, NC, A> where NC: hyper::net::N /// Retrieves the specified operation resource. /// /// A builder for the *get* method supported by a *globalOperation* resource. -/// It is not used directly, but through a `GlobalOperationMethods`. +/// It is not used directly, but through a `GlobalOperationMethods` instance. /// /// # Example /// @@ -23141,7 +23821,7 @@ impl<'a, C, NC, A> GlobalOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "project", "operation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -23194,7 +23874,7 @@ impl<'a, C, NC, A> GlobalOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -23206,7 +23886,6 @@ impl<'a, C, NC, A> GlobalOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -23216,7 +23895,7 @@ impl<'a, C, NC, A> GlobalOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -23227,7 +23906,7 @@ impl<'a, C, NC, A> GlobalOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -23236,13 +23915,13 @@ impl<'a, C, NC, A> GlobalOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -23254,7 +23933,7 @@ impl<'a, C, NC, A> GlobalOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> GlobalOperationGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -23264,7 +23943,7 @@ impl<'a, C, NC, A> GlobalOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the operation resource to return. + /// Name of the operation resource to return. pub fn operation(mut self, new_value: &str) -> GlobalOperationGetCall<'a, C, NC, A> { self._operation = new_value.to_string(); self @@ -23325,7 +24004,7 @@ impl<'a, C, NC, A> GlobalOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Deletes the specified operation resource. /// /// A builder for the *delete* method supported by a *globalOperation* resource. -/// It is not used directly, but through a `GlobalOperationMethods`. +/// It is not used directly, but through a `GlobalOperationMethods` instance. /// /// # Example /// @@ -23385,7 +24064,7 @@ impl<'a, C, NC, A> GlobalOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: for &field in ["project", "operation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -23437,7 +24116,7 @@ impl<'a, C, NC, A> GlobalOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -23449,7 +24128,6 @@ impl<'a, C, NC, A> GlobalOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -23459,7 +24137,7 @@ impl<'a, C, NC, A> GlobalOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -23470,12 +24148,12 @@ impl<'a, C, NC, A> GlobalOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -23487,7 +24165,7 @@ impl<'a, C, NC, A> GlobalOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> GlobalOperationDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -23497,7 +24175,7 @@ impl<'a, C, NC, A> GlobalOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the operation resource to delete. + /// Name of the operation resource to delete. pub fn operation(mut self, new_value: &str) -> GlobalOperationDeleteCall<'a, C, NC, A> { self._operation = new_value.to_string(); self @@ -23558,7 +24236,7 @@ impl<'a, C, NC, A> GlobalOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Retrieves the list of all operations grouped by scope. /// /// A builder for the *aggregatedList* method supported by a *globalOperation* resource. -/// It is not used directly, but through a `GlobalOperationMethods`. +/// It is not used directly, but through a `GlobalOperationMethods` instance. /// /// # Example /// @@ -23631,7 +24309,7 @@ impl<'a, C, NC, A> GlobalOperationAggregatedListCall<'a, C, NC, A> where NC: hyp for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -23684,7 +24362,7 @@ impl<'a, C, NC, A> GlobalOperationAggregatedListCall<'a, C, NC, A> where NC: hyp } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -23696,7 +24374,6 @@ impl<'a, C, NC, A> GlobalOperationAggregatedListCall<'a, C, NC, A> where NC: hyp dlg.pre_request(); req.send() - }; match req_result { @@ -23706,7 +24383,7 @@ impl<'a, C, NC, A> GlobalOperationAggregatedListCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -23717,7 +24394,7 @@ impl<'a, C, NC, A> GlobalOperationAggregatedListCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -23726,13 +24403,13 @@ impl<'a, C, NC, A> GlobalOperationAggregatedListCall<'a, C, NC, A> where NC: hyp Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -23744,7 +24421,7 @@ impl<'a, C, NC, A> GlobalOperationAggregatedListCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> GlobalOperationAggregatedListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -23752,7 +24429,7 @@ impl<'a, C, NC, A> GlobalOperationAggregatedListCall<'a, C, NC, A> where NC: hyp /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> GlobalOperationAggregatedListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -23760,7 +24437,7 @@ impl<'a, C, NC, A> GlobalOperationAggregatedListCall<'a, C, NC, A> where NC: hyp /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> GlobalOperationAggregatedListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -23768,7 +24445,7 @@ impl<'a, C, NC, A> GlobalOperationAggregatedListCall<'a, C, NC, A> where NC: hyp /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> GlobalOperationAggregatedListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -23829,7 +24506,7 @@ impl<'a, C, NC, A> GlobalOperationAggregatedListCall<'a, C, NC, A> where NC: hyp /// Retrieves the list of region resources available to the specified project. /// /// A builder for the *list* method supported by a *region* resource. -/// It is not used directly, but through a `RegionMethods`. +/// It is not used directly, but through a `RegionMethods` instance. /// /// # Example /// @@ -23902,7 +24579,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -23955,7 +24632,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -23967,7 +24644,6 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -23977,7 +24653,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -23988,7 +24664,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -23997,13 +24673,13 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -24015,7 +24691,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> RegionListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -24023,7 +24699,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> RegionListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -24031,7 +24707,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> RegionListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -24039,7 +24715,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> RegionListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -24100,7 +24776,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Returns the specified region resource. /// /// A builder for the *get* method supported by a *region* resource. -/// It is not used directly, but through a `RegionMethods`. +/// It is not used directly, but through a `RegionMethods` instance. /// /// # Example /// @@ -24160,7 +24836,7 @@ impl<'a, C, NC, A> RegionGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "project", "region"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -24213,7 +24889,7 @@ impl<'a, C, NC, A> RegionGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -24225,7 +24901,6 @@ impl<'a, C, NC, A> RegionGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -24235,7 +24910,7 @@ impl<'a, C, NC, A> RegionGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -24246,7 +24921,7 @@ impl<'a, C, NC, A> RegionGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -24255,13 +24930,13 @@ impl<'a, C, NC, A> RegionGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -24273,7 +24948,7 @@ impl<'a, C, NC, A> RegionGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> RegionGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -24283,7 +24958,7 @@ impl<'a, C, NC, A> RegionGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region resource to return. + /// Name of the region resource to return. pub fn region(mut self, new_value: &str) -> RegionGetCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -24344,7 +25019,7 @@ impl<'a, C, NC, A> RegionGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Retrieves the list of forwarding rules grouped by scope. /// /// A builder for the *aggregatedList* method supported by a *forwardingRule* resource. -/// It is not used directly, but through a `ForwardingRuleMethods`. +/// It is not used directly, but through a `ForwardingRuleMethods` instance. /// /// # Example /// @@ -24417,7 +25092,7 @@ impl<'a, C, NC, A> ForwardingRuleAggregatedListCall<'a, C, NC, A> where NC: hype for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -24470,7 +25145,7 @@ impl<'a, C, NC, A> ForwardingRuleAggregatedListCall<'a, C, NC, A> where NC: hype } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -24482,7 +25157,6 @@ impl<'a, C, NC, A> ForwardingRuleAggregatedListCall<'a, C, NC, A> where NC: hype dlg.pre_request(); req.send() - }; match req_result { @@ -24492,7 +25166,7 @@ impl<'a, C, NC, A> ForwardingRuleAggregatedListCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -24503,7 +25177,7 @@ impl<'a, C, NC, A> ForwardingRuleAggregatedListCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -24512,13 +25186,13 @@ impl<'a, C, NC, A> ForwardingRuleAggregatedListCall<'a, C, NC, A> where NC: hype Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -24530,7 +25204,7 @@ impl<'a, C, NC, A> ForwardingRuleAggregatedListCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> ForwardingRuleAggregatedListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -24538,7 +25212,7 @@ impl<'a, C, NC, A> ForwardingRuleAggregatedListCall<'a, C, NC, A> where NC: hype /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> ForwardingRuleAggregatedListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -24546,7 +25220,7 @@ impl<'a, C, NC, A> ForwardingRuleAggregatedListCall<'a, C, NC, A> where NC: hype /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> ForwardingRuleAggregatedListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -24554,7 +25228,7 @@ impl<'a, C, NC, A> ForwardingRuleAggregatedListCall<'a, C, NC, A> where NC: hype /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> ForwardingRuleAggregatedListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -24615,7 +25289,7 @@ impl<'a, C, NC, A> ForwardingRuleAggregatedListCall<'a, C, NC, A> where NC: hype /// Creates a ForwardingRule resource in the specified project and region using the data included in the request. /// /// A builder for the *insert* method supported by a *forwardingRule* resource. -/// It is not used directly, but through a `ForwardingRuleMethods`. +/// It is not used directly, but through a `ForwardingRuleMethods` instance. /// /// # Example /// @@ -24682,7 +25356,7 @@ impl<'a, C, NC, A> ForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "project", "region"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -24739,7 +25413,7 @@ impl<'a, C, NC, A> ForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -24755,7 +25429,6 @@ impl<'a, C, NC, A> ForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -24765,7 +25438,7 @@ impl<'a, C, NC, A> ForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -24776,7 +25449,7 @@ impl<'a, C, NC, A> ForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -24785,13 +25458,13 @@ impl<'a, C, NC, A> ForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -24812,7 +25485,7 @@ impl<'a, C, NC, A> ForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> ForwardingRuleInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -24822,7 +25495,7 @@ impl<'a, C, NC, A> ForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> ForwardingRuleInsertCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -24883,7 +25556,7 @@ impl<'a, C, NC, A> ForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Changes target url for forwarding rule. /// /// A builder for the *setTarget* method supported by a *forwardingRule* resource. -/// It is not used directly, but through a `ForwardingRuleMethods`. +/// It is not used directly, but through a `ForwardingRuleMethods` instance. /// /// # Example /// @@ -24952,7 +25625,7 @@ impl<'a, C, NC, A> ForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "project", "region", "forwardingRule"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -25009,7 +25682,7 @@ impl<'a, C, NC, A> ForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -25025,7 +25698,6 @@ impl<'a, C, NC, A> ForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -25035,7 +25707,7 @@ impl<'a, C, NC, A> ForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -25046,7 +25718,7 @@ impl<'a, C, NC, A> ForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -25055,13 +25727,13 @@ impl<'a, C, NC, A> ForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -25082,7 +25754,7 @@ impl<'a, C, NC, A> ForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> ForwardingRuleSetTargetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -25092,7 +25764,7 @@ impl<'a, C, NC, A> ForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> ForwardingRuleSetTargetCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -25102,7 +25774,7 @@ impl<'a, C, NC, A> ForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the ForwardingRule resource in which target is to be set. + /// Name of the ForwardingRule resource in which target is to be set. pub fn forwarding_rule(mut self, new_value: &str) -> ForwardingRuleSetTargetCall<'a, C, NC, A> { self._forwarding_rule = new_value.to_string(); self @@ -25163,7 +25835,7 @@ impl<'a, C, NC, A> ForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyper::ne /// Returns the specified ForwardingRule resource. /// /// A builder for the *get* method supported by a *forwardingRule* resource. -/// It is not used directly, but through a `ForwardingRuleMethods`. +/// It is not used directly, but through a `ForwardingRuleMethods` instance. /// /// # Example /// @@ -25225,7 +25897,7 @@ impl<'a, C, NC, A> ForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "project", "region", "forwardingRule"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -25278,7 +25950,7 @@ impl<'a, C, NC, A> ForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -25290,7 +25962,6 @@ impl<'a, C, NC, A> ForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -25300,7 +25971,7 @@ impl<'a, C, NC, A> ForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -25311,7 +25982,7 @@ impl<'a, C, NC, A> ForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -25320,13 +25991,13 @@ impl<'a, C, NC, A> ForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -25338,7 +26009,7 @@ impl<'a, C, NC, A> ForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> ForwardingRuleGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -25348,7 +26019,7 @@ impl<'a, C, NC, A> ForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> ForwardingRuleGetCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -25358,7 +26029,7 @@ impl<'a, C, NC, A> ForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the ForwardingRule resource to return. + /// Name of the ForwardingRule resource to return. pub fn forwarding_rule(mut self, new_value: &str) -> ForwardingRuleGetCall<'a, C, NC, A> { self._forwarding_rule = new_value.to_string(); self @@ -25419,7 +26090,7 @@ impl<'a, C, NC, A> ForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Retrieves the list of ForwardingRule resources available to the specified project and region. /// /// A builder for the *list* method supported by a *forwardingRule* resource. -/// It is not used directly, but through a `ForwardingRuleMethods`. +/// It is not used directly, but through a `ForwardingRuleMethods` instance. /// /// # Example /// @@ -25494,7 +26165,7 @@ impl<'a, C, NC, A> ForwardingRuleListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "project", "region", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -25547,7 +26218,7 @@ impl<'a, C, NC, A> ForwardingRuleListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -25559,7 +26230,6 @@ impl<'a, C, NC, A> ForwardingRuleListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -25569,7 +26239,7 @@ impl<'a, C, NC, A> ForwardingRuleListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -25580,7 +26250,7 @@ impl<'a, C, NC, A> ForwardingRuleListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -25589,13 +26259,13 @@ impl<'a, C, NC, A> ForwardingRuleListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -25607,7 +26277,7 @@ impl<'a, C, NC, A> ForwardingRuleListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> ForwardingRuleListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -25617,7 +26287,7 @@ impl<'a, C, NC, A> ForwardingRuleListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> ForwardingRuleListCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -25625,7 +26295,7 @@ impl<'a, C, NC, A> ForwardingRuleListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> ForwardingRuleListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -25633,7 +26303,7 @@ impl<'a, C, NC, A> ForwardingRuleListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> ForwardingRuleListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -25641,7 +26311,7 @@ impl<'a, C, NC, A> ForwardingRuleListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> ForwardingRuleListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -25702,7 +26372,7 @@ impl<'a, C, NC, A> ForwardingRuleListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Deletes the specified ForwardingRule resource. /// /// A builder for the *delete* method supported by a *forwardingRule* resource. -/// It is not used directly, but through a `ForwardingRuleMethods`. +/// It is not used directly, but through a `ForwardingRuleMethods` instance. /// /// # Example /// @@ -25764,7 +26434,7 @@ impl<'a, C, NC, A> ForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "project", "region", "forwardingRule"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -25817,7 +26487,7 @@ impl<'a, C, NC, A> ForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -25829,7 +26499,6 @@ impl<'a, C, NC, A> ForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -25839,7 +26508,7 @@ impl<'a, C, NC, A> ForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -25850,7 +26519,7 @@ impl<'a, C, NC, A> ForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -25859,13 +26528,13 @@ impl<'a, C, NC, A> ForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -25877,7 +26546,7 @@ impl<'a, C, NC, A> ForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> ForwardingRuleDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -25887,7 +26556,7 @@ impl<'a, C, NC, A> ForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> ForwardingRuleDeleteCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -25897,7 +26566,7 @@ impl<'a, C, NC, A> ForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the ForwardingRule resource to delete. + /// Name of the ForwardingRule resource to delete. pub fn forwarding_rule(mut self, new_value: &str) -> ForwardingRuleDeleteCall<'a, C, NC, A> { self._forwarding_rule = new_value.to_string(); self @@ -25958,7 +26627,7 @@ impl<'a, C, NC, A> ForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Retrieves the list of TargetPool resources available to the specified project and region. /// /// A builder for the *list* method supported by a *targetPool* resource. -/// It is not used directly, but through a `TargetPoolMethods`. +/// It is not used directly, but through a `TargetPoolMethods` instance. /// /// # Example /// @@ -26033,7 +26702,7 @@ impl<'a, C, NC, A> TargetPoolListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "region", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -26086,7 +26755,7 @@ impl<'a, C, NC, A> TargetPoolListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -26098,7 +26767,6 @@ impl<'a, C, NC, A> TargetPoolListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -26108,7 +26776,7 @@ impl<'a, C, NC, A> TargetPoolListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -26119,7 +26787,7 @@ impl<'a, C, NC, A> TargetPoolListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -26128,13 +26796,13 @@ impl<'a, C, NC, A> TargetPoolListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -26146,7 +26814,7 @@ impl<'a, C, NC, A> TargetPoolListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetPoolListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -26156,7 +26824,7 @@ impl<'a, C, NC, A> TargetPoolListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolListCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -26164,7 +26832,7 @@ impl<'a, C, NC, A> TargetPoolListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> TargetPoolListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -26172,7 +26840,7 @@ impl<'a, C, NC, A> TargetPoolListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> TargetPoolListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -26180,7 +26848,7 @@ impl<'a, C, NC, A> TargetPoolListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> TargetPoolListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -26241,7 +26909,7 @@ impl<'a, C, NC, A> TargetPoolListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Adds health check URL to targetPool. /// /// A builder for the *addHealthCheck* method supported by a *targetPool* resource. -/// It is not used directly, but through a `TargetPoolMethods`. +/// It is not used directly, but through a `TargetPoolMethods` instance. /// /// # Example /// @@ -26310,7 +26978,7 @@ impl<'a, C, NC, A> TargetPoolAddHealthCheckCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "project", "region", "targetPool"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -26367,7 +27035,7 @@ impl<'a, C, NC, A> TargetPoolAddHealthCheckCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -26383,7 +27051,6 @@ impl<'a, C, NC, A> TargetPoolAddHealthCheckCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -26393,7 +27060,7 @@ impl<'a, C, NC, A> TargetPoolAddHealthCheckCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -26404,7 +27071,7 @@ impl<'a, C, NC, A> TargetPoolAddHealthCheckCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -26413,13 +27080,13 @@ impl<'a, C, NC, A> TargetPoolAddHealthCheckCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -26449,7 +27116,7 @@ impl<'a, C, NC, A> TargetPoolAddHealthCheckCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolAddHealthCheckCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -26459,7 +27126,7 @@ impl<'a, C, NC, A> TargetPoolAddHealthCheckCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the TargetPool resource to which health_check_url is to be added. + /// Name of the TargetPool resource to which health_check_url is to be added. pub fn target_pool(mut self, new_value: &str) -> TargetPoolAddHealthCheckCall<'a, C, NC, A> { self._target_pool = new_value.to_string(); self @@ -26520,7 +27187,7 @@ impl<'a, C, NC, A> TargetPoolAddHealthCheckCall<'a, C, NC, A> where NC: hyper::n /// Creates a TargetPool resource in the specified project and region using the data included in the request. /// /// A builder for the *insert* method supported by a *targetPool* resource. -/// It is not used directly, but through a `TargetPoolMethods`. +/// It is not used directly, but through a `TargetPoolMethods` instance. /// /// # Example /// @@ -26587,7 +27254,7 @@ impl<'a, C, NC, A> TargetPoolInsertCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "project", "region"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -26644,7 +27311,7 @@ impl<'a, C, NC, A> TargetPoolInsertCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -26660,7 +27327,6 @@ impl<'a, C, NC, A> TargetPoolInsertCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -26670,7 +27336,7 @@ impl<'a, C, NC, A> TargetPoolInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -26681,7 +27347,7 @@ impl<'a, C, NC, A> TargetPoolInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -26690,13 +27356,13 @@ impl<'a, C, NC, A> TargetPoolInsertCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -26717,7 +27383,7 @@ impl<'a, C, NC, A> TargetPoolInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetPoolInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -26727,7 +27393,7 @@ impl<'a, C, NC, A> TargetPoolInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolInsertCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -26788,7 +27454,7 @@ impl<'a, C, NC, A> TargetPoolInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Removes health check URL from targetPool. /// /// A builder for the *removeHealthCheck* method supported by a *targetPool* resource. -/// It is not used directly, but through a `TargetPoolMethods`. +/// It is not used directly, but through a `TargetPoolMethods` instance. /// /// # Example /// @@ -26857,7 +27523,7 @@ impl<'a, C, NC, A> TargetPoolRemoveHealthCheckCall<'a, C, NC, A> where NC: hyper for &field in ["alt", "project", "region", "targetPool"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -26914,7 +27580,7 @@ impl<'a, C, NC, A> TargetPoolRemoveHealthCheckCall<'a, C, NC, A> where NC: hyper } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -26930,7 +27596,6 @@ impl<'a, C, NC, A> TargetPoolRemoveHealthCheckCall<'a, C, NC, A> where NC: hyper dlg.pre_request(); req.send() - }; match req_result { @@ -26940,7 +27605,7 @@ impl<'a, C, NC, A> TargetPoolRemoveHealthCheckCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -26951,7 +27616,7 @@ impl<'a, C, NC, A> TargetPoolRemoveHealthCheckCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -26960,13 +27625,13 @@ impl<'a, C, NC, A> TargetPoolRemoveHealthCheckCall<'a, C, NC, A> where NC: hyper Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -26996,7 +27661,7 @@ impl<'a, C, NC, A> TargetPoolRemoveHealthCheckCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolRemoveHealthCheckCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -27006,7 +27671,7 @@ impl<'a, C, NC, A> TargetPoolRemoveHealthCheckCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the TargetPool resource to which health_check_url is to be removed. + /// Name of the TargetPool resource to which health_check_url is to be removed. pub fn target_pool(mut self, new_value: &str) -> TargetPoolRemoveHealthCheckCall<'a, C, NC, A> { self._target_pool = new_value.to_string(); self @@ -27067,7 +27732,7 @@ impl<'a, C, NC, A> TargetPoolRemoveHealthCheckCall<'a, C, NC, A> where NC: hyper /// Gets the most recent health check results for each IP for the given instance that is referenced by given TargetPool. /// /// A builder for the *getHealth* method supported by a *targetPool* resource. -/// It is not used directly, but through a `TargetPoolMethods`. +/// It is not used directly, but through a `TargetPoolMethods` instance. /// /// # Example /// @@ -27136,7 +27801,7 @@ impl<'a, C, NC, A> TargetPoolGetHealthCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "project", "region", "targetPool"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -27193,7 +27858,7 @@ impl<'a, C, NC, A> TargetPoolGetHealthCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -27209,7 +27874,6 @@ impl<'a, C, NC, A> TargetPoolGetHealthCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -27219,7 +27883,7 @@ impl<'a, C, NC, A> TargetPoolGetHealthCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -27230,7 +27894,7 @@ impl<'a, C, NC, A> TargetPoolGetHealthCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -27239,13 +27903,13 @@ impl<'a, C, NC, A> TargetPoolGetHealthCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -27275,7 +27939,7 @@ impl<'a, C, NC, A> TargetPoolGetHealthCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolGetHealthCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -27285,7 +27949,7 @@ impl<'a, C, NC, A> TargetPoolGetHealthCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the TargetPool resource to which the queried instance belongs. + /// Name of the TargetPool resource to which the queried instance belongs. pub fn target_pool(mut self, new_value: &str) -> TargetPoolGetHealthCall<'a, C, NC, A> { self._target_pool = new_value.to_string(); self @@ -27346,7 +28010,7 @@ impl<'a, C, NC, A> TargetPoolGetHealthCall<'a, C, NC, A> where NC: hyper::net::N /// Changes backup pool configurations. /// /// A builder for the *setBackup* method supported by a *targetPool* resource. -/// It is not used directly, but through a `TargetPoolMethods`. +/// It is not used directly, but through a `TargetPoolMethods` instance. /// /// # Example /// @@ -27420,7 +28084,7 @@ impl<'a, C, NC, A> TargetPoolSetBackupCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "project", "region", "targetPool", "failoverRatio"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -27477,7 +28141,7 @@ impl<'a, C, NC, A> TargetPoolSetBackupCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -27493,7 +28157,6 @@ impl<'a, C, NC, A> TargetPoolSetBackupCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -27503,7 +28166,7 @@ impl<'a, C, NC, A> TargetPoolSetBackupCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -27514,7 +28177,7 @@ impl<'a, C, NC, A> TargetPoolSetBackupCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -27523,13 +28186,13 @@ impl<'a, C, NC, A> TargetPoolSetBackupCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -27550,7 +28213,7 @@ impl<'a, C, NC, A> TargetPoolSetBackupCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetPoolSetBackupCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -27560,7 +28223,7 @@ impl<'a, C, NC, A> TargetPoolSetBackupCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolSetBackupCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -27570,7 +28233,7 @@ impl<'a, C, NC, A> TargetPoolSetBackupCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the TargetPool resource for which the backup is to be set. + /// Name of the TargetPool resource for which the backup is to be set. pub fn target_pool(mut self, new_value: &str) -> TargetPoolSetBackupCall<'a, C, NC, A> { self._target_pool = new_value.to_string(); self @@ -27578,7 +28241,7 @@ impl<'a, C, NC, A> TargetPoolSetBackupCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *failover ratio* query property to the given value. /// /// - /// New failoverRatio value for the containing target pool. + /// New failoverRatio value for the containing target pool. pub fn failover_ratio(mut self, new_value: f32) -> TargetPoolSetBackupCall<'a, C, NC, A> { self._failover_ratio = Some(new_value); self @@ -27639,7 +28302,7 @@ impl<'a, C, NC, A> TargetPoolSetBackupCall<'a, C, NC, A> where NC: hyper::net::N /// Retrieves the list of target pools grouped by scope. /// /// A builder for the *aggregatedList* method supported by a *targetPool* resource. -/// It is not used directly, but through a `TargetPoolMethods`. +/// It is not used directly, but through a `TargetPoolMethods` instance. /// /// # Example /// @@ -27712,7 +28375,7 @@ impl<'a, C, NC, A> TargetPoolAggregatedListCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -27765,7 +28428,7 @@ impl<'a, C, NC, A> TargetPoolAggregatedListCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -27777,7 +28440,6 @@ impl<'a, C, NC, A> TargetPoolAggregatedListCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -27787,7 +28449,7 @@ impl<'a, C, NC, A> TargetPoolAggregatedListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -27798,7 +28460,7 @@ impl<'a, C, NC, A> TargetPoolAggregatedListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -27807,13 +28469,13 @@ impl<'a, C, NC, A> TargetPoolAggregatedListCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -27825,7 +28487,7 @@ impl<'a, C, NC, A> TargetPoolAggregatedListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetPoolAggregatedListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -27833,7 +28495,7 @@ impl<'a, C, NC, A> TargetPoolAggregatedListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> TargetPoolAggregatedListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -27841,7 +28503,7 @@ impl<'a, C, NC, A> TargetPoolAggregatedListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> TargetPoolAggregatedListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -27849,7 +28511,7 @@ impl<'a, C, NC, A> TargetPoolAggregatedListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> TargetPoolAggregatedListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -27910,7 +28572,7 @@ impl<'a, C, NC, A> TargetPoolAggregatedListCall<'a, C, NC, A> where NC: hyper::n /// Returns the specified TargetPool resource. /// /// A builder for the *get* method supported by a *targetPool* resource. -/// It is not used directly, but through a `TargetPoolMethods`. +/// It is not used directly, but through a `TargetPoolMethods` instance. /// /// # Example /// @@ -27972,7 +28634,7 @@ impl<'a, C, NC, A> TargetPoolGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "project", "region", "targetPool"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -28025,7 +28687,7 @@ impl<'a, C, NC, A> TargetPoolGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -28037,7 +28699,6 @@ impl<'a, C, NC, A> TargetPoolGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -28047,7 +28708,7 @@ impl<'a, C, NC, A> TargetPoolGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -28058,7 +28719,7 @@ impl<'a, C, NC, A> TargetPoolGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -28067,13 +28728,13 @@ impl<'a, C, NC, A> TargetPoolGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -28085,7 +28746,7 @@ impl<'a, C, NC, A> TargetPoolGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetPoolGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -28095,7 +28756,7 @@ impl<'a, C, NC, A> TargetPoolGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolGetCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -28105,7 +28766,7 @@ impl<'a, C, NC, A> TargetPoolGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the TargetPool resource to return. + /// Name of the TargetPool resource to return. pub fn target_pool(mut self, new_value: &str) -> TargetPoolGetCall<'a, C, NC, A> { self._target_pool = new_value.to_string(); self @@ -28166,7 +28827,7 @@ impl<'a, C, NC, A> TargetPoolGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Adds instance url to targetPool. /// /// A builder for the *addInstance* method supported by a *targetPool* resource. -/// It is not used directly, but through a `TargetPoolMethods`. +/// It is not used directly, but through a `TargetPoolMethods` instance. /// /// # Example /// @@ -28235,7 +28896,7 @@ impl<'a, C, NC, A> TargetPoolAddInstanceCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "project", "region", "targetPool"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -28292,7 +28953,7 @@ impl<'a, C, NC, A> TargetPoolAddInstanceCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -28308,7 +28969,6 @@ impl<'a, C, NC, A> TargetPoolAddInstanceCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -28318,7 +28978,7 @@ impl<'a, C, NC, A> TargetPoolAddInstanceCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -28329,7 +28989,7 @@ impl<'a, C, NC, A> TargetPoolAddInstanceCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -28338,13 +28998,13 @@ impl<'a, C, NC, A> TargetPoolAddInstanceCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -28374,7 +29034,7 @@ impl<'a, C, NC, A> TargetPoolAddInstanceCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolAddInstanceCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -28384,7 +29044,7 @@ impl<'a, C, NC, A> TargetPoolAddInstanceCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the TargetPool resource to which instance_url is to be added. + /// Name of the TargetPool resource to which instance_url is to be added. pub fn target_pool(mut self, new_value: &str) -> TargetPoolAddInstanceCall<'a, C, NC, A> { self._target_pool = new_value.to_string(); self @@ -28445,7 +29105,7 @@ impl<'a, C, NC, A> TargetPoolAddInstanceCall<'a, C, NC, A> where NC: hyper::net: /// Removes instance URL from targetPool. /// /// A builder for the *removeInstance* method supported by a *targetPool* resource. -/// It is not used directly, but through a `TargetPoolMethods`. +/// It is not used directly, but through a `TargetPoolMethods` instance. /// /// # Example /// @@ -28514,7 +29174,7 @@ impl<'a, C, NC, A> TargetPoolRemoveInstanceCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "project", "region", "targetPool"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -28571,7 +29231,7 @@ impl<'a, C, NC, A> TargetPoolRemoveInstanceCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -28587,7 +29247,6 @@ impl<'a, C, NC, A> TargetPoolRemoveInstanceCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -28597,7 +29256,7 @@ impl<'a, C, NC, A> TargetPoolRemoveInstanceCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -28608,7 +29267,7 @@ impl<'a, C, NC, A> TargetPoolRemoveInstanceCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -28617,13 +29276,13 @@ impl<'a, C, NC, A> TargetPoolRemoveInstanceCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -28653,7 +29312,7 @@ impl<'a, C, NC, A> TargetPoolRemoveInstanceCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolRemoveInstanceCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -28663,7 +29322,7 @@ impl<'a, C, NC, A> TargetPoolRemoveInstanceCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the TargetPool resource to which instance_url is to be removed. + /// Name of the TargetPool resource to which instance_url is to be removed. pub fn target_pool(mut self, new_value: &str) -> TargetPoolRemoveInstanceCall<'a, C, NC, A> { self._target_pool = new_value.to_string(); self @@ -28724,7 +29383,7 @@ impl<'a, C, NC, A> TargetPoolRemoveInstanceCall<'a, C, NC, A> where NC: hyper::n /// Deletes the specified TargetPool resource. /// /// A builder for the *delete* method supported by a *targetPool* resource. -/// It is not used directly, but through a `TargetPoolMethods`. +/// It is not used directly, but through a `TargetPoolMethods` instance. /// /// # Example /// @@ -28786,7 +29445,7 @@ impl<'a, C, NC, A> TargetPoolDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "project", "region", "targetPool"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -28839,7 +29498,7 @@ impl<'a, C, NC, A> TargetPoolDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -28851,7 +29510,6 @@ impl<'a, C, NC, A> TargetPoolDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -28861,7 +29519,7 @@ impl<'a, C, NC, A> TargetPoolDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -28872,7 +29530,7 @@ impl<'a, C, NC, A> TargetPoolDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -28881,13 +29539,13 @@ impl<'a, C, NC, A> TargetPoolDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -28899,7 +29557,7 @@ impl<'a, C, NC, A> TargetPoolDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetPoolDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -28909,7 +29567,7 @@ impl<'a, C, NC, A> TargetPoolDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> TargetPoolDeleteCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -28919,7 +29577,7 @@ impl<'a, C, NC, A> TargetPoolDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the TargetPool resource to delete. + /// Name of the TargetPool resource to delete. pub fn target_pool(mut self, new_value: &str) -> TargetPoolDeleteCall<'a, C, NC, A> { self._target_pool = new_value.to_string(); self @@ -28980,7 +29638,7 @@ impl<'a, C, NC, A> TargetPoolDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Retrieves the list of TargetInstance resources available to the specified project and zone. /// /// A builder for the *list* method supported by a *targetInstance* resource. -/// It is not used directly, but through a `TargetInstanceMethods`. +/// It is not used directly, but through a `TargetInstanceMethods` instance. /// /// # Example /// @@ -29055,7 +29713,7 @@ impl<'a, C, NC, A> TargetInstanceListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "project", "zone", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -29108,7 +29766,7 @@ impl<'a, C, NC, A> TargetInstanceListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -29120,7 +29778,6 @@ impl<'a, C, NC, A> TargetInstanceListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -29130,7 +29787,7 @@ impl<'a, C, NC, A> TargetInstanceListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -29141,7 +29798,7 @@ impl<'a, C, NC, A> TargetInstanceListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -29150,13 +29807,13 @@ impl<'a, C, NC, A> TargetInstanceListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -29168,7 +29825,7 @@ impl<'a, C, NC, A> TargetInstanceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetInstanceListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -29178,7 +29835,7 @@ impl<'a, C, NC, A> TargetInstanceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the zone scoping this request. + /// Name of the zone scoping this request. pub fn zone(mut self, new_value: &str) -> TargetInstanceListCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -29186,7 +29843,7 @@ impl<'a, C, NC, A> TargetInstanceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> TargetInstanceListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -29194,7 +29851,7 @@ impl<'a, C, NC, A> TargetInstanceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> TargetInstanceListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -29202,7 +29859,7 @@ impl<'a, C, NC, A> TargetInstanceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> TargetInstanceListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -29263,7 +29920,7 @@ impl<'a, C, NC, A> TargetInstanceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Creates a TargetInstance resource in the specified project and zone using the data included in the request. /// /// A builder for the *insert* method supported by a *targetInstance* resource. -/// It is not used directly, but through a `TargetInstanceMethods`. +/// It is not used directly, but through a `TargetInstanceMethods` instance. /// /// # Example /// @@ -29330,7 +29987,7 @@ impl<'a, C, NC, A> TargetInstanceInsertCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "project", "zone"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -29387,7 +30044,7 @@ impl<'a, C, NC, A> TargetInstanceInsertCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -29403,7 +30060,6 @@ impl<'a, C, NC, A> TargetInstanceInsertCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -29413,7 +30069,7 @@ impl<'a, C, NC, A> TargetInstanceInsertCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -29424,7 +30080,7 @@ impl<'a, C, NC, A> TargetInstanceInsertCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -29433,13 +30089,13 @@ impl<'a, C, NC, A> TargetInstanceInsertCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -29460,7 +30116,7 @@ impl<'a, C, NC, A> TargetInstanceInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetInstanceInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -29470,7 +30126,7 @@ impl<'a, C, NC, A> TargetInstanceInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the zone scoping this request. + /// Name of the zone scoping this request. pub fn zone(mut self, new_value: &str) -> TargetInstanceInsertCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -29531,7 +30187,7 @@ impl<'a, C, NC, A> TargetInstanceInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Retrieves the list of target instances grouped by scope. /// /// A builder for the *aggregatedList* method supported by a *targetInstance* resource. -/// It is not used directly, but through a `TargetInstanceMethods`. +/// It is not used directly, but through a `TargetInstanceMethods` instance. /// /// # Example /// @@ -29604,7 +30260,7 @@ impl<'a, C, NC, A> TargetInstanceAggregatedListCall<'a, C, NC, A> where NC: hype for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -29657,7 +30313,7 @@ impl<'a, C, NC, A> TargetInstanceAggregatedListCall<'a, C, NC, A> where NC: hype } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -29669,7 +30325,6 @@ impl<'a, C, NC, A> TargetInstanceAggregatedListCall<'a, C, NC, A> where NC: hype dlg.pre_request(); req.send() - }; match req_result { @@ -29679,7 +30334,7 @@ impl<'a, C, NC, A> TargetInstanceAggregatedListCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -29690,7 +30345,7 @@ impl<'a, C, NC, A> TargetInstanceAggregatedListCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -29699,13 +30354,13 @@ impl<'a, C, NC, A> TargetInstanceAggregatedListCall<'a, C, NC, A> where NC: hype Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -29717,7 +30372,7 @@ impl<'a, C, NC, A> TargetInstanceAggregatedListCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetInstanceAggregatedListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -29725,7 +30380,7 @@ impl<'a, C, NC, A> TargetInstanceAggregatedListCall<'a, C, NC, A> where NC: hype /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> TargetInstanceAggregatedListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -29733,7 +30388,7 @@ impl<'a, C, NC, A> TargetInstanceAggregatedListCall<'a, C, NC, A> where NC: hype /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> TargetInstanceAggregatedListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -29741,7 +30396,7 @@ impl<'a, C, NC, A> TargetInstanceAggregatedListCall<'a, C, NC, A> where NC: hype /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> TargetInstanceAggregatedListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -29802,7 +30457,7 @@ impl<'a, C, NC, A> TargetInstanceAggregatedListCall<'a, C, NC, A> where NC: hype /// Returns the specified TargetInstance resource. /// /// A builder for the *get* method supported by a *targetInstance* resource. -/// It is not used directly, but through a `TargetInstanceMethods`. +/// It is not used directly, but through a `TargetInstanceMethods` instance. /// /// # Example /// @@ -29864,7 +30519,7 @@ impl<'a, C, NC, A> TargetInstanceGetCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "project", "zone", "targetInstance"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -29917,7 +30572,7 @@ impl<'a, C, NC, A> TargetInstanceGetCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -29929,7 +30584,6 @@ impl<'a, C, NC, A> TargetInstanceGetCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -29939,7 +30593,7 @@ impl<'a, C, NC, A> TargetInstanceGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -29950,7 +30604,7 @@ impl<'a, C, NC, A> TargetInstanceGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -29959,13 +30613,13 @@ impl<'a, C, NC, A> TargetInstanceGetCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -29977,7 +30631,7 @@ impl<'a, C, NC, A> TargetInstanceGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetInstanceGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -29987,7 +30641,7 @@ impl<'a, C, NC, A> TargetInstanceGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the zone scoping this request. + /// Name of the zone scoping this request. pub fn zone(mut self, new_value: &str) -> TargetInstanceGetCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -29997,7 +30651,7 @@ impl<'a, C, NC, A> TargetInstanceGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the TargetInstance resource to return. + /// Name of the TargetInstance resource to return. pub fn target_instance(mut self, new_value: &str) -> TargetInstanceGetCall<'a, C, NC, A> { self._target_instance = new_value.to_string(); self @@ -30058,7 +30712,7 @@ impl<'a, C, NC, A> TargetInstanceGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Deletes the specified TargetInstance resource. /// /// A builder for the *delete* method supported by a *targetInstance* resource. -/// It is not used directly, but through a `TargetInstanceMethods`. +/// It is not used directly, but through a `TargetInstanceMethods` instance. /// /// # Example /// @@ -30120,7 +30774,7 @@ impl<'a, C, NC, A> TargetInstanceDeleteCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "project", "zone", "targetInstance"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -30173,7 +30827,7 @@ impl<'a, C, NC, A> TargetInstanceDeleteCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -30185,7 +30839,6 @@ impl<'a, C, NC, A> TargetInstanceDeleteCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -30195,7 +30848,7 @@ impl<'a, C, NC, A> TargetInstanceDeleteCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -30206,7 +30859,7 @@ impl<'a, C, NC, A> TargetInstanceDeleteCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -30215,13 +30868,13 @@ impl<'a, C, NC, A> TargetInstanceDeleteCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -30233,7 +30886,7 @@ impl<'a, C, NC, A> TargetInstanceDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetInstanceDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -30243,7 +30896,7 @@ impl<'a, C, NC, A> TargetInstanceDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the zone scoping this request. + /// Name of the zone scoping this request. pub fn zone(mut self, new_value: &str) -> TargetInstanceDeleteCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -30253,7 +30906,7 @@ impl<'a, C, NC, A> TargetInstanceDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the TargetInstance resource to delete. + /// Name of the TargetInstance resource to delete. pub fn target_instance(mut self, new_value: &str) -> TargetInstanceDeleteCall<'a, C, NC, A> { self._target_instance = new_value.to_string(); self @@ -30314,7 +30967,7 @@ impl<'a, C, NC, A> TargetInstanceDeleteCall<'a, C, NC, A> where NC: hyper::net:: /// Returns the specified ForwardingRule resource. /// /// A builder for the *get* method supported by a *globalForwardingRule* resource. -/// It is not used directly, but through a `GlobalForwardingRuleMethods`. +/// It is not used directly, but through a `GlobalForwardingRuleMethods` instance. /// /// # Example /// @@ -30374,7 +31027,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "project", "forwardingRule"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -30427,7 +31080,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -30439,7 +31092,6 @@ impl<'a, C, NC, A> GlobalForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -30449,7 +31101,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -30460,7 +31112,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -30469,13 +31121,13 @@ impl<'a, C, NC, A> GlobalForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -30487,7 +31139,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> GlobalForwardingRuleGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -30497,7 +31149,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the ForwardingRule resource to return. + /// Name of the ForwardingRule resource to return. pub fn forwarding_rule(mut self, new_value: &str) -> GlobalForwardingRuleGetCall<'a, C, NC, A> { self._forwarding_rule = new_value.to_string(); self @@ -30558,7 +31210,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleGetCall<'a, C, NC, A> where NC: hyper::ne /// Deletes the specified ForwardingRule resource. /// /// A builder for the *delete* method supported by a *globalForwardingRule* resource. -/// It is not used directly, but through a `GlobalForwardingRuleMethods`. +/// It is not used directly, but through a `GlobalForwardingRuleMethods` instance. /// /// # Example /// @@ -30618,7 +31270,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "project", "forwardingRule"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -30671,7 +31323,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -30683,7 +31335,6 @@ impl<'a, C, NC, A> GlobalForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -30693,7 +31344,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -30704,7 +31355,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -30713,13 +31364,13 @@ impl<'a, C, NC, A> GlobalForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -30731,7 +31382,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> GlobalForwardingRuleDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -30741,7 +31392,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the ForwardingRule resource to delete. + /// Name of the ForwardingRule resource to delete. pub fn forwarding_rule(mut self, new_value: &str) -> GlobalForwardingRuleDeleteCall<'a, C, NC, A> { self._forwarding_rule = new_value.to_string(); self @@ -30802,7 +31453,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleDeleteCall<'a, C, NC, A> where NC: hyper: /// Changes target url for forwarding rule. /// /// A builder for the *setTarget* method supported by a *globalForwardingRule* resource. -/// It is not used directly, but through a `GlobalForwardingRuleMethods`. +/// It is not used directly, but through a `GlobalForwardingRuleMethods` instance. /// /// # Example /// @@ -30869,7 +31520,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyp for &field in ["alt", "project", "forwardingRule"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -30926,7 +31577,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyp } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -30942,7 +31593,6 @@ impl<'a, C, NC, A> GlobalForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyp dlg.pre_request(); req.send() - }; match req_result { @@ -30952,7 +31602,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -30963,7 +31613,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -30972,13 +31622,13 @@ impl<'a, C, NC, A> GlobalForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyp Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -30999,7 +31649,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> GlobalForwardingRuleSetTargetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -31009,7 +31659,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the ForwardingRule resource in which target is to be set. + /// Name of the ForwardingRule resource in which target is to be set. pub fn forwarding_rule(mut self, new_value: &str) -> GlobalForwardingRuleSetTargetCall<'a, C, NC, A> { self._forwarding_rule = new_value.to_string(); self @@ -31070,7 +31720,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleSetTargetCall<'a, C, NC, A> where NC: hyp /// Creates a ForwardingRule resource in the specified project and region using the data included in the request. /// /// A builder for the *insert* method supported by a *globalForwardingRule* resource. -/// It is not used directly, but through a `GlobalForwardingRuleMethods`. +/// It is not used directly, but through a `GlobalForwardingRuleMethods` instance. /// /// # Example /// @@ -31135,7 +31785,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -31192,7 +31842,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -31208,7 +31858,6 @@ impl<'a, C, NC, A> GlobalForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -31218,7 +31867,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -31229,7 +31878,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -31238,13 +31887,13 @@ impl<'a, C, NC, A> GlobalForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -31265,7 +31914,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> GlobalForwardingRuleInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -31326,7 +31975,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleInsertCall<'a, C, NC, A> where NC: hyper: /// Retrieves the list of ForwardingRule resources available to the specified project. /// /// A builder for the *list* method supported by a *globalForwardingRule* resource. -/// It is not used directly, but through a `GlobalForwardingRuleMethods`. +/// It is not used directly, but through a `GlobalForwardingRuleMethods` instance. /// /// # Example /// @@ -31399,7 +32048,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleListCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -31452,7 +32101,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleListCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -31464,7 +32113,6 @@ impl<'a, C, NC, A> GlobalForwardingRuleListCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -31474,7 +32122,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -31485,7 +32133,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -31494,13 +32142,13 @@ impl<'a, C, NC, A> GlobalForwardingRuleListCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -31512,7 +32160,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> GlobalForwardingRuleListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -31520,7 +32168,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> GlobalForwardingRuleListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -31528,7 +32176,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> GlobalForwardingRuleListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -31536,7 +32184,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> GlobalForwardingRuleListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -31597,7 +32245,7 @@ impl<'a, C, NC, A> GlobalForwardingRuleListCall<'a, C, NC, A> where NC: hyper::n /// Retrieves the list of image resources available to the specified project. /// /// A builder for the *list* method supported by a *image* resource. -/// It is not used directly, but through a `ImageMethods`. +/// It is not used directly, but through a `ImageMethods` instance. /// /// # Example /// @@ -31670,7 +32318,7 @@ impl<'a, C, NC, A> ImageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -31723,7 +32371,7 @@ impl<'a, C, NC, A> ImageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -31735,7 +32383,6 @@ impl<'a, C, NC, A> ImageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -31745,7 +32392,7 @@ impl<'a, C, NC, A> ImageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -31756,7 +32403,7 @@ impl<'a, C, NC, A> ImageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -31765,13 +32412,13 @@ impl<'a, C, NC, A> ImageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -31783,7 +32430,7 @@ impl<'a, C, NC, A> ImageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ImageListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -31791,7 +32438,7 @@ impl<'a, C, NC, A> ImageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> ImageListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -31799,7 +32446,7 @@ impl<'a, C, NC, A> ImageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> ImageListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -31807,7 +32454,7 @@ impl<'a, C, NC, A> ImageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> ImageListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -31868,7 +32515,7 @@ impl<'a, C, NC, A> ImageListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Deletes the specified image resource. /// /// A builder for the *delete* method supported by a *image* resource. -/// It is not used directly, but through a `ImageMethods`. +/// It is not used directly, but through a `ImageMethods` instance. /// /// # Example /// @@ -31928,7 +32575,7 @@ impl<'a, C, NC, A> ImageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "project", "image"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -31981,7 +32628,7 @@ impl<'a, C, NC, A> ImageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -31993,7 +32640,6 @@ impl<'a, C, NC, A> ImageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -32003,7 +32649,7 @@ impl<'a, C, NC, A> ImageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -32014,7 +32660,7 @@ impl<'a, C, NC, A> ImageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -32023,13 +32669,13 @@ impl<'a, C, NC, A> ImageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -32041,7 +32687,7 @@ impl<'a, C, NC, A> ImageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ImageDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -32051,7 +32697,7 @@ impl<'a, C, NC, A> ImageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the image resource to delete. + /// Name of the image resource to delete. pub fn image(mut self, new_value: &str) -> ImageDeleteCall<'a, C, NC, A> { self._image = new_value.to_string(); self @@ -32114,7 +32760,7 @@ impl<'a, C, NC, A> ImageDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// If an empty request body is given, clears the deprecation status instead. /// /// A builder for the *deprecate* method supported by a *image* resource. -/// It is not used directly, but through a `ImageMethods`. +/// It is not used directly, but through a `ImageMethods` instance. /// /// # Example /// @@ -32181,7 +32827,7 @@ impl<'a, C, NC, A> ImageDeprecateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "image"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -32238,7 +32884,7 @@ impl<'a, C, NC, A> ImageDeprecateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -32254,7 +32900,6 @@ impl<'a, C, NC, A> ImageDeprecateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -32264,7 +32909,7 @@ impl<'a, C, NC, A> ImageDeprecateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -32275,7 +32920,7 @@ impl<'a, C, NC, A> ImageDeprecateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -32284,13 +32929,13 @@ impl<'a, C, NC, A> ImageDeprecateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -32311,7 +32956,7 @@ impl<'a, C, NC, A> ImageDeprecateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ImageDeprecateCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -32321,7 +32966,7 @@ impl<'a, C, NC, A> ImageDeprecateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Image name. + /// Image name. pub fn image(mut self, new_value: &str) -> ImageDeprecateCall<'a, C, NC, A> { self._image = new_value.to_string(); self @@ -32382,7 +33027,7 @@ impl<'a, C, NC, A> ImageDeprecateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Creates an image resource in the specified project using the data included in the request. /// /// A builder for the *insert* method supported by a *image* resource. -/// It is not used directly, but through a `ImageMethods`. +/// It is not used directly, but through a `ImageMethods` instance. /// /// # Example /// @@ -32447,7 +33092,7 @@ impl<'a, C, NC, A> ImageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -32504,7 +33149,7 @@ impl<'a, C, NC, A> ImageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -32520,7 +33165,6 @@ impl<'a, C, NC, A> ImageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -32530,7 +33174,7 @@ impl<'a, C, NC, A> ImageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -32541,7 +33185,7 @@ impl<'a, C, NC, A> ImageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -32550,13 +33194,13 @@ impl<'a, C, NC, A> ImageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -32577,7 +33221,7 @@ impl<'a, C, NC, A> ImageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ImageInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -32638,7 +33282,7 @@ impl<'a, C, NC, A> ImageInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Returns the specified image resource. /// /// A builder for the *get* method supported by a *image* resource. -/// It is not used directly, but through a `ImageMethods`. +/// It is not used directly, but through a `ImageMethods` instance. /// /// # Example /// @@ -32698,7 +33342,7 @@ impl<'a, C, NC, A> ImageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "project", "image"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -32751,7 +33395,7 @@ impl<'a, C, NC, A> ImageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -32763,7 +33407,6 @@ impl<'a, C, NC, A> ImageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -32773,7 +33416,7 @@ impl<'a, C, NC, A> ImageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -32784,7 +33427,7 @@ impl<'a, C, NC, A> ImageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -32793,13 +33436,13 @@ impl<'a, C, NC, A> ImageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -32811,7 +33454,7 @@ impl<'a, C, NC, A> ImageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ImageGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -32821,7 +33464,7 @@ impl<'a, C, NC, A> ImageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the image resource to return. + /// Name of the image resource to return. pub fn image(mut self, new_value: &str) -> ImageGetCall<'a, C, NC, A> { self._image = new_value.to_string(); self @@ -32882,7 +33525,7 @@ impl<'a, C, NC, A> ImageGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Retrieves the list of machine type resources grouped by scope. /// /// A builder for the *aggregatedList* method supported by a *machineType* resource. -/// It is not used directly, but through a `MachineTypeMethods`. +/// It is not used directly, but through a `MachineTypeMethods` instance. /// /// # Example /// @@ -32955,7 +33598,7 @@ impl<'a, C, NC, A> MachineTypeAggregatedListCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -33008,7 +33651,7 @@ impl<'a, C, NC, A> MachineTypeAggregatedListCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -33020,7 +33663,6 @@ impl<'a, C, NC, A> MachineTypeAggregatedListCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -33030,7 +33672,7 @@ impl<'a, C, NC, A> MachineTypeAggregatedListCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -33041,7 +33683,7 @@ impl<'a, C, NC, A> MachineTypeAggregatedListCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -33050,13 +33692,13 @@ impl<'a, C, NC, A> MachineTypeAggregatedListCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -33068,7 +33710,7 @@ impl<'a, C, NC, A> MachineTypeAggregatedListCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> MachineTypeAggregatedListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -33076,7 +33718,7 @@ impl<'a, C, NC, A> MachineTypeAggregatedListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> MachineTypeAggregatedListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -33084,7 +33726,7 @@ impl<'a, C, NC, A> MachineTypeAggregatedListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> MachineTypeAggregatedListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -33092,7 +33734,7 @@ impl<'a, C, NC, A> MachineTypeAggregatedListCall<'a, C, NC, A> where NC: hyper:: /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> MachineTypeAggregatedListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -33153,7 +33795,7 @@ impl<'a, C, NC, A> MachineTypeAggregatedListCall<'a, C, NC, A> where NC: hyper:: /// Returns the specified machine type resource. /// /// A builder for the *get* method supported by a *machineType* resource. -/// It is not used directly, but through a `MachineTypeMethods`. +/// It is not used directly, but through a `MachineTypeMethods` instance. /// /// # Example /// @@ -33215,7 +33857,7 @@ impl<'a, C, NC, A> MachineTypeGetCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "zone", "machineType"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -33268,7 +33910,7 @@ impl<'a, C, NC, A> MachineTypeGetCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -33280,7 +33922,6 @@ impl<'a, C, NC, A> MachineTypeGetCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -33290,7 +33931,7 @@ impl<'a, C, NC, A> MachineTypeGetCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -33301,7 +33942,7 @@ impl<'a, C, NC, A> MachineTypeGetCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -33310,13 +33951,13 @@ impl<'a, C, NC, A> MachineTypeGetCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -33328,7 +33969,7 @@ impl<'a, C, NC, A> MachineTypeGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> MachineTypeGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -33338,7 +33979,7 @@ impl<'a, C, NC, A> MachineTypeGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> MachineTypeGetCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -33348,7 +33989,7 @@ impl<'a, C, NC, A> MachineTypeGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the machine type resource to return. + /// Name of the machine type resource to return. pub fn machine_type(mut self, new_value: &str) -> MachineTypeGetCall<'a, C, NC, A> { self._machine_type = new_value.to_string(); self @@ -33409,7 +34050,7 @@ impl<'a, C, NC, A> MachineTypeGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieves the list of machine type resources available to the specified project. /// /// A builder for the *list* method supported by a *machineType* resource. -/// It is not used directly, but through a `MachineTypeMethods`. +/// It is not used directly, but through a `MachineTypeMethods` instance. /// /// # Example /// @@ -33484,7 +34125,7 @@ impl<'a, C, NC, A> MachineTypeListCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "project", "zone", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -33537,7 +34178,7 @@ impl<'a, C, NC, A> MachineTypeListCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -33549,7 +34190,6 @@ impl<'a, C, NC, A> MachineTypeListCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -33559,7 +34199,7 @@ impl<'a, C, NC, A> MachineTypeListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -33570,7 +34210,7 @@ impl<'a, C, NC, A> MachineTypeListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -33579,13 +34219,13 @@ impl<'a, C, NC, A> MachineTypeListCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -33597,7 +34237,7 @@ impl<'a, C, NC, A> MachineTypeListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> MachineTypeListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -33607,7 +34247,7 @@ impl<'a, C, NC, A> MachineTypeListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the zone for this request. + /// The name of the zone for this request. pub fn zone(mut self, new_value: &str) -> MachineTypeListCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -33615,7 +34255,7 @@ impl<'a, C, NC, A> MachineTypeListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> MachineTypeListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -33623,7 +34263,7 @@ impl<'a, C, NC, A> MachineTypeListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> MachineTypeListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -33631,7 +34271,7 @@ impl<'a, C, NC, A> MachineTypeListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> MachineTypeListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -33692,7 +34332,7 @@ impl<'a, C, NC, A> MachineTypeListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Moves a persistent disk from one zone to another. /// /// A builder for the *moveDisk* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -33757,7 +34397,7 @@ impl<'a, C, NC, A> ProjectMoveDiskCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -33814,7 +34454,7 @@ impl<'a, C, NC, A> ProjectMoveDiskCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -33830,7 +34470,6 @@ impl<'a, C, NC, A> ProjectMoveDiskCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -33840,7 +34479,7 @@ impl<'a, C, NC, A> ProjectMoveDiskCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -33851,7 +34490,7 @@ impl<'a, C, NC, A> ProjectMoveDiskCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -33860,13 +34499,13 @@ impl<'a, C, NC, A> ProjectMoveDiskCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -33887,7 +34526,7 @@ impl<'a, C, NC, A> ProjectMoveDiskCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ProjectMoveDiskCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -33948,7 +34587,7 @@ impl<'a, C, NC, A> ProjectMoveDiskCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets metadata common to all instances within the specified project using the data included in the request. /// /// A builder for the *setCommonInstanceMetadata* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -34013,7 +34652,7 @@ impl<'a, C, NC, A> ProjectSetCommonInstanceMetadataCall<'a, C, NC, A> where NC: for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -34070,7 +34709,7 @@ impl<'a, C, NC, A> ProjectSetCommonInstanceMetadataCall<'a, C, NC, A> where NC: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -34086,7 +34725,6 @@ impl<'a, C, NC, A> ProjectSetCommonInstanceMetadataCall<'a, C, NC, A> where NC: dlg.pre_request(); req.send() - }; match req_result { @@ -34096,7 +34734,7 @@ impl<'a, C, NC, A> ProjectSetCommonInstanceMetadataCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -34107,7 +34745,7 @@ impl<'a, C, NC, A> ProjectSetCommonInstanceMetadataCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -34116,13 +34754,13 @@ impl<'a, C, NC, A> ProjectSetCommonInstanceMetadataCall<'a, C, NC, A> where NC: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -34143,7 +34781,7 @@ impl<'a, C, NC, A> ProjectSetCommonInstanceMetadataCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ProjectSetCommonInstanceMetadataCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -34204,7 +34842,7 @@ impl<'a, C, NC, A> ProjectSetCommonInstanceMetadataCall<'a, C, NC, A> where NC: /// Returns the specified project resource. /// /// A builder for the *get* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -34262,7 +34900,7 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -34315,7 +34953,7 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -34327,7 +34965,6 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -34337,7 +34974,7 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -34348,7 +34985,7 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -34357,13 +34994,13 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -34375,7 +35012,7 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ProjectGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -34436,7 +35073,7 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Moves an instance and its attached persistent disks from one zone to another. /// /// A builder for the *moveInstance* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -34501,7 +35138,7 @@ impl<'a, C, NC, A> ProjectMoveInstanceCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -34558,7 +35195,7 @@ impl<'a, C, NC, A> ProjectMoveInstanceCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -34574,7 +35211,6 @@ impl<'a, C, NC, A> ProjectMoveInstanceCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -34584,7 +35220,7 @@ impl<'a, C, NC, A> ProjectMoveInstanceCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -34595,7 +35231,7 @@ impl<'a, C, NC, A> ProjectMoveInstanceCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -34604,13 +35240,13 @@ impl<'a, C, NC, A> ProjectMoveInstanceCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -34631,7 +35267,7 @@ impl<'a, C, NC, A> ProjectMoveInstanceCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ProjectMoveInstanceCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -34692,7 +35328,7 @@ impl<'a, C, NC, A> ProjectMoveInstanceCall<'a, C, NC, A> where NC: hyper::net::N /// Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. /// /// A builder for the *setUsageExportBucket* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -34757,7 +35393,7 @@ impl<'a, C, NC, A> ProjectSetUsageExportBucketCall<'a, C, NC, A> where NC: hyper for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -34814,7 +35450,7 @@ impl<'a, C, NC, A> ProjectSetUsageExportBucketCall<'a, C, NC, A> where NC: hyper } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -34830,7 +35466,6 @@ impl<'a, C, NC, A> ProjectSetUsageExportBucketCall<'a, C, NC, A> where NC: hyper dlg.pre_request(); req.send() - }; match req_result { @@ -34840,7 +35475,7 @@ impl<'a, C, NC, A> ProjectSetUsageExportBucketCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -34851,7 +35486,7 @@ impl<'a, C, NC, A> ProjectSetUsageExportBucketCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -34860,13 +35495,13 @@ impl<'a, C, NC, A> ProjectSetUsageExportBucketCall<'a, C, NC, A> where NC: hyper Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -34887,7 +35522,7 @@ impl<'a, C, NC, A> ProjectSetUsageExportBucketCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ProjectSetUsageExportBucketCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -34948,7 +35583,7 @@ impl<'a, C, NC, A> ProjectSetUsageExportBucketCall<'a, C, NC, A> where NC: hyper /// Returns the specified HttpHealthCheck resource. /// /// A builder for the *get* method supported by a *httpHealthCheck* resource. -/// It is not used directly, but through a `HttpHealthCheckMethods`. +/// It is not used directly, but through a `HttpHealthCheckMethods` instance. /// /// # Example /// @@ -35008,7 +35643,7 @@ impl<'a, C, NC, A> HttpHealthCheckGetCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "project", "httpHealthCheck"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -35061,7 +35696,7 @@ impl<'a, C, NC, A> HttpHealthCheckGetCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -35073,7 +35708,6 @@ impl<'a, C, NC, A> HttpHealthCheckGetCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -35083,7 +35717,7 @@ impl<'a, C, NC, A> HttpHealthCheckGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -35094,7 +35728,7 @@ impl<'a, C, NC, A> HttpHealthCheckGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -35103,13 +35737,13 @@ impl<'a, C, NC, A> HttpHealthCheckGetCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -35121,7 +35755,7 @@ impl<'a, C, NC, A> HttpHealthCheckGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> HttpHealthCheckGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -35131,7 +35765,7 @@ impl<'a, C, NC, A> HttpHealthCheckGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the HttpHealthCheck resource to return. + /// Name of the HttpHealthCheck resource to return. pub fn http_health_check(mut self, new_value: &str) -> HttpHealthCheckGetCall<'a, C, NC, A> { self._http_health_check = new_value.to_string(); self @@ -35192,7 +35826,7 @@ impl<'a, C, NC, A> HttpHealthCheckGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *httpHealthCheck* resource. -/// It is not used directly, but through a `HttpHealthCheckMethods`. +/// It is not used directly, but through a `HttpHealthCheckMethods` instance. /// /// # Example /// @@ -35259,7 +35893,7 @@ impl<'a, C, NC, A> HttpHealthCheckPatchCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "project", "httpHealthCheck"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -35316,7 +35950,7 @@ impl<'a, C, NC, A> HttpHealthCheckPatchCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -35332,7 +35966,6 @@ impl<'a, C, NC, A> HttpHealthCheckPatchCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -35342,7 +35975,7 @@ impl<'a, C, NC, A> HttpHealthCheckPatchCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -35353,7 +35986,7 @@ impl<'a, C, NC, A> HttpHealthCheckPatchCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -35362,13 +35995,13 @@ impl<'a, C, NC, A> HttpHealthCheckPatchCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -35389,7 +36022,7 @@ impl<'a, C, NC, A> HttpHealthCheckPatchCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> HttpHealthCheckPatchCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -35399,7 +36032,7 @@ impl<'a, C, NC, A> HttpHealthCheckPatchCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the HttpHealthCheck resource to update. + /// Name of the HttpHealthCheck resource to update. pub fn http_health_check(mut self, new_value: &str) -> HttpHealthCheckPatchCall<'a, C, NC, A> { self._http_health_check = new_value.to_string(); self @@ -35460,7 +36093,7 @@ impl<'a, C, NC, A> HttpHealthCheckPatchCall<'a, C, NC, A> where NC: hyper::net:: /// Retrieves the list of HttpHealthCheck resources available to the specified project. /// /// A builder for the *list* method supported by a *httpHealthCheck* resource. -/// It is not used directly, but through a `HttpHealthCheckMethods`. +/// It is not used directly, but through a `HttpHealthCheckMethods` instance. /// /// # Example /// @@ -35533,7 +36166,7 @@ impl<'a, C, NC, A> HttpHealthCheckListCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -35586,7 +36219,7 @@ impl<'a, C, NC, A> HttpHealthCheckListCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -35598,7 +36231,6 @@ impl<'a, C, NC, A> HttpHealthCheckListCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -35608,7 +36240,7 @@ impl<'a, C, NC, A> HttpHealthCheckListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -35619,7 +36251,7 @@ impl<'a, C, NC, A> HttpHealthCheckListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -35628,13 +36260,13 @@ impl<'a, C, NC, A> HttpHealthCheckListCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -35646,7 +36278,7 @@ impl<'a, C, NC, A> HttpHealthCheckListCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> HttpHealthCheckListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -35654,7 +36286,7 @@ impl<'a, C, NC, A> HttpHealthCheckListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> HttpHealthCheckListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -35662,7 +36294,7 @@ impl<'a, C, NC, A> HttpHealthCheckListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> HttpHealthCheckListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -35670,7 +36302,7 @@ impl<'a, C, NC, A> HttpHealthCheckListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> HttpHealthCheckListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -35731,7 +36363,7 @@ impl<'a, C, NC, A> HttpHealthCheckListCall<'a, C, NC, A> where NC: hyper::net::N /// Deletes the specified HttpHealthCheck resource. /// /// A builder for the *delete* method supported by a *httpHealthCheck* resource. -/// It is not used directly, but through a `HttpHealthCheckMethods`. +/// It is not used directly, but through a `HttpHealthCheckMethods` instance. /// /// # Example /// @@ -35791,7 +36423,7 @@ impl<'a, C, NC, A> HttpHealthCheckDeleteCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "project", "httpHealthCheck"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -35844,7 +36476,7 @@ impl<'a, C, NC, A> HttpHealthCheckDeleteCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -35856,7 +36488,6 @@ impl<'a, C, NC, A> HttpHealthCheckDeleteCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -35866,7 +36497,7 @@ impl<'a, C, NC, A> HttpHealthCheckDeleteCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -35877,7 +36508,7 @@ impl<'a, C, NC, A> HttpHealthCheckDeleteCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -35886,13 +36517,13 @@ impl<'a, C, NC, A> HttpHealthCheckDeleteCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -35904,7 +36535,7 @@ impl<'a, C, NC, A> HttpHealthCheckDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> HttpHealthCheckDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -35914,7 +36545,7 @@ impl<'a, C, NC, A> HttpHealthCheckDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the HttpHealthCheck resource to delete. + /// Name of the HttpHealthCheck resource to delete. pub fn http_health_check(mut self, new_value: &str) -> HttpHealthCheckDeleteCall<'a, C, NC, A> { self._http_health_check = new_value.to_string(); self @@ -35975,7 +36606,7 @@ impl<'a, C, NC, A> HttpHealthCheckDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Creates a HttpHealthCheck resource in the specified project using the data included in the request. /// /// A builder for the *insert* method supported by a *httpHealthCheck* resource. -/// It is not used directly, but through a `HttpHealthCheckMethods`. +/// It is not used directly, but through a `HttpHealthCheckMethods` instance. /// /// # Example /// @@ -36040,7 +36671,7 @@ impl<'a, C, NC, A> HttpHealthCheckInsertCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -36097,7 +36728,7 @@ impl<'a, C, NC, A> HttpHealthCheckInsertCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -36113,7 +36744,6 @@ impl<'a, C, NC, A> HttpHealthCheckInsertCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -36123,7 +36753,7 @@ impl<'a, C, NC, A> HttpHealthCheckInsertCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -36134,7 +36764,7 @@ impl<'a, C, NC, A> HttpHealthCheckInsertCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -36143,13 +36773,13 @@ impl<'a, C, NC, A> HttpHealthCheckInsertCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -36170,7 +36800,7 @@ impl<'a, C, NC, A> HttpHealthCheckInsertCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> HttpHealthCheckInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -36231,7 +36861,7 @@ impl<'a, C, NC, A> HttpHealthCheckInsertCall<'a, C, NC, A> where NC: hyper::net: /// Updates a HttpHealthCheck resource in the specified project using the data included in the request. /// /// A builder for the *update* method supported by a *httpHealthCheck* resource. -/// It is not used directly, but through a `HttpHealthCheckMethods`. +/// It is not used directly, but through a `HttpHealthCheckMethods` instance. /// /// # Example /// @@ -36298,7 +36928,7 @@ impl<'a, C, NC, A> HttpHealthCheckUpdateCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "project", "httpHealthCheck"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -36355,7 +36985,7 @@ impl<'a, C, NC, A> HttpHealthCheckUpdateCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -36371,7 +37001,6 @@ impl<'a, C, NC, A> HttpHealthCheckUpdateCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -36381,7 +37010,7 @@ impl<'a, C, NC, A> HttpHealthCheckUpdateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -36392,7 +37021,7 @@ impl<'a, C, NC, A> HttpHealthCheckUpdateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -36401,13 +37030,13 @@ impl<'a, C, NC, A> HttpHealthCheckUpdateCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -36428,7 +37057,7 @@ impl<'a, C, NC, A> HttpHealthCheckUpdateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> HttpHealthCheckUpdateCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -36438,7 +37067,7 @@ impl<'a, C, NC, A> HttpHealthCheckUpdateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the HttpHealthCheck resource to update. + /// Name of the HttpHealthCheck resource to update. pub fn http_health_check(mut self, new_value: &str) -> HttpHealthCheckUpdateCall<'a, C, NC, A> { self._http_health_check = new_value.to_string(); self @@ -36499,7 +37128,7 @@ impl<'a, C, NC, A> HttpHealthCheckUpdateCall<'a, C, NC, A> where NC: hyper::net: /// Deletes the specified instance template resource. /// /// A builder for the *delete* method supported by a *instanceTemplate* resource. -/// It is not used directly, but through a `InstanceTemplateMethods`. +/// It is not used directly, but through a `InstanceTemplateMethods` instance. /// /// # Example /// @@ -36559,7 +37188,7 @@ impl<'a, C, NC, A> InstanceTemplateDeleteCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "project", "instanceTemplate"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -36612,7 +37241,7 @@ impl<'a, C, NC, A> InstanceTemplateDeleteCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -36624,7 +37253,6 @@ impl<'a, C, NC, A> InstanceTemplateDeleteCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -36634,7 +37262,7 @@ impl<'a, C, NC, A> InstanceTemplateDeleteCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -36645,7 +37273,7 @@ impl<'a, C, NC, A> InstanceTemplateDeleteCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -36654,13 +37282,13 @@ impl<'a, C, NC, A> InstanceTemplateDeleteCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -36672,7 +37300,7 @@ impl<'a, C, NC, A> InstanceTemplateDeleteCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> InstanceTemplateDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -36682,7 +37310,7 @@ impl<'a, C, NC, A> InstanceTemplateDeleteCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the instance template resource to delete. + /// Name of the instance template resource to delete. pub fn instance_template(mut self, new_value: &str) -> InstanceTemplateDeleteCall<'a, C, NC, A> { self._instance_template = new_value.to_string(); self @@ -36743,7 +37371,7 @@ impl<'a, C, NC, A> InstanceTemplateDeleteCall<'a, C, NC, A> where NC: hyper::net /// Returns the specified instance template resource. /// /// A builder for the *get* method supported by a *instanceTemplate* resource. -/// It is not used directly, but through a `InstanceTemplateMethods`. +/// It is not used directly, but through a `InstanceTemplateMethods` instance. /// /// # Example /// @@ -36803,7 +37431,7 @@ impl<'a, C, NC, A> InstanceTemplateGetCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "project", "instanceTemplate"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -36856,7 +37484,7 @@ impl<'a, C, NC, A> InstanceTemplateGetCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -36868,7 +37496,6 @@ impl<'a, C, NC, A> InstanceTemplateGetCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -36878,7 +37505,7 @@ impl<'a, C, NC, A> InstanceTemplateGetCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -36889,7 +37516,7 @@ impl<'a, C, NC, A> InstanceTemplateGetCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -36898,13 +37525,13 @@ impl<'a, C, NC, A> InstanceTemplateGetCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -36916,7 +37543,7 @@ impl<'a, C, NC, A> InstanceTemplateGetCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> InstanceTemplateGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -36926,7 +37553,7 @@ impl<'a, C, NC, A> InstanceTemplateGetCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the instance template resource to return. + /// Name of the instance template resource to return. pub fn instance_template(mut self, new_value: &str) -> InstanceTemplateGetCall<'a, C, NC, A> { self._instance_template = new_value.to_string(); self @@ -36987,7 +37614,7 @@ impl<'a, C, NC, A> InstanceTemplateGetCall<'a, C, NC, A> where NC: hyper::net::N /// Retrieves the list of instance template resources contained within the specified project. /// /// A builder for the *list* method supported by a *instanceTemplate* resource. -/// It is not used directly, but through a `InstanceTemplateMethods`. +/// It is not used directly, but through a `InstanceTemplateMethods` instance. /// /// # Example /// @@ -37060,7 +37687,7 @@ impl<'a, C, NC, A> InstanceTemplateListCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -37113,7 +37740,7 @@ impl<'a, C, NC, A> InstanceTemplateListCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -37125,7 +37752,6 @@ impl<'a, C, NC, A> InstanceTemplateListCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -37135,7 +37761,7 @@ impl<'a, C, NC, A> InstanceTemplateListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -37146,7 +37772,7 @@ impl<'a, C, NC, A> InstanceTemplateListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -37155,13 +37781,13 @@ impl<'a, C, NC, A> InstanceTemplateListCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -37173,7 +37799,7 @@ impl<'a, C, NC, A> InstanceTemplateListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> InstanceTemplateListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -37181,7 +37807,7 @@ impl<'a, C, NC, A> InstanceTemplateListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> InstanceTemplateListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -37189,7 +37815,7 @@ impl<'a, C, NC, A> InstanceTemplateListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> InstanceTemplateListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -37197,7 +37823,7 @@ impl<'a, C, NC, A> InstanceTemplateListCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> InstanceTemplateListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -37258,7 +37884,7 @@ impl<'a, C, NC, A> InstanceTemplateListCall<'a, C, NC, A> where NC: hyper::net:: /// Creates an instance template resource in the specified project using the data included in the request. /// /// A builder for the *insert* method supported by a *instanceTemplate* resource. -/// It is not used directly, but through a `InstanceTemplateMethods`. +/// It is not used directly, but through a `InstanceTemplateMethods` instance. /// /// # Example /// @@ -37323,7 +37949,7 @@ impl<'a, C, NC, A> InstanceTemplateInsertCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -37380,7 +38006,7 @@ impl<'a, C, NC, A> InstanceTemplateInsertCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -37396,7 +38022,6 @@ impl<'a, C, NC, A> InstanceTemplateInsertCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -37406,7 +38031,7 @@ impl<'a, C, NC, A> InstanceTemplateInsertCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -37417,7 +38042,7 @@ impl<'a, C, NC, A> InstanceTemplateInsertCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -37426,13 +38051,13 @@ impl<'a, C, NC, A> InstanceTemplateInsertCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -37453,7 +38078,7 @@ impl<'a, C, NC, A> InstanceTemplateInsertCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> InstanceTemplateInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -37514,7 +38139,7 @@ impl<'a, C, NC, A> InstanceTemplateInsertCall<'a, C, NC, A> where NC: hyper::net /// Deletes the specified TargetHttpProxy resource. /// /// A builder for the *delete* method supported by a *targetHttpProxy* resource. -/// It is not used directly, but through a `TargetHttpProxyMethods`. +/// It is not used directly, but through a `TargetHttpProxyMethods` instance. /// /// # Example /// @@ -37574,7 +38199,7 @@ impl<'a, C, NC, A> TargetHttpProxyDeleteCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "project", "targetHttpProxy"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -37627,7 +38252,7 @@ impl<'a, C, NC, A> TargetHttpProxyDeleteCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -37639,7 +38264,6 @@ impl<'a, C, NC, A> TargetHttpProxyDeleteCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -37649,7 +38273,7 @@ impl<'a, C, NC, A> TargetHttpProxyDeleteCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -37660,7 +38284,7 @@ impl<'a, C, NC, A> TargetHttpProxyDeleteCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -37669,13 +38293,13 @@ impl<'a, C, NC, A> TargetHttpProxyDeleteCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -37687,7 +38311,7 @@ impl<'a, C, NC, A> TargetHttpProxyDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetHttpProxyDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -37697,7 +38321,7 @@ impl<'a, C, NC, A> TargetHttpProxyDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the TargetHttpProxy resource to delete. + /// Name of the TargetHttpProxy resource to delete. pub fn target_http_proxy(mut self, new_value: &str) -> TargetHttpProxyDeleteCall<'a, C, NC, A> { self._target_http_proxy = new_value.to_string(); self @@ -37758,7 +38382,7 @@ impl<'a, C, NC, A> TargetHttpProxyDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Retrieves the list of TargetHttpProxy resources available to the specified project. /// /// A builder for the *list* method supported by a *targetHttpProxy* resource. -/// It is not used directly, but through a `TargetHttpProxyMethods`. +/// It is not used directly, but through a `TargetHttpProxyMethods` instance. /// /// # Example /// @@ -37831,7 +38455,7 @@ impl<'a, C, NC, A> TargetHttpProxyListCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -37884,7 +38508,7 @@ impl<'a, C, NC, A> TargetHttpProxyListCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -37896,7 +38520,6 @@ impl<'a, C, NC, A> TargetHttpProxyListCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -37906,7 +38529,7 @@ impl<'a, C, NC, A> TargetHttpProxyListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -37917,7 +38540,7 @@ impl<'a, C, NC, A> TargetHttpProxyListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -37926,13 +38549,13 @@ impl<'a, C, NC, A> TargetHttpProxyListCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -37944,7 +38567,7 @@ impl<'a, C, NC, A> TargetHttpProxyListCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetHttpProxyListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -37952,7 +38575,7 @@ impl<'a, C, NC, A> TargetHttpProxyListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> TargetHttpProxyListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -37960,7 +38583,7 @@ impl<'a, C, NC, A> TargetHttpProxyListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> TargetHttpProxyListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -37968,7 +38591,7 @@ impl<'a, C, NC, A> TargetHttpProxyListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> TargetHttpProxyListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -38029,7 +38652,7 @@ impl<'a, C, NC, A> TargetHttpProxyListCall<'a, C, NC, A> where NC: hyper::net::N /// Returns the specified TargetHttpProxy resource. /// /// A builder for the *get* method supported by a *targetHttpProxy* resource. -/// It is not used directly, but through a `TargetHttpProxyMethods`. +/// It is not used directly, but through a `TargetHttpProxyMethods` instance. /// /// # Example /// @@ -38089,7 +38712,7 @@ impl<'a, C, NC, A> TargetHttpProxyGetCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "project", "targetHttpProxy"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -38142,7 +38765,7 @@ impl<'a, C, NC, A> TargetHttpProxyGetCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -38154,7 +38777,6 @@ impl<'a, C, NC, A> TargetHttpProxyGetCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -38164,7 +38786,7 @@ impl<'a, C, NC, A> TargetHttpProxyGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -38175,7 +38797,7 @@ impl<'a, C, NC, A> TargetHttpProxyGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -38184,13 +38806,13 @@ impl<'a, C, NC, A> TargetHttpProxyGetCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -38202,7 +38824,7 @@ impl<'a, C, NC, A> TargetHttpProxyGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetHttpProxyGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -38212,7 +38834,7 @@ impl<'a, C, NC, A> TargetHttpProxyGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the TargetHttpProxy resource to return. + /// Name of the TargetHttpProxy resource to return. pub fn target_http_proxy(mut self, new_value: &str) -> TargetHttpProxyGetCall<'a, C, NC, A> { self._target_http_proxy = new_value.to_string(); self @@ -38273,7 +38895,7 @@ impl<'a, C, NC, A> TargetHttpProxyGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Changes the URL map for TargetHttpProxy. /// /// A builder for the *setUrlMap* method supported by a *targetHttpProxy* resource. -/// It is not used directly, but through a `TargetHttpProxyMethods`. +/// It is not used directly, but through a `TargetHttpProxyMethods` instance. /// /// # Example /// @@ -38340,7 +38962,7 @@ impl<'a, C, NC, A> TargetHttpProxySetUrlMapCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "project", "targetHttpProxy"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -38397,7 +39019,7 @@ impl<'a, C, NC, A> TargetHttpProxySetUrlMapCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -38413,7 +39035,6 @@ impl<'a, C, NC, A> TargetHttpProxySetUrlMapCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -38423,7 +39044,7 @@ impl<'a, C, NC, A> TargetHttpProxySetUrlMapCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -38434,7 +39055,7 @@ impl<'a, C, NC, A> TargetHttpProxySetUrlMapCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -38443,13 +39064,13 @@ impl<'a, C, NC, A> TargetHttpProxySetUrlMapCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -38470,7 +39091,7 @@ impl<'a, C, NC, A> TargetHttpProxySetUrlMapCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetHttpProxySetUrlMapCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -38480,7 +39101,7 @@ impl<'a, C, NC, A> TargetHttpProxySetUrlMapCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the TargetHttpProxy resource whose URL map is to be set. + /// Name of the TargetHttpProxy resource whose URL map is to be set. pub fn target_http_proxy(mut self, new_value: &str) -> TargetHttpProxySetUrlMapCall<'a, C, NC, A> { self._target_http_proxy = new_value.to_string(); self @@ -38541,7 +39162,7 @@ impl<'a, C, NC, A> TargetHttpProxySetUrlMapCall<'a, C, NC, A> where NC: hyper::n /// Creates a TargetHttpProxy resource in the specified project using the data included in the request. /// /// A builder for the *insert* method supported by a *targetHttpProxy* resource. -/// It is not used directly, but through a `TargetHttpProxyMethods`. +/// It is not used directly, but through a `TargetHttpProxyMethods` instance. /// /// # Example /// @@ -38606,7 +39227,7 @@ impl<'a, C, NC, A> TargetHttpProxyInsertCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -38663,7 +39284,7 @@ impl<'a, C, NC, A> TargetHttpProxyInsertCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -38679,7 +39300,6 @@ impl<'a, C, NC, A> TargetHttpProxyInsertCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -38689,7 +39309,7 @@ impl<'a, C, NC, A> TargetHttpProxyInsertCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -38700,7 +39320,7 @@ impl<'a, C, NC, A> TargetHttpProxyInsertCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -38709,13 +39329,13 @@ impl<'a, C, NC, A> TargetHttpProxyInsertCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -38736,7 +39356,7 @@ impl<'a, C, NC, A> TargetHttpProxyInsertCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> TargetHttpProxyInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -38797,7 +39417,7 @@ impl<'a, C, NC, A> TargetHttpProxyInsertCall<'a, C, NC, A> where NC: hyper::net: /// Deletes the specified zone-specific operation resource. /// /// A builder for the *delete* method supported by a *zoneOperation* resource. -/// It is not used directly, but through a `ZoneOperationMethods`. +/// It is not used directly, but through a `ZoneOperationMethods` instance. /// /// # Example /// @@ -38859,7 +39479,7 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["project", "zone", "operation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -38911,7 +39531,7 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -38923,7 +39543,6 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -38933,7 +39552,7 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -38944,12 +39563,12 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -38961,7 +39580,7 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ZoneOperationDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -38971,7 +39590,7 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the zone scoping this request. + /// Name of the zone scoping this request. pub fn zone(mut self, new_value: &str) -> ZoneOperationDeleteCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -38981,7 +39600,7 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the operation resource to delete. + /// Name of the operation resource to delete. pub fn operation(mut self, new_value: &str) -> ZoneOperationDeleteCall<'a, C, NC, A> { self._operation = new_value.to_string(); self @@ -39042,7 +39661,7 @@ impl<'a, C, NC, A> ZoneOperationDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// Retrieves the list of operation resources contained within the specified zone. /// /// A builder for the *list* method supported by a *zoneOperation* resource. -/// It is not used directly, but through a `ZoneOperationMethods`. +/// It is not used directly, but through a `ZoneOperationMethods` instance. /// /// # Example /// @@ -39117,7 +39736,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "project", "zone", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -39170,7 +39789,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -39182,7 +39801,6 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -39192,7 +39810,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -39203,7 +39821,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -39212,13 +39830,13 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -39230,7 +39848,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ZoneOperationListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -39240,7 +39858,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the zone scoping this request. + /// Name of the zone scoping this request. pub fn zone(mut self, new_value: &str) -> ZoneOperationListCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -39248,7 +39866,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> ZoneOperationListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -39256,7 +39874,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> ZoneOperationListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -39264,7 +39882,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> ZoneOperationListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -39325,7 +39943,7 @@ impl<'a, C, NC, A> ZoneOperationListCall<'a, C, NC, A> where NC: hyper::net::Net /// Retrieves the specified zone-specific operation resource. /// /// A builder for the *get* method supported by a *zoneOperation* resource. -/// It is not used directly, but through a `ZoneOperationMethods`. +/// It is not used directly, but through a `ZoneOperationMethods` instance. /// /// # Example /// @@ -39387,7 +40005,7 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "project", "zone", "operation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -39440,7 +40058,7 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -39452,7 +40070,6 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -39462,7 +40079,7 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -39473,7 +40090,7 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -39482,13 +40099,13 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -39500,7 +40117,7 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> ZoneOperationGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -39510,7 +40127,7 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the zone scoping this request. + /// Name of the zone scoping this request. pub fn zone(mut self, new_value: &str) -> ZoneOperationGetCall<'a, C, NC, A> { self._zone = new_value.to_string(); self @@ -39520,7 +40137,7 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the operation resource to return. + /// Name of the operation resource to return. pub fn operation(mut self, new_value: &str) -> ZoneOperationGetCall<'a, C, NC, A> { self._operation = new_value.to_string(); self @@ -39581,7 +40198,7 @@ impl<'a, C, NC, A> ZoneOperationGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Returns the specified route resource. /// /// A builder for the *get* method supported by a *route* resource. -/// It is not used directly, but through a `RouteMethods`. +/// It is not used directly, but through a `RouteMethods` instance. /// /// # Example /// @@ -39641,7 +40258,7 @@ impl<'a, C, NC, A> RouteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "project", "route"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -39694,7 +40311,7 @@ impl<'a, C, NC, A> RouteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -39706,7 +40323,6 @@ impl<'a, C, NC, A> RouteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -39716,7 +40332,7 @@ impl<'a, C, NC, A> RouteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -39727,7 +40343,7 @@ impl<'a, C, NC, A> RouteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -39736,13 +40352,13 @@ impl<'a, C, NC, A> RouteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -39754,7 +40370,7 @@ impl<'a, C, NC, A> RouteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> RouteGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -39764,7 +40380,7 @@ impl<'a, C, NC, A> RouteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the route resource to return. + /// Name of the route resource to return. pub fn route(mut self, new_value: &str) -> RouteGetCall<'a, C, NC, A> { self._route = new_value.to_string(); self @@ -39825,7 +40441,7 @@ impl<'a, C, NC, A> RouteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Creates a route resource in the specified project using the data included in the request. /// /// A builder for the *insert* method supported by a *route* resource. -/// It is not used directly, but through a `RouteMethods`. +/// It is not used directly, but through a `RouteMethods` instance. /// /// # Example /// @@ -39890,7 +40506,7 @@ impl<'a, C, NC, A> RouteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -39947,7 +40563,7 @@ impl<'a, C, NC, A> RouteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -39963,7 +40579,6 @@ impl<'a, C, NC, A> RouteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -39973,7 +40588,7 @@ impl<'a, C, NC, A> RouteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -39984,7 +40599,7 @@ impl<'a, C, NC, A> RouteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -39993,13 +40608,13 @@ impl<'a, C, NC, A> RouteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -40020,7 +40635,7 @@ impl<'a, C, NC, A> RouteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> RouteInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -40081,7 +40696,7 @@ impl<'a, C, NC, A> RouteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Retrieves the list of route resources available to the specified project. /// /// A builder for the *list* method supported by a *route* resource. -/// It is not used directly, but through a `RouteMethods`. +/// It is not used directly, but through a `RouteMethods` instance. /// /// # Example /// @@ -40154,7 +40769,7 @@ impl<'a, C, NC, A> RouteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -40207,7 +40822,7 @@ impl<'a, C, NC, A> RouteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -40219,7 +40834,6 @@ impl<'a, C, NC, A> RouteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -40229,7 +40843,7 @@ impl<'a, C, NC, A> RouteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -40240,7 +40854,7 @@ impl<'a, C, NC, A> RouteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -40249,13 +40863,13 @@ impl<'a, C, NC, A> RouteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -40267,7 +40881,7 @@ impl<'a, C, NC, A> RouteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> RouteListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -40275,7 +40889,7 @@ impl<'a, C, NC, A> RouteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> RouteListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -40283,7 +40897,7 @@ impl<'a, C, NC, A> RouteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> RouteListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -40291,7 +40905,7 @@ impl<'a, C, NC, A> RouteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> RouteListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -40352,7 +40966,7 @@ impl<'a, C, NC, A> RouteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Deletes the specified route resource. /// /// A builder for the *delete* method supported by a *route* resource. -/// It is not used directly, but through a `RouteMethods`. +/// It is not used directly, but through a `RouteMethods` instance. /// /// # Example /// @@ -40412,7 +41026,7 @@ impl<'a, C, NC, A> RouteDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "project", "route"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -40465,7 +41079,7 @@ impl<'a, C, NC, A> RouteDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -40477,7 +41091,6 @@ impl<'a, C, NC, A> RouteDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -40487,7 +41100,7 @@ impl<'a, C, NC, A> RouteDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -40498,7 +41111,7 @@ impl<'a, C, NC, A> RouteDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -40507,13 +41120,13 @@ impl<'a, C, NC, A> RouteDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -40525,7 +41138,7 @@ impl<'a, C, NC, A> RouteDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the project scoping this request. + /// Name of the project scoping this request. pub fn project(mut self, new_value: &str) -> RouteDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -40535,7 +41148,7 @@ impl<'a, C, NC, A> RouteDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the route resource to delete. + /// Name of the route resource to delete. pub fn route(mut self, new_value: &str) -> RouteDeleteCall<'a, C, NC, A> { self._route = new_value.to_string(); self @@ -40596,7 +41209,7 @@ impl<'a, C, NC, A> RouteDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Updates the specified firewall resource with the data included in the request. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *firewall* resource. -/// It is not used directly, but through a `FirewallMethods`. +/// It is not used directly, but through a `FirewallMethods` instance. /// /// # Example /// @@ -40663,7 +41276,7 @@ impl<'a, C, NC, A> FirewallPatchCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "project", "firewall"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -40720,7 +41333,7 @@ impl<'a, C, NC, A> FirewallPatchCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -40736,7 +41349,6 @@ impl<'a, C, NC, A> FirewallPatchCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -40746,7 +41358,7 @@ impl<'a, C, NC, A> FirewallPatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -40757,7 +41369,7 @@ impl<'a, C, NC, A> FirewallPatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -40766,13 +41378,13 @@ impl<'a, C, NC, A> FirewallPatchCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -40793,7 +41405,7 @@ impl<'a, C, NC, A> FirewallPatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> FirewallPatchCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -40803,7 +41415,7 @@ impl<'a, C, NC, A> FirewallPatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the firewall resource to update. + /// Name of the firewall resource to update. pub fn firewall(mut self, new_value: &str) -> FirewallPatchCall<'a, C, NC, A> { self._firewall = new_value.to_string(); self @@ -40864,7 +41476,7 @@ impl<'a, C, NC, A> FirewallPatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Returns the specified firewall resource. /// /// A builder for the *get* method supported by a *firewall* resource. -/// It is not used directly, but through a `FirewallMethods`. +/// It is not used directly, but through a `FirewallMethods` instance. /// /// # Example /// @@ -40924,7 +41536,7 @@ impl<'a, C, NC, A> FirewallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "project", "firewall"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -40977,7 +41589,7 @@ impl<'a, C, NC, A> FirewallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -40989,7 +41601,6 @@ impl<'a, C, NC, A> FirewallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -40999,7 +41610,7 @@ impl<'a, C, NC, A> FirewallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -41010,7 +41621,7 @@ impl<'a, C, NC, A> FirewallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -41019,13 +41630,13 @@ impl<'a, C, NC, A> FirewallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -41037,7 +41648,7 @@ impl<'a, C, NC, A> FirewallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> FirewallGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -41047,7 +41658,7 @@ impl<'a, C, NC, A> FirewallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the firewall resource to return. + /// Name of the firewall resource to return. pub fn firewall(mut self, new_value: &str) -> FirewallGetCall<'a, C, NC, A> { self._firewall = new_value.to_string(); self @@ -41108,7 +41719,7 @@ impl<'a, C, NC, A> FirewallGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Creates a firewall resource in the specified project using the data included in the request. /// /// A builder for the *insert* method supported by a *firewall* resource. -/// It is not used directly, but through a `FirewallMethods`. +/// It is not used directly, but through a `FirewallMethods` instance. /// /// # Example /// @@ -41173,7 +41784,7 @@ impl<'a, C, NC, A> FirewallInsertCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -41230,7 +41841,7 @@ impl<'a, C, NC, A> FirewallInsertCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -41246,7 +41857,6 @@ impl<'a, C, NC, A> FirewallInsertCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -41256,7 +41866,7 @@ impl<'a, C, NC, A> FirewallInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -41267,7 +41877,7 @@ impl<'a, C, NC, A> FirewallInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -41276,13 +41886,13 @@ impl<'a, C, NC, A> FirewallInsertCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -41303,7 +41913,7 @@ impl<'a, C, NC, A> FirewallInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> FirewallInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -41364,7 +41974,7 @@ impl<'a, C, NC, A> FirewallInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Updates the specified firewall resource with the data included in the request. /// /// A builder for the *update* method supported by a *firewall* resource. -/// It is not used directly, but through a `FirewallMethods`. +/// It is not used directly, but through a `FirewallMethods` instance. /// /// # Example /// @@ -41431,7 +42041,7 @@ impl<'a, C, NC, A> FirewallUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "firewall"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -41488,7 +42098,7 @@ impl<'a, C, NC, A> FirewallUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -41504,7 +42114,6 @@ impl<'a, C, NC, A> FirewallUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -41514,7 +42123,7 @@ impl<'a, C, NC, A> FirewallUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -41525,7 +42134,7 @@ impl<'a, C, NC, A> FirewallUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -41534,13 +42143,13 @@ impl<'a, C, NC, A> FirewallUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -41561,7 +42170,7 @@ impl<'a, C, NC, A> FirewallUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> FirewallUpdateCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -41571,7 +42180,7 @@ impl<'a, C, NC, A> FirewallUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the firewall resource to update. + /// Name of the firewall resource to update. pub fn firewall(mut self, new_value: &str) -> FirewallUpdateCall<'a, C, NC, A> { self._firewall = new_value.to_string(); self @@ -41632,7 +42241,7 @@ impl<'a, C, NC, A> FirewallUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Deletes the specified firewall resource. /// /// A builder for the *delete* method supported by a *firewall* resource. -/// It is not used directly, but through a `FirewallMethods`. +/// It is not used directly, but through a `FirewallMethods` instance. /// /// # Example /// @@ -41692,7 +42301,7 @@ impl<'a, C, NC, A> FirewallDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "firewall"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -41745,7 +42354,7 @@ impl<'a, C, NC, A> FirewallDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -41757,7 +42366,6 @@ impl<'a, C, NC, A> FirewallDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -41767,7 +42375,7 @@ impl<'a, C, NC, A> FirewallDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -41778,7 +42386,7 @@ impl<'a, C, NC, A> FirewallDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -41787,13 +42395,13 @@ impl<'a, C, NC, A> FirewallDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -41805,7 +42413,7 @@ impl<'a, C, NC, A> FirewallDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> FirewallDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -41815,7 +42423,7 @@ impl<'a, C, NC, A> FirewallDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the firewall resource to delete. + /// Name of the firewall resource to delete. pub fn firewall(mut self, new_value: &str) -> FirewallDeleteCall<'a, C, NC, A> { self._firewall = new_value.to_string(); self @@ -41876,7 +42484,7 @@ impl<'a, C, NC, A> FirewallDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieves the list of firewall resources available to the specified project. /// /// A builder for the *list* method supported by a *firewall* resource. -/// It is not used directly, but through a `FirewallMethods`. +/// It is not used directly, but through a `FirewallMethods` instance. /// /// # Example /// @@ -41949,7 +42557,7 @@ impl<'a, C, NC, A> FirewallListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "project", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -42002,7 +42610,7 @@ impl<'a, C, NC, A> FirewallListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -42014,7 +42622,6 @@ impl<'a, C, NC, A> FirewallListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -42024,7 +42631,7 @@ impl<'a, C, NC, A> FirewallListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -42035,7 +42642,7 @@ impl<'a, C, NC, A> FirewallListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -42044,13 +42651,13 @@ impl<'a, C, NC, A> FirewallListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -42062,7 +42669,7 @@ impl<'a, C, NC, A> FirewallListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> FirewallListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -42070,7 +42677,7 @@ impl<'a, C, NC, A> FirewallListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> FirewallListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -42078,7 +42685,7 @@ impl<'a, C, NC, A> FirewallListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> FirewallListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -42086,7 +42693,7 @@ impl<'a, C, NC, A> FirewallListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> FirewallListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -42147,7 +42754,7 @@ impl<'a, C, NC, A> FirewallListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Retrieves the list of operation resources contained within the specified region. /// /// A builder for the *list* method supported by a *regionOperation* resource. -/// It is not used directly, but through a `RegionOperationMethods`. +/// It is not used directly, but through a `RegionOperationMethods` instance. /// /// # Example /// @@ -42222,7 +42829,7 @@ impl<'a, C, NC, A> RegionOperationListCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "project", "region", "pageToken", "maxResults", "filter"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -42275,7 +42882,7 @@ impl<'a, C, NC, A> RegionOperationListCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -42287,7 +42894,6 @@ impl<'a, C, NC, A> RegionOperationListCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -42297,7 +42903,7 @@ impl<'a, C, NC, A> RegionOperationListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -42308,7 +42914,7 @@ impl<'a, C, NC, A> RegionOperationListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -42317,13 +42923,13 @@ impl<'a, C, NC, A> RegionOperationListCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -42335,7 +42941,7 @@ impl<'a, C, NC, A> RegionOperationListCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> RegionOperationListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -42345,7 +42951,7 @@ impl<'a, C, NC, A> RegionOperationListCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> RegionOperationListCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -42353,7 +42959,7 @@ impl<'a, C, NC, A> RegionOperationListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *page token* query property to the given value. /// /// - /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. + /// Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> RegionOperationListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -42361,7 +42967,7 @@ impl<'a, C, NC, A> RegionOperationListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. + /// Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pub fn max_results(mut self, new_value: u32) -> RegionOperationListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -42369,7 +42975,7 @@ impl<'a, C, NC, A> RegionOperationListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *filter* query property to the given value. /// /// - /// Optional. Filter expression for filtering listed resources. + /// Optional. Filter expression for filtering listed resources. pub fn filter(mut self, new_value: &str) -> RegionOperationListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -42430,7 +43036,7 @@ impl<'a, C, NC, A> RegionOperationListCall<'a, C, NC, A> where NC: hyper::net::N /// Deletes the specified region-specific operation resource. /// /// A builder for the *delete* method supported by a *regionOperation* resource. -/// It is not used directly, but through a `RegionOperationMethods`. +/// It is not used directly, but through a `RegionOperationMethods` instance. /// /// # Example /// @@ -42492,7 +43098,7 @@ impl<'a, C, NC, A> RegionOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: for &field in ["project", "region", "operation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -42544,7 +43150,7 @@ impl<'a, C, NC, A> RegionOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -42556,7 +43162,6 @@ impl<'a, C, NC, A> RegionOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -42566,7 +43171,7 @@ impl<'a, C, NC, A> RegionOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -42577,12 +43182,12 @@ impl<'a, C, NC, A> RegionOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -42594,7 +43199,7 @@ impl<'a, C, NC, A> RegionOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> RegionOperationDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -42604,7 +43209,7 @@ impl<'a, C, NC, A> RegionOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the region scoping this request. + /// Name of the region scoping this request. pub fn region(mut self, new_value: &str) -> RegionOperationDeleteCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -42614,7 +43219,7 @@ impl<'a, C, NC, A> RegionOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the operation resource to delete. + /// Name of the operation resource to delete. pub fn operation(mut self, new_value: &str) -> RegionOperationDeleteCall<'a, C, NC, A> { self._operation = new_value.to_string(); self @@ -42675,7 +43280,7 @@ impl<'a, C, NC, A> RegionOperationDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Retrieves the specified region-specific operation resource. /// /// A builder for the *get* method supported by a *regionOperation* resource. -/// It is not used directly, but through a `RegionOperationMethods`. +/// It is not used directly, but through a `RegionOperationMethods` instance. /// /// # Example /// @@ -42737,7 +43342,7 @@ impl<'a, C, NC, A> RegionOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "project", "region", "operation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -42790,7 +43395,7 @@ impl<'a, C, NC, A> RegionOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -42802,7 +43407,6 @@ impl<'a, C, NC, A> RegionOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -42812,7 +43416,7 @@ impl<'a, C, NC, A> RegionOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -42823,7 +43427,7 @@ impl<'a, C, NC, A> RegionOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -42832,13 +43436,13 @@ impl<'a, C, NC, A> RegionOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -42850,7 +43454,7 @@ impl<'a, C, NC, A> RegionOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Project ID for this request. + /// Project ID for this request. pub fn project(mut self, new_value: &str) -> RegionOperationGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -42860,7 +43464,7 @@ impl<'a, C, NC, A> RegionOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the zone scoping this request. + /// Name of the zone scoping this request. pub fn region(mut self, new_value: &str) -> RegionOperationGetCall<'a, C, NC, A> { self._region = new_value.to_string(); self @@ -42870,7 +43474,7 @@ impl<'a, C, NC, A> RegionOperationGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Name of the operation resource to return. + /// Name of the operation resource to return. pub fn operation(mut self, new_value: &str) -> RegionOperationGetCall<'a, C, NC, A> { self._operation = new_value.to_string(); self diff --git a/gen/container1_beta1/Cargo.toml b/gen/container1_beta1/Cargo.toml index d173f89956..dc4862ed39 100644 --- a/gen/container1_beta1/Cargo.toml +++ b/gen/container1_beta1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-container1_beta1" -version = "0.1.1+20150223" +version = "0.1.2+20150316" authors = ["Sebastian Thiel "] description = "A complete library to interact with container (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/container1_beta1" @@ -16,7 +16,7 @@ keywords = ["container", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/container1_beta1/README.md b/gen/container1_beta1/README.md index 00d8d895ad..0f87bc16ae 100644 --- a/gen/container1_beta1/README.md +++ b/gen/container1_beta1/README.md @@ -1,11 +1,11 @@ The `google-container1_beta1` library allows access to all features of the *Google container* service. -This documentation was generated from *container* crate version *0.1.1+20150223*, where *20150223* is the exact revision of the *container:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *container* crate version *0.1.2+20150316*, where *20150316* is the exact revision of the *container:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *container* *v1_beta1* API can be found at the [official documentation site](https://cloud.google.com/container-engine/docs/v1beta1/). @@ -25,6 +25,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-container1_beta1/struct.Container.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-container1_beta1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-container1_beta1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-container1_beta1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -34,6 +36,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-container1_beta1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -70,7 +74,7 @@ google-container1_beta1 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-container1_beta1" as container1_beta1; -use container1_beta1::Result; +use container1_beta1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use container1_beta1::Container; @@ -94,15 +98,17 @@ let result = hub.projects().zones_operations_get("projectId", "zoneId", "operati .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -115,7 +121,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-container1_beta1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-container1_beta1/trait.ResponseResult.html), it will return that by default. @@ -138,8 +144,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-container1_bet ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-container1_beta1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-container1_beta1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-container1_beta1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-container1_beta1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-container1_beta1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/container1_beta1/src/cmn.rs b/gen/container1_beta1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/container1_beta1/src/cmn.rs +++ b/gen/container1_beta1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/container1_beta1/src/lib.rs b/gen/container1_beta1/src/lib.rs index acaeaaf43b..25a9435560 100644 --- a/gen/container1_beta1/src/lib.rs +++ b/gen/container1_beta1/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *container* crate version *0.1.1+20150223*, where *20150223* is the exact revision of the *container:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *container* crate version *0.1.2+20150316*, where *20150316* is the exact revision of the *container:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *container* *v1_beta1* API can be found at the //! [official documentation site](https://cloud.google.com/container-engine/docs/v1beta1/). @@ -25,6 +25,8 @@ //! //! * **[Hub](struct.Container.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -34,6 +36,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -70,7 +74,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-container1_beta1" as container1_beta1; -//! use container1_beta1::Result; +//! use container1_beta1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -95,15 +99,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -116,7 +122,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -139,8 +145,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -189,7 +196,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -235,7 +242,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-container1_beta1" as container1_beta1; -/// use container1_beta1::Result; +/// use container1_beta1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -260,15 +267,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -289,7 +298,7 @@ impl<'a, C, NC, A> Container Container { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -299,7 +308,7 @@ impl<'a, C, NC, A> Container } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -324,7 +333,7 @@ impl<'a, C, NC, A> Container /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ListOperationsResponse { - /// A list of operations in the project in the specified zone. + /// A list of operations in the project in the specified zone. pub operations: Vec, } @@ -342,7 +351,7 @@ impl ResponseResult for ListOperationsResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ListAggregatedClustersResponse { - /// A list of clusters in the project, across all zones. + /// A list of clusters in the project, across all zones. pub clusters: Vec, } @@ -360,7 +369,7 @@ impl ResponseResult for ListAggregatedClustersResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ListClustersResponse { - /// A list of clusters in the project in the specified zone. + /// A list of clusters in the project in the specified zone. pub clusters: Vec, } @@ -373,9 +382,9 @@ impl ResponseResult for ListClustersResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MasterAuth { - /// The password to use when accessing the Kubernetes master endpoint. + /// The password to use when accessing the Kubernetes master endpoint. pub password: String, - /// The username to use when accessing the Kubernetes master endpoint. + /// The username to use when accessing the Kubernetes master endpoint. pub user: String, } @@ -393,23 +402,23 @@ impl Part for MasterAuth {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Cluster { - /// [Output only] The current status of this cluster. + /// [Output only] The current status of this cluster. pub status: String, - /// [Output only] The IP addresses of the container pods in this cluster, in CIDR notation (e.g. 1.2.3.4/29). + /// [Output only] The IP addresses of the container pods in this cluster, in CIDR notation (e.g. 1.2.3.4/29). #[serde(alias="containerIpv4Cidr")] pub container_ipv4_cidr: String, - /// An optional description of this cluster. + /// An optional description of this cluster. pub description: String, - /// [Output only] The size of the address space on each node for hosting containers. + /// [Output only] The size of the address space on each node for hosting containers. #[serde(alias="nodeRoutingPrefixSize")] pub node_routing_prefix_size: i32, - /// The HTTP basic authentication information for accessing the master. Because the master endpoint is open to the internet, you should create a strong password. + /// The HTTP basic authentication information for accessing the master. Because the master endpoint is open to the internet, you should create a strong password. #[serde(alias="masterAuth")] pub master_auth: MasterAuth, - /// The API version of the Kubernetes master and kubelets running in this cluster. Leave blank to pick up the latest stable release, or specify a version of the form "x.y.z". The Google Container Engine release notes lists the currently supported versions. If an incorrect version is specified, the server returns an error listing the currently supported versions. + /// The API version of the Kubernetes master and kubelets running in this cluster. Leave blank to pick up the latest stable release, or specify a version of the form "x.y.z". The Google Container Engine release notes lists the currently supported versions. If an incorrect version is specified, the server returns an error listing the currently supported versions. #[serde(alias="clusterApiVersion")] pub cluster_api_version: String, - /// [Output only] The time the cluster was created, in RFC3339 text format. + /// [Output only] The time the cluster was created, in RFC3339 text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: String, /// The name of this cluster. The name must be unique within this project and zone, and can be up to 40 characters with the following restrictions: @@ -421,23 +430,23 @@ pub struct Cluster { /// /// See the masterAuth property of this resource for username and password information. pub endpoint: String, - /// The name of the Google Compute Engine network to which the cluster is connected. + /// The name of the Google Compute Engine network to which the cluster is connected. pub network: String, - /// [Output only] The name of the Google Compute Engine zone in which the cluster resides. + /// [Output only] The name of the Google Compute Engine zone in which the cluster resides. pub zone: String, - /// The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances plus one (to include the master). You must also have available firewall and routes quota. + /// The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances plus one (to include the master). You must also have available firewall and routes quota. #[serde(alias="numNodes")] pub num_nodes: i32, - /// The machine type and image to use for all nodes in this cluster. See the descriptions of the child properties of nodeConfig. + /// The machine type and image to use for all nodes in this cluster. See the descriptions of the child properties of nodeConfig. #[serde(alias="nodeConfig")] pub node_config: NodeConfig, - /// [Output only] Server-defined URL for the resource. + /// [Output only] Server-defined URL for the resource. #[serde(alias="selfLink")] pub self_link: String, - /// [Output only] Additional information about the current status of this cluster, if available. + /// [Output only] Additional information about the current status of this cluster, if available. #[serde(alias="statusMessage")] pub status_message: String, - /// [Output only] The IP addresses of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are always in the 10.0.0.0/16 range. + /// [Output only] The IP addresses of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are always in the 10.0.0.0/16 range. #[serde(alias="servicesIpv4Cidr")] pub services_ipv4_cidr: String, } @@ -477,9 +486,9 @@ impl Part for NodeConfig {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ServiceAccount { - /// The list of scopes to be made available for this service account. + /// The list of scopes to be made available for this service account. pub scopes: Vec, - /// Email address of the service account. + /// Email address of the service account. pub email: String, } @@ -499,25 +508,25 @@ impl Part for ServiceAccount {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Operation { - /// The current status of the operation. + /// The current status of the operation. pub status: String, - /// The server-assigned ID for this operation. If the operation is fulfilled upfront, it may not have a resource name. + /// The server-assigned ID for this operation. If the operation is fulfilled upfront, it may not have a resource name. pub name: String, - /// The name of the Google Compute Engine zone in which the operation is taking place. + /// The name of the Google Compute Engine zone in which the operation is taking place. pub zone: String, - /// If an error has occurred, a textual description of the error. + /// If an error has occurred, a textual description of the error. #[serde(alias="errorMessage")] pub error_message: String, - /// Server-defined URL for the target of the operation. + /// Server-defined URL for the target of the operation. #[serde(alias="targetLink")] pub target_link: String, - /// The operation type. + /// The operation type. #[serde(alias="operationType")] pub operation_type: String, - /// Server-defined URL for the resource. + /// Server-defined URL for the resource. #[serde(alias="selfLink")] pub self_link: String, - /// [Optional] The URL of the cluster resource that this operation is associated with. + /// [Optional] The URL of the cluster resource that this operation is associated with. pub target: String, } @@ -535,7 +544,7 @@ impl ResponseResult for Operation {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ListAggregatedOperationsResponse { - /// A list of operations in the project, across all zones. + /// A list of operations in the project, across all zones. pub operations: Vec, } @@ -553,7 +562,7 @@ impl ResponseResult for ListAggregatedOperationsResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct CreateClusterRequest { - /// A cluster resource. + /// A cluster resource. pub cluster: Option, } @@ -599,13 +608,19 @@ pub struct ProjectMethods<'a, C, NC, A> hub: &'a Container, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ProjectMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ProjectMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets a specific cluster. + /// Gets a specific cluster. + /// + /// # Arguments + /// + /// * `projectId` - The Google Developers Console project ID or project number. + /// * `zoneId` - The name of the Google Compute Engine zone in which the cluster resides. + /// * `clusterId` - The name of the cluster to retrieve. pub fn zones_clusters_get(&self, project_id: &str, zone_id: &str, cluster_id: &str) -> ProjectZoneClusterGetCall<'a, C, NC, A> { ProjectZoneClusterGetCall { hub: self.hub, @@ -620,7 +635,11 @@ impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all operations in a project, across all zones. + /// Lists all operations in a project, across all zones. + /// + /// # Arguments + /// + /// * `projectId` - The Google Developers Console project ID or project number. pub fn operations_list(&self, project_id: &str) -> ProjectOperationListCall<'a, C, NC, A> { ProjectOperationListCall { hub: self.hub, @@ -636,6 +655,12 @@ impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Deletes the cluster, including the Kubernetes master and all worker nodes. /// /// Firewalls and routes that were configured at cluster creation are also deleted. + /// + /// # Arguments + /// + /// * `projectId` - The Google Developers Console project ID or project number. + /// * `zoneId` - The name of the Google Compute Engine zone in which the cluster resides. + /// * `clusterId` - The name of the cluster to delete. pub fn zones_clusters_delete(&self, project_id: &str, zone_id: &str, cluster_id: &str) -> ProjectZoneClusterDeleteCall<'a, C, NC, A> { ProjectZoneClusterDeleteCall { hub: self.hub, @@ -650,7 +675,11 @@ impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all clusters owned by a project across all zones. + /// Lists all clusters owned by a project across all zones. + /// + /// # Arguments + /// + /// * `projectId` - The Google Developers Console project ID or project number. pub fn clusters_list(&self, project_id: &str) -> ProjectClusterListCall<'a, C, NC, A> { ProjectClusterListCall { hub: self.hub, @@ -663,7 +692,13 @@ impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the specified operation. + /// Gets the specified operation. + /// + /// # Arguments + /// + /// * `projectId` - The Google Developers Console project ID or project number. + /// * `zoneId` - The name of the Google Compute Engine zone in which the operation resides. This is always the same zone as the cluster with which the operation is associated. + /// * `operationId` - The server-assigned name of the operation. pub fn zones_operations_get(&self, project_id: &str, zone_id: &str, operation_id: &str) -> ProjectZoneOperationGetCall<'a, C, NC, A> { ProjectZoneOperationGetCall { hub: self.hub, @@ -678,7 +713,12 @@ impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all operations in a project in a specific zone. + /// Lists all operations in a project in a specific zone. + /// + /// # Arguments + /// + /// * `projectId` - The Google Developers Console project ID or project number. + /// * `zoneId` - The name of the Google Compute Engine zone to return operations for. pub fn zones_operations_list(&self, project_id: &str, zone_id: &str) -> ProjectZoneOperationListCall<'a, C, NC, A> { ProjectZoneOperationListCall { hub: self.hub, @@ -692,7 +732,12 @@ impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all clusters owned by a project in the specified zone. + /// Lists all clusters owned by a project in the specified zone. + /// + /// # Arguments + /// + /// * `projectId` - The Google Developers Console project ID or project number. + /// * `zoneId` - The name of the Google Compute Engine zone in which the cluster resides. pub fn zones_clusters_list(&self, project_id: &str, zone_id: &str) -> ProjectZoneClusterListCall<'a, C, NC, A> { ProjectZoneClusterListCall { hub: self.hub, @@ -713,6 +758,12 @@ impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// A firewall is added that allows traffic into port 443 on the master, which enables HTTPS. A firewall and a route is added for each node to allow the containers on that node to communicate with all other instances in the cluster. /// /// Finally, a route named k8s-iproute-10-xx-0-0 is created to track that the cluster's 10.xx.0.0/16 CIDR has been assigned. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `projectId` - The Google Developers Console project ID or project number. + /// * `zoneId` - The name of the Google Compute Engine zone in which the cluster resides. pub fn zones_clusters_create(&self, request: &CreateClusterRequest, project_id: &str, zone_id: &str) -> ProjectZoneClusterCreateCall<'a, C, NC, A> { ProjectZoneClusterCreateCall { hub: self.hub, @@ -737,7 +788,7 @@ impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Gets a specific cluster. /// /// A builder for the *zones.clusters.get* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -799,7 +850,7 @@ impl<'a, C, NC, A> ProjectZoneClusterGetCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "projectId", "zoneId", "clusterId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -852,7 +903,7 @@ impl<'a, C, NC, A> ProjectZoneClusterGetCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -864,7 +915,6 @@ impl<'a, C, NC, A> ProjectZoneClusterGetCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -874,7 +924,7 @@ impl<'a, C, NC, A> ProjectZoneClusterGetCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -885,7 +935,7 @@ impl<'a, C, NC, A> ProjectZoneClusterGetCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -894,13 +944,13 @@ impl<'a, C, NC, A> ProjectZoneClusterGetCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -912,7 +962,7 @@ impl<'a, C, NC, A> ProjectZoneClusterGetCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Google Developers Console project ID or project number. + /// The Google Developers Console project ID or project number. pub fn project_id(mut self, new_value: &str) -> ProjectZoneClusterGetCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -922,7 +972,7 @@ impl<'a, C, NC, A> ProjectZoneClusterGetCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the Google Compute Engine zone in which the cluster resides. + /// The name of the Google Compute Engine zone in which the cluster resides. pub fn zone_id(mut self, new_value: &str) -> ProjectZoneClusterGetCall<'a, C, NC, A> { self._zone_id = new_value.to_string(); self @@ -932,7 +982,7 @@ impl<'a, C, NC, A> ProjectZoneClusterGetCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the cluster to retrieve. + /// The name of the cluster to retrieve. pub fn cluster_id(mut self, new_value: &str) -> ProjectZoneClusterGetCall<'a, C, NC, A> { self._cluster_id = new_value.to_string(); self @@ -993,7 +1043,7 @@ impl<'a, C, NC, A> ProjectZoneClusterGetCall<'a, C, NC, A> where NC: hyper::net: /// Lists all operations in a project, across all zones. /// /// A builder for the *operations.list* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -1051,7 +1101,7 @@ impl<'a, C, NC, A> ProjectOperationListCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "projectId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1104,7 +1154,7 @@ impl<'a, C, NC, A> ProjectOperationListCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1116,7 +1166,6 @@ impl<'a, C, NC, A> ProjectOperationListCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -1126,7 +1175,7 @@ impl<'a, C, NC, A> ProjectOperationListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1137,7 +1186,7 @@ impl<'a, C, NC, A> ProjectOperationListCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1146,13 +1195,13 @@ impl<'a, C, NC, A> ProjectOperationListCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1164,7 +1213,7 @@ impl<'a, C, NC, A> ProjectOperationListCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Google Developers Console project ID or project number. + /// The Google Developers Console project ID or project number. pub fn project_id(mut self, new_value: &str) -> ProjectOperationListCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -1227,7 +1276,7 @@ impl<'a, C, NC, A> ProjectOperationListCall<'a, C, NC, A> where NC: hyper::net:: /// Firewalls and routes that were configured at cluster creation are also deleted. /// /// A builder for the *zones.clusters.delete* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -1289,7 +1338,7 @@ impl<'a, C, NC, A> ProjectZoneClusterDeleteCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "projectId", "zoneId", "clusterId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1342,7 +1391,7 @@ impl<'a, C, NC, A> ProjectZoneClusterDeleteCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1354,7 +1403,6 @@ impl<'a, C, NC, A> ProjectZoneClusterDeleteCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -1364,7 +1412,7 @@ impl<'a, C, NC, A> ProjectZoneClusterDeleteCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1375,7 +1423,7 @@ impl<'a, C, NC, A> ProjectZoneClusterDeleteCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1384,13 +1432,13 @@ impl<'a, C, NC, A> ProjectZoneClusterDeleteCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1402,7 +1450,7 @@ impl<'a, C, NC, A> ProjectZoneClusterDeleteCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Google Developers Console project ID or project number. + /// The Google Developers Console project ID or project number. pub fn project_id(mut self, new_value: &str) -> ProjectZoneClusterDeleteCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -1412,7 +1460,7 @@ impl<'a, C, NC, A> ProjectZoneClusterDeleteCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the Google Compute Engine zone in which the cluster resides. + /// The name of the Google Compute Engine zone in which the cluster resides. pub fn zone_id(mut self, new_value: &str) -> ProjectZoneClusterDeleteCall<'a, C, NC, A> { self._zone_id = new_value.to_string(); self @@ -1422,7 +1470,7 @@ impl<'a, C, NC, A> ProjectZoneClusterDeleteCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the cluster to delete. + /// The name of the cluster to delete. pub fn cluster_id(mut self, new_value: &str) -> ProjectZoneClusterDeleteCall<'a, C, NC, A> { self._cluster_id = new_value.to_string(); self @@ -1483,7 +1531,7 @@ impl<'a, C, NC, A> ProjectZoneClusterDeleteCall<'a, C, NC, A> where NC: hyper::n /// Lists all clusters owned by a project across all zones. /// /// A builder for the *clusters.list* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -1541,7 +1589,7 @@ impl<'a, C, NC, A> ProjectClusterListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "projectId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1594,7 +1642,7 @@ impl<'a, C, NC, A> ProjectClusterListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1606,7 +1654,6 @@ impl<'a, C, NC, A> ProjectClusterListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -1616,7 +1663,7 @@ impl<'a, C, NC, A> ProjectClusterListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1627,7 +1674,7 @@ impl<'a, C, NC, A> ProjectClusterListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1636,13 +1683,13 @@ impl<'a, C, NC, A> ProjectClusterListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1654,7 +1701,7 @@ impl<'a, C, NC, A> ProjectClusterListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Google Developers Console project ID or project number. + /// The Google Developers Console project ID or project number. pub fn project_id(mut self, new_value: &str) -> ProjectClusterListCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -1715,7 +1762,7 @@ impl<'a, C, NC, A> ProjectClusterListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Gets the specified operation. /// /// A builder for the *zones.operations.get* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -1777,7 +1824,7 @@ impl<'a, C, NC, A> ProjectZoneOperationGetCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "projectId", "zoneId", "operationId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1830,7 +1877,7 @@ impl<'a, C, NC, A> ProjectZoneOperationGetCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1842,7 +1889,6 @@ impl<'a, C, NC, A> ProjectZoneOperationGetCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -1852,7 +1898,7 @@ impl<'a, C, NC, A> ProjectZoneOperationGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1863,7 +1909,7 @@ impl<'a, C, NC, A> ProjectZoneOperationGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1872,13 +1918,13 @@ impl<'a, C, NC, A> ProjectZoneOperationGetCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1890,7 +1936,7 @@ impl<'a, C, NC, A> ProjectZoneOperationGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Google Developers Console project ID or project number. + /// The Google Developers Console project ID or project number. pub fn project_id(mut self, new_value: &str) -> ProjectZoneOperationGetCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -1900,7 +1946,7 @@ impl<'a, C, NC, A> ProjectZoneOperationGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the Google Compute Engine zone in which the operation resides. This is always the same zone as the cluster with which the operation is associated. + /// The name of the Google Compute Engine zone in which the operation resides. This is always the same zone as the cluster with which the operation is associated. pub fn zone_id(mut self, new_value: &str) -> ProjectZoneOperationGetCall<'a, C, NC, A> { self._zone_id = new_value.to_string(); self @@ -1910,7 +1956,7 @@ impl<'a, C, NC, A> ProjectZoneOperationGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The server-assigned name of the operation. + /// The server-assigned name of the operation. pub fn operation_id(mut self, new_value: &str) -> ProjectZoneOperationGetCall<'a, C, NC, A> { self._operation_id = new_value.to_string(); self @@ -1971,7 +2017,7 @@ impl<'a, C, NC, A> ProjectZoneOperationGetCall<'a, C, NC, A> where NC: hyper::ne /// Lists all operations in a project in a specific zone. /// /// A builder for the *zones.operations.list* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -2031,7 +2077,7 @@ impl<'a, C, NC, A> ProjectZoneOperationListCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "projectId", "zoneId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2084,7 +2130,7 @@ impl<'a, C, NC, A> ProjectZoneOperationListCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2096,7 +2142,6 @@ impl<'a, C, NC, A> ProjectZoneOperationListCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -2106,7 +2151,7 @@ impl<'a, C, NC, A> ProjectZoneOperationListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2117,7 +2162,7 @@ impl<'a, C, NC, A> ProjectZoneOperationListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2126,13 +2171,13 @@ impl<'a, C, NC, A> ProjectZoneOperationListCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2144,7 +2189,7 @@ impl<'a, C, NC, A> ProjectZoneOperationListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Google Developers Console project ID or project number. + /// The Google Developers Console project ID or project number. pub fn project_id(mut self, new_value: &str) -> ProjectZoneOperationListCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -2154,7 +2199,7 @@ impl<'a, C, NC, A> ProjectZoneOperationListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the Google Compute Engine zone to return operations for. + /// The name of the Google Compute Engine zone to return operations for. pub fn zone_id(mut self, new_value: &str) -> ProjectZoneOperationListCall<'a, C, NC, A> { self._zone_id = new_value.to_string(); self @@ -2215,7 +2260,7 @@ impl<'a, C, NC, A> ProjectZoneOperationListCall<'a, C, NC, A> where NC: hyper::n /// Lists all clusters owned by a project in the specified zone. /// /// A builder for the *zones.clusters.list* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -2275,7 +2320,7 @@ impl<'a, C, NC, A> ProjectZoneClusterListCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "projectId", "zoneId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2328,7 +2373,7 @@ impl<'a, C, NC, A> ProjectZoneClusterListCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2340,7 +2385,6 @@ impl<'a, C, NC, A> ProjectZoneClusterListCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -2350,7 +2394,7 @@ impl<'a, C, NC, A> ProjectZoneClusterListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2361,7 +2405,7 @@ impl<'a, C, NC, A> ProjectZoneClusterListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2370,13 +2414,13 @@ impl<'a, C, NC, A> ProjectZoneClusterListCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2388,7 +2432,7 @@ impl<'a, C, NC, A> ProjectZoneClusterListCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Google Developers Console project ID or project number. + /// The Google Developers Console project ID or project number. pub fn project_id(mut self, new_value: &str) -> ProjectZoneClusterListCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -2398,7 +2442,7 @@ impl<'a, C, NC, A> ProjectZoneClusterListCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the Google Compute Engine zone in which the cluster resides. + /// The name of the Google Compute Engine zone in which the cluster resides. pub fn zone_id(mut self, new_value: &str) -> ProjectZoneClusterListCall<'a, C, NC, A> { self._zone_id = new_value.to_string(); self @@ -2465,7 +2509,7 @@ impl<'a, C, NC, A> ProjectZoneClusterListCall<'a, C, NC, A> where NC: hyper::net /// Finally, a route named k8s-iproute-10-xx-0-0 is created to track that the cluster's 10.xx.0.0/16 CIDR has been assigned. /// /// A builder for the *zones.clusters.create* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -2532,7 +2576,7 @@ impl<'a, C, NC, A> ProjectZoneClusterCreateCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "projectId", "zoneId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2589,7 +2633,7 @@ impl<'a, C, NC, A> ProjectZoneClusterCreateCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2605,7 +2649,6 @@ impl<'a, C, NC, A> ProjectZoneClusterCreateCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -2615,7 +2658,7 @@ impl<'a, C, NC, A> ProjectZoneClusterCreateCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2626,7 +2669,7 @@ impl<'a, C, NC, A> ProjectZoneClusterCreateCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2635,13 +2678,13 @@ impl<'a, C, NC, A> ProjectZoneClusterCreateCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2662,7 +2705,7 @@ impl<'a, C, NC, A> ProjectZoneClusterCreateCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The Google Developers Console project ID or project number. + /// The Google Developers Console project ID or project number. pub fn project_id(mut self, new_value: &str) -> ProjectZoneClusterCreateCall<'a, C, NC, A> { self._project_id = new_value.to_string(); self @@ -2672,7 +2715,7 @@ impl<'a, C, NC, A> ProjectZoneClusterCreateCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the Google Compute Engine zone in which the cluster resides. + /// The name of the Google Compute Engine zone in which the cluster resides. pub fn zone_id(mut self, new_value: &str) -> ProjectZoneClusterCreateCall<'a, C, NC, A> { self._zone_id = new_value.to_string(); self diff --git a/gen/content2/Cargo.toml b/gen/content2/Cargo.toml index 57ccaa5387..f8c73a50e2 100644 --- a/gen/content2/Cargo.toml +++ b/gen/content2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-content2" -version = "0.1.1+20150311" +version = "0.1.2+20150317" authors = ["Sebastian Thiel "] description = "A complete library to interact with Shopping Content (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/content2" @@ -16,7 +16,7 @@ keywords = ["content", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/content2/README.md b/gen/content2/README.md index 291176db58..3ab165fb93 100644 --- a/gen/content2/README.md +++ b/gen/content2/README.md @@ -1,11 +1,11 @@ The `google-content2` library allows access to all features of the *Google Shopping Content* service. -This documentation was generated from *Shopping Content* crate version *0.1.1+20150311*, where *20150311* is the exact revision of the *content:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *Shopping Content* crate version *0.1.2+20150317*, where *20150317* is the exact revision of the *content:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *Shopping Content* *v2* API can be found at the [official documentation site](https://developers.google.com/shopping-content/v2/). @@ -41,6 +41,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-content2/struct.ShoppingContent.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-content2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-content2/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-content2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -50,6 +52,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-content2/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -92,7 +96,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-content2" as content2; use content2::Account; -use content2::Result; +use content2::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use content2::ShoppingContent; @@ -121,15 +125,17 @@ let result = hub.accounts().patch(&req, "merchantId", "accountId") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -142,7 +148,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-content2/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-content2/trait.ResponseResult.html), it will return that by default. @@ -165,8 +171,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-content2/trait ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-content2/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-content2/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-content2/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-content2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-content2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/content2/src/cmn.rs b/gen/content2/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/content2/src/cmn.rs +++ b/gen/content2/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/content2/src/lib.rs b/gen/content2/src/lib.rs index 004d583b6a..231c7eb05c 100644 --- a/gen/content2/src/lib.rs +++ b/gen/content2/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *Shopping Content* crate version *0.1.1+20150311*, where *20150311* is the exact revision of the *content:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *Shopping Content* crate version *0.1.2+20150317*, where *20150317* is the exact revision of the *content:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *Shopping Content* *v2* API can be found at the //! [official documentation site](https://developers.google.com/shopping-content/v2/). @@ -41,6 +41,8 @@ //! //! * **[Hub](struct.ShoppingContent.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -50,6 +52,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -92,7 +96,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-content2" as content2; //! use content2::Account; -//! use content2::Result; +//! use content2::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -122,15 +126,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -143,7 +149,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -166,8 +172,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -216,7 +223,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -263,7 +270,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-content2" as content2; /// use content2::Account; -/// use content2::Result; +/// use content2::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -293,15 +300,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -322,7 +331,7 @@ impl<'a, C, NC, A> ShoppingContent ShoppingContent { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -356,7 +365,7 @@ impl<'a, C, NC, A> ShoppingContent } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -376,31 +385,50 @@ impl<'a, C, NC, A> ShoppingContent /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Errors { - /// The message of the first error in errors. + /// The message of the first error in errors. pub message: String, - /// The HTTP status of the first error in errors. + /// The HTTP status of the first error in errors. pub code: u32, - /// A list of errors. - pub errors: Vec, + /// A list of errors. + pub errors: Vec, } impl Part for Errors {} +/// There is no detailed description. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ProductAspect { + /// Whether the aspect is required, excluded or should be validated. + pub intention: String, + /// The name of the aspect. + #[serde(alias="aspectName")] + pub aspect_name: String, + /// The name of the destination. Leave out to apply to all destinations. + #[serde(alias="destinationName")] + pub destination_name: String, +} + +impl Part for ProductAspect {} + + /// A batch entry encoding a single non-batch products response. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ProductsCustomBatchResponseEntry { - /// The ID of the request entry this entry responds to. + /// The ID of the request entry this entry responds to. #[serde(alias="batchId")] pub batch_id: u32, - /// Identifies what kind of resource this is. Value: the fixed string "content#productsCustomBatchResponseEntry". + /// Identifies what kind of resource this is. Value: the fixed string "content#productsCustomBatchResponseEntry". pub kind: String, - /// A list of errors defined if and only if the request failed. + /// A list of errors defined if and only if the request failed. pub errors: Errors, - /// The inserted product. Only defined if the method is insert and if the request was successful. + /// The inserted product. Only defined if the method is insert and if the request was successful. pub product: Product, } @@ -418,9 +446,9 @@ impl Part for ProductsCustomBatchResponseEntry {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccounttaxCustomBatchResponse { - /// Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponse". pub kind: String, - /// The result of the execution of the batch requests. + /// The result of the execution of the batch requests. pub entries: Vec, } @@ -438,9 +466,9 @@ impl ResponseResult for AccounttaxCustomBatchResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountshippingCustomBatchResponse { - /// Identifies what kind of resource this is. Value: the fixed string "content#accountshippingCustomBatchResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#accountshippingCustomBatchResponse". pub kind: String, - /// The result of the execution of the batch requests. + /// The result of the execution of the batch requests. pub entries: Vec, } @@ -458,9 +486,9 @@ impl ResponseResult for AccountshippingCustomBatchResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InventoryCustomBatchResponse { - /// Identifies what kind of resource this is. Value: the fixed string "content#inventoryCustomBatchResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#inventoryCustomBatchResponse". pub kind: String, - /// The result of the execution of the batch requests. + /// The result of the execution of the batch requests. pub entries: Vec, } @@ -473,9 +501,9 @@ impl ResponseResult for InventoryCustomBatchResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountUser { - /// Whether user is an admin. + /// Whether user is an admin. pub admin: bool, - /// User's email address. + /// User's email address. #[serde(alias="emailAddress")] pub email_address: String, } @@ -489,9 +517,9 @@ impl Part for AccountUser {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountShippingRateTableCell { - /// The rate applicable if the cell conditions are matched. + /// The rate applicable if the cell conditions are matched. pub rate: Price, - /// Conditions for which the cell is valid. All cells in a table must use the same dimension or pair of dimensions among price, weight, shipping label or delivery location. If no condition is specified, the cell acts as a catch-all and matches all the elements that are not matched by other cells in this dimension. + /// Conditions for which the cell is valid. All cells in a table must use the same dimension or pair of dimensions among price, weight, shipping label or delivery location. If no condition is specified, the cell acts as a catch-all and matches all the elements that are not matched by other cells in this dimension. pub condition: AccountShippingCondition, } @@ -509,7 +537,7 @@ impl Part for AccountShippingRateTableCell {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct ProductstatusesCustomBatchRequest { - /// The request entries to be processed in the batch. + /// The request entries to be processed in the batch. pub entries: Option>, } @@ -527,9 +555,9 @@ impl RequestValue for ProductstatusesCustomBatchRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DatafeedsCustomBatchResponse { - /// Identifies what kind of resource this is. Value: the fixed string "content#datafeedsCustomBatchResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#datafeedsCustomBatchResponse". pub kind: String, - /// The result of the execution of the batch requests. + /// The result of the execution of the batch requests. pub entries: Vec, } @@ -542,15 +570,15 @@ impl ResponseResult for DatafeedsCustomBatchResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountShippingLocationGroup { - /// A postal code range representing a city or a set of cities. + /// A postal code range representing a city or a set of cities. #[serde(alias="postalCodeRanges")] pub postal_code_ranges: Vec, - /// The country in which this location group is, represented as ISO 3166-1 Alpha-2 code. + /// The country in which this location group is, represented as ISO 3166-1 Alpha-2 code. pub country: String, - /// A location ID (also called criteria ID) representing administrative areas, smaller country subdivisions (counties), or cities. + /// A location ID (also called criteria ID) representing administrative areas, smaller country subdivisions (counties), or cities. #[serde(alias="locationIds")] pub location_ids: Vec, - /// The name of the location group. + /// The name of the location group. pub name: String, /// A postal code representing a city or a set of cities. /// - A single postal code (e.g., 12345) @@ -573,7 +601,7 @@ impl Part for AccountShippingLocationGroup {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InventorySetResponse { - /// Identifies what kind of resource this is. Value: the fixed string "content#inventorySetResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#inventorySetResponse". pub kind: String, } @@ -591,28 +619,28 @@ impl ResponseResult for InventorySetResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ProductStatus { - /// Date on which the item expires in Google Shopping, in ISO 8601 format. + /// Date on which the item expires in Google Shopping, in ISO 8601 format. #[serde(alias="googleExpirationDate")] pub google_expiration_date: String, - /// The intended destinations for the product. + /// The intended destinations for the product. #[serde(alias="destinationStatuses")] pub destination_statuses: Vec, - /// The title of the product. + /// The title of the product. pub title: String, - /// Identifies what kind of resource this is. Value: the fixed string "content#productStatus". + /// Identifies what kind of resource this is. Value: the fixed string "content#productStatus". pub kind: String, - /// Date on which the item has been last updated, in ISO 8601 format. + /// Date on which the item has been last updated, in ISO 8601 format. #[serde(alias="lastUpdateDate")] pub last_update_date: String, - /// The link to the product. + /// The link to the product. pub link: String, - /// Date on which the item has been created, in ISO 8601 format. + /// Date on which the item has been created, in ISO 8601 format. #[serde(alias="creationDate")] pub creation_date: String, - /// A list of data quality issues associated with the product. + /// A list of data quality issues associated with the product. #[serde(alias="dataQualityIssues")] pub data_quality_issues: Vec, - /// The id of the product for which status is reported. + /// The id of the product for which status is reported. #[serde(alias="productId")] pub product_id: String, } @@ -626,21 +654,21 @@ impl ResponseResult for ProductStatus {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatafeedFetchSchedule { - /// An optional user name for fetch_url. + /// An optional user name for fetch_url. pub username: String, - /// An optional password for fetch_url. + /// An optional password for fetch_url. pub password: String, - /// The day of the week the feed file should be fetched. + /// The day of the week the feed file should be fetched. pub weekday: String, - /// The hour of the day the feed file should be fetched (0-24). + /// The hour of the day the feed file should be fetched (0-24). pub hour: u32, - /// Time zone used for schedule. UTC by default. E.g., "America/Los_Angeles". + /// Time zone used for schedule. UTC by default. E.g., "America/Los_Angeles". #[serde(alias="timeZone")] pub time_zone: String, - /// The URL where the feed file can be fetched. Google Merchant Center will support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP protocols, so the value will need to be a valid link using one of those four protocols. + /// The URL where the feed file can be fetched. Google Merchant Center will support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP protocols, so the value will need to be a valid link using one of those four protocols. #[serde(alias="fetchUrl")] pub fetch_url: String, - /// The day of the month the feed file should be fetched (1-31). + /// The day of the month the feed file should be fetched (1-31). #[serde(alias="dayOfMonth")] pub day_of_month: u32, } @@ -659,23 +687,23 @@ impl Part for DatafeedFetchSchedule {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DatafeedStatus { - /// The number of items in the feed that were valid. + /// The number of items in the feed that were valid. #[serde(alias="itemsValid")] pub items_valid: String, - /// Identifies what kind of resource this is. Value: the fixed string "content#datafeedStatus". + /// Identifies what kind of resource this is. Value: the fixed string "content#datafeedStatus". pub kind: String, - /// The list of errors occurring in the feed. + /// The list of errors occurring in the feed. pub errors: Vec, - /// The processing status of the feed. + /// The processing status of the feed. #[serde(alias="processingStatus")] pub processing_status: String, - /// The number of items in the feed that were processed. + /// The number of items in the feed that were processed. #[serde(alias="itemsTotal")] pub items_total: String, - /// The ID of the feed for which the status is reported. + /// The ID of the feed for which the status is reported. #[serde(alias="datafeedId")] pub datafeed_id: String, - /// The list of errors occurring in the feed. + /// The list of errors occurring in the feed. pub warnings: Vec, } @@ -688,16 +716,16 @@ impl ResponseResult for DatafeedStatus {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct DatafeedstatusesCustomBatchRequestEntry { - /// An entry ID, unique within the batch request. + /// An entry ID, unique within the batch request. #[serde(alias="batchId")] pub batch_id: u32, - /// The ID of the data feed to get or delete. + /// The ID of the data feed to get or delete. #[serde(alias="datafeedId")] pub datafeed_id: String, - /// The ID of the managing account. + /// The ID of the managing account. #[serde(alias="merchantId")] pub merchant_id: String, - /// no description provided + /// no description provided pub method: String, } @@ -710,15 +738,15 @@ impl Part for DatafeedstatusesCustomBatchRequestEntry {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccounttaxCustomBatchResponseEntry { - /// The ID of the request entry this entry responds to. + /// The ID of the request entry this entry responds to. #[serde(alias="batchId")] pub batch_id: u32, - /// The retrieved or updated account tax settings. + /// The retrieved or updated account tax settings. #[serde(alias="accountTax")] pub account_tax: AccountTax, - /// A list of errors defined if and only if the request failed. + /// A list of errors defined if and only if the request failed. pub errors: Errors, - /// Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponseEntry". + /// Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponseEntry". pub kind: String, } @@ -736,7 +764,7 @@ impl Part for AccounttaxCustomBatchResponseEntry {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct AccountstatusesCustomBatchRequest { - /// The request entries to be processed in the batch. + /// The request entries to be processed in the batch. pub entries: Option>, } @@ -753,12 +781,12 @@ impl RequestValue for AccountstatusesCustomBatchRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountShippingShippingServiceCostRule { - /// Final calculation method to be used only in leaf nodes. + /// Final calculation method to be used only in leaf nodes. #[serde(alias="calculationMethod")] pub calculation_method: AccountShippingShippingServiceCalculationMethod, - /// Condition for this rule to be applicable. If no condition is specified, the rule acts as a catch-all. + /// Condition for this rule to be applicable. If no condition is specified, the rule acts as a catch-all. pub condition: AccountShippingCondition, - /// Subsequent rules to be applied, only for inner nodes. The last child must not specify a condition and acts as a catch-all. + /// Subsequent rules to be applied, only for inner nodes. The last child must not specify a condition and acts as a catch-all. pub children: Vec, } @@ -783,28 +811,28 @@ impl Part for AccountShippingShippingServiceCostRule {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Account { - /// URL for individual seller reviews, i.e., reviews for each child account. + /// URL for individual seller reviews, i.e., reviews for each child account. #[serde(alias="reviewsUrl")] pub reviews_url: Option, - /// Identifies what kind of resource this is. Value: the fixed string "content#account". + /// Identifies what kind of resource this is. Value: the fixed string "content#account". pub kind: Option, - /// Display name for the account. + /// Display name for the account. pub name: Option, - /// Indicates whether the merchant sells adult content. + /// Indicates whether the merchant sells adult content. #[serde(alias="adultContent")] pub adult_content: Option, - /// List of linked AdWords accounts. + /// List of linked AdWords accounts. #[serde(alias="adwordsLinks")] pub adwords_links: Option>, - /// The merchant's website. + /// The merchant's website. #[serde(alias="websiteUrl")] pub website_url: Option, - /// Client-specific, locally-unique, internal ID for the child account. + /// Client-specific, locally-unique, internal ID for the child account. #[serde(alias="sellerId")] pub seller_id: Option, - /// Merchant Center account ID. + /// Merchant Center account ID. pub id: Option, - /// Users with access to the account. Every account (except for subaccounts) must have at least one admin user. + /// Users with access to the account. Every account (except for subaccounts) must have at least one admin user. pub users: Option>, } @@ -813,19 +841,16 @@ impl Resource for Account {} impl ResponseResult for Account {} -/// Account identifier corresponding to the authenticated user. -/// - For an individual account: only the merchant ID is defined -/// - For an aggregator: only the aggregator ID is defined -/// - For a subaccount of an MCA: both the merchant ID and the aggregator ID are defined. +/// There is no detailed description. /// /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountIdentifier { - /// The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount). + /// The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount). #[serde(alias="aggregatorId")] pub aggregator_id: String, - /// The merchant account ID, set for individual accounts and subaccounts. + /// The merchant account ID, set for individual accounts and subaccounts. #[serde(alias="merchantId")] pub merchant_id: String, } @@ -839,12 +864,12 @@ impl Part for AccountIdentifier {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct InventoryCustomBatchResponseEntry { - /// The ID of the request entry this entry responds to. + /// The ID of the request entry this entry responds to. #[serde(alias="batchId")] pub batch_id: u32, - /// Identifies what kind of resource this is. Value: the fixed string "content#inventoryCustomBatchResponseEntry". + /// Identifies what kind of resource this is. Value: the fixed string "content#inventoryCustomBatchResponseEntry". pub kind: String, - /// A list of errors defined if and only if the request failed. + /// A list of errors defined if and only if the request failed. pub errors: Errors, } @@ -857,9 +882,9 @@ impl Part for InventoryCustomBatchResponseEntry {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductCustomGroup { - /// The sub-attributes. + /// The sub-attributes. pub attributes: Vec, - /// The name of the group. Underscores will be replaced by spaces upon insertion. + /// The name of the group. Underscores will be replaced by spaces upon insertion. pub name: String, } @@ -878,7 +903,7 @@ pub struct ProductShippingDimension { /// - "cm" /// - "in" pub unit: String, - /// The dimension of the product used to calculate the shipping cost of the item. + /// The dimension of the product used to calculate the shipping cost of the item. pub value: f64, } @@ -891,12 +916,12 @@ impl Part for ProductShippingDimension {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountstatusesCustomBatchResponseEntry { - /// The ID of the request entry this entry responds to. + /// The ID of the request entry this entry responds to. #[serde(alias="batchId")] pub batch_id: u32, - /// A list of errors defined if and only if the request failed. + /// A list of errors defined if and only if the request failed. pub errors: Errors, - /// The requested account status. Defined if and only if the request was successful. + /// The requested account status. Defined if and only if the request was successful. #[serde(alias="accountStatus")] pub account_status: AccountStatus, } @@ -910,16 +935,16 @@ impl Part for AccountstatusesCustomBatchResponseEntry {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct AccountstatusesCustomBatchRequestEntry { - /// An entry ID, unique within the batch request. + /// An entry ID, unique within the batch request. #[serde(alias="batchId")] pub batch_id: u32, - /// The ID of the (sub-)account whose status to get. + /// The ID of the (sub-)account whose status to get. #[serde(alias="accountId")] pub account_id: String, - /// The ID of the managing account. + /// The ID of the managing account. #[serde(alias="merchantId")] pub merchant_id: String, - /// The method (get). + /// The method (get). pub method: String, } @@ -937,12 +962,12 @@ impl Part for AccountstatusesCustomBatchRequestEntry {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccounttaxListResponse { - /// The token for the retrieval of the next page of account tax settings. + /// The token for the retrieval of the next page of account tax settings. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "content#accounttaxListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#accounttaxListResponse". pub kind: String, - /// no description provided + /// no description provided pub resources: Vec, } @@ -960,7 +985,7 @@ impl ResponseResult for AccounttaxListResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct DatafeedstatusesCustomBatchRequest { - /// The request entries to be processed in the batch. + /// The request entries to be processed in the batch. pub entries: Option>, } @@ -972,16 +997,16 @@ impl RequestValue for DatafeedstatusesCustomBatchRequest {} /// This type is not used in any activity, and only used as *part* of another schema. /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] -pub struct Error { - /// The error code. +pub struct ErrorType { + /// The error code. pub reason: String, - /// A description of the error. + /// A description of the error. pub message: String, - /// The domain of the error. + /// The domain of the error. pub domain: String, } -impl Part for Error {} +impl Part for ErrorType {} /// A batch entry encoding a single non-batch datafeeds response. @@ -990,12 +1015,12 @@ impl Part for Error {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DatafeedsCustomBatchResponseEntry { - /// The ID of the request entry this entry responds to. + /// The ID of the request entry this entry responds to. #[serde(alias="batchId")] pub batch_id: u32, - /// A list of errors defined if and only if the request failed. + /// A list of errors defined if and only if the request failed. pub errors: Errors, - /// The requested data feed. Defined if and only if the request was successful. + /// The requested data feed. Defined if and only if the request was successful. pub datafeed: Datafeed, } @@ -1008,18 +1033,18 @@ impl Part for DatafeedsCustomBatchResponseEntry {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct AccountshippingCustomBatchRequestEntry { - /// An entry ID, unique within the batch request. + /// An entry ID, unique within the batch request. #[serde(alias="batchId")] pub batch_id: u32, - /// The ID of the account for which to get/update account shipping settings. + /// The ID of the account for which to get/update account shipping settings. #[serde(alias="accountId")] pub account_id: String, - /// The account shipping settings to update. Only defined if the method is update. + /// The account shipping settings to update. Only defined if the method is update. #[serde(alias="accountShipping")] pub account_shipping: AccountShipping, - /// no description provided + /// no description provided pub method: String, - /// The ID of the managing account. + /// The ID of the managing account. #[serde(alias="merchantId")] pub merchant_id: String, } @@ -1038,12 +1063,12 @@ impl Part for AccountshippingCustomBatchRequestEntry {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DatafeedsListResponse { - /// The token for the retrieval of the next page of datafeeds. + /// The token for the retrieval of the next page of datafeeds. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "content#datafeedsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#datafeedsListResponse". pub kind: String, - /// no description provided + /// no description provided pub resources: Vec, } @@ -1056,21 +1081,21 @@ impl ResponseResult for DatafeedsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductShipping { - /// The numeric id of a location that the shipping rate applies to as defined in the AdWords API. + /// The numeric id of a location that the shipping rate applies to as defined in the AdWords API. #[serde(alias="locationId")] pub location_id: String, - /// A free-form description of the service class or delivery speed. + /// A free-form description of the service class or delivery speed. pub service: String, - /// The postal code range that the shipping rate applies to, represented by a postal code, a postal code prefix followed by a * wildcard, a range between two postal codes or two postal code prefixes of equal length. + /// The postal code range that the shipping rate applies to, represented by a postal code, a postal code prefix followed by a * wildcard, a range between two postal codes or two postal code prefixes of equal length. #[serde(alias="postalCode")] pub postal_code: String, - /// The two-letter ISO 3166 country code for the country to which an item will ship. + /// The two-letter ISO 3166 country code for the country to which an item will ship. pub country: String, - /// Fixed shipping price, represented as a number. + /// Fixed shipping price, represented as a number. pub price: Price, - /// The geographic region to which a shipping rate applies (e.g. zip code). + /// The geographic region to which a shipping rate applies (e.g. zip code). pub region: String, - /// The location where the shipping is applicable, represented by a location group name. + /// The location where the shipping is applicable, represented by a location group name. #[serde(alias="locationGroupName")] pub location_group_name: String, } @@ -1091,11 +1116,11 @@ impl Part for ProductShipping {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountTax { - /// Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all. + /// Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all. pub rules: Option>, - /// Identifies what kind of resource this is. Value: the fixed string "content#accountTax". + /// Identifies what kind of resource this is. Value: the fixed string "content#accountTax". pub kind: Option, - /// The ID of the account to which these account tax settings belong. + /// The ID of the account to which these account tax settings belong. #[serde(alias="accountId")] pub account_id: Option, } @@ -1110,17 +1135,17 @@ impl ResponseResult for AccountTax {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct ProductsCustomBatchRequestEntry { - /// An entry ID, unique within the batch request. + /// An entry ID, unique within the batch request. #[serde(alias="batchId")] pub batch_id: u32, - /// The product to insert. Only required if the method is insert. + /// The product to insert. Only required if the method is insert. pub product: Product, - /// The ID of the managing account. + /// The ID of the managing account. #[serde(alias="merchantId")] pub merchant_id: String, - /// no description provided + /// no description provided pub method: String, - /// The ID of the product to get or delete. Only defined if the method is get or delete. + /// The ID of the product to get or delete. Only defined if the method is get or delete. #[serde(alias="productId")] pub product_id: String, } @@ -1134,14 +1159,14 @@ impl Part for ProductsCustomBatchRequestEntry {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountsCustomBatchResponseEntry { - /// The ID of the request entry this entry responds to. + /// The ID of the request entry this entry responds to. #[serde(alias="batchId")] pub batch_id: u32, - /// The retrieved, created, or updated account. Not defined if the method was delete. + /// The retrieved, created, or updated account. Not defined if the method was delete. pub account: Account, - /// A list of errors defined if and only if the request failed. + /// A list of errors defined if and only if the request failed. pub errors: Errors, - /// Identifies what kind of resource this is. Value: the fixed string "content#accountsCustomBatchResponseEntry". + /// Identifies what kind of resource this is. Value: the fixed string "content#accountsCustomBatchResponseEntry". pub kind: String, } @@ -1159,7 +1184,7 @@ impl Part for AccountsCustomBatchResponseEntry {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct AccountsCustomBatchRequest { - /// The request entries to be processed in the batch. + /// The request entries to be processed in the batch. pub entries: Option>, } @@ -1177,9 +1202,9 @@ impl RequestValue for AccountsCustomBatchRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ProductstatusesCustomBatchResponse { - /// Identifies what kind of resource this is. Value: the fixed string "content#productstatusesCustomBatchResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#productstatusesCustomBatchResponse". pub kind: String, - /// The result of the execution of the batch requests. + /// The result of the execution of the batch requests. pub entries: Vec, } @@ -1192,23 +1217,23 @@ impl ResponseResult for ProductstatusesCustomBatchResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountShippingCarrierRate { - /// Shipping origin represented as a postal code. + /// Shipping origin represented as a postal code. #[serde(alias="shippingOrigin")] pub shipping_origin: String, - /// The carrier that is responsible for the shipping, such as "UPS", "FedEx", or "USPS". + /// The carrier that is responsible for the shipping, such as "UPS", "FedEx", or "USPS". pub carrier: String, - /// The name of the carrier rate. + /// The name of the carrier rate. pub name: String, - /// Sale country for which this carrier rate is valid, represented as an ISO 3166-1 Alpha-2 code. + /// Sale country for which this carrier rate is valid, represented as an ISO 3166-1 Alpha-2 code. #[serde(alias="saleCountry")] pub sale_country: i64, - /// The carrier service, such as "Ground" or "2Day". + /// The carrier service, such as "Ground" or "2Day". #[serde(alias="carrierService")] pub carrier_service: String, - /// Additive shipping rate modifier. + /// Additive shipping rate modifier. #[serde(alias="modifierFlatRate")] pub modifier_flat_rate: Price, - /// Multiplicative shipping rate modifier in percent. Represented as a floating point number without the percentage character. + /// Multiplicative shipping rate modifier in percent. Represented as a floating point number without the percentage character. #[serde(alias="modifierPercent")] pub modifier_percent: String, } @@ -1233,33 +1258,33 @@ impl Part for AccountShippingCarrierRate {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Datafeed { - /// Identifies what kind of resource this is. Value: the fixed string "content#datafeed". + /// Identifies what kind of resource this is. Value: the fixed string "content#datafeed". pub kind: Option, - /// The type of data feed. + /// The type of data feed. #[serde(alias="contentType")] pub content_type: Option, - /// A descriptive name of the data feed. + /// A descriptive name of the data feed. pub name: Option, - /// The two-letter ISO 639-1 language of the items in the feed. + /// The two-letter ISO 639-1 language of the items in the feed. #[serde(alias="contentLanguage")] pub content_language: Option, - /// Format of the feed file. + /// Format of the feed file. pub format: Option, - /// Fetch schedule for the feed file. + /// Fetch schedule for the feed file. #[serde(alias="fetchSchedule")] pub fetch_schedule: Option, - /// The two-letter ISO 3166 country where the items in the feed will be included in the search index. + /// The two-letter ISO 3166 country where the items in the feed will be included in the search index. #[serde(alias="targetCountry")] pub target_country: Option, - /// The filename of the feed. All feeds must have a unique file name. + /// The filename of the feed. All feeds must have a unique file name. #[serde(alias="fileName")] pub file_name: Option, - /// The ID of the data feed. + /// The ID of the data feed. pub id: Option, - /// The list of intended destinations (corresponds to checked check boxes in Merchant Center). + /// The list of intended destinations (corresponds to checked check boxes in Merchant Center). #[serde(alias="intendedDestinations")] pub intended_destinations: Option>, - /// The two-letter ISO 639-1 language in which the attributes are defined in the data feed. + /// The two-letter ISO 639-1 language in which the attributes are defined in the data feed. #[serde(alias="attributeLanguage")] pub attribute_language: Option, } @@ -1275,18 +1300,18 @@ impl ResponseResult for Datafeed {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountShippingShippingServiceCalculationMethod { - /// Percentage of the price, represented as a floating point number without the percentage character. + /// Percentage of the price, represented as a floating point number without the percentage character. #[serde(alias="percentageRate")] pub percentage_rate: String, - /// Name of the carrier rate to use for the calculation. + /// Name of the carrier rate to use for the calculation. #[serde(alias="carrierRate")] pub carrier_rate: String, - /// Name of the rate table to use for the calculation. + /// Name of the rate table to use for the calculation. #[serde(alias="rateTable")] pub rate_table: String, - /// Delivery is excluded. Valid only within cost rules tree. + /// Delivery is excluded. Valid only within cost rules tree. pub excluded: bool, - /// Fixed price shipping, represented as a floating point number associated with a currency. + /// Fixed price shipping, represented as a floating point number associated with a currency. #[serde(alias="flatRate")] pub flat_rate: Price, } @@ -1300,19 +1325,19 @@ impl Part for AccountShippingShippingServiceCalculationMethod {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductTax { - /// The percentage of tax rate that applies to the item price. + /// The percentage of tax rate that applies to the item price. pub rate: f64, - /// The numeric id of a location that the tax rate applies to as defined in the AdWords API. + /// The numeric id of a location that the tax rate applies to as defined in the AdWords API. #[serde(alias="locationId")] pub location_id: String, - /// The postal code range that the tax rate applies to, represented by a ZIP code, a ZIP code prefix using * wildcard, a range between two ZIP codes or two ZIP code prefixes of equal length. Examples: 94114, 94*, 94002-95460, 94*-95*. + /// The postal code range that the tax rate applies to, represented by a ZIP code, a ZIP code prefix using * wildcard, a range between two ZIP codes or two ZIP code prefixes of equal length. Examples: 94114, 94*, 94002-95460, 94*-95*. #[serde(alias="postalCode")] pub postal_code: String, - /// The country within which the item is taxed, specified with a two-letter ISO 3166 country code. + /// The country within which the item is taxed, specified with a two-letter ISO 3166 country code. pub country: String, - /// The geographic region to which the tax rate applies. + /// The geographic region to which the tax rate applies. pub region: String, - /// Set to true if tax is charged on shipping. + /// Set to true if tax is charged on shipping. #[serde(alias="taxShip")] pub tax_ship: bool, } @@ -1331,9 +1356,9 @@ impl Part for ProductTax {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DatafeedstatusesCustomBatchResponse { - /// Identifies what kind of resource this is. Value: the fixed string "content#datafeedstatusesCustomBatchResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#datafeedstatusesCustomBatchResponse". pub kind: String, - /// The result of the execution of the batch requests. + /// The result of the execution of the batch requests. pub entries: Vec, } @@ -1346,18 +1371,18 @@ impl ResponseResult for DatafeedstatusesCustomBatchResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct AccountsCustomBatchRequestEntry { - /// An entry ID, unique within the batch request. + /// An entry ID, unique within the batch request. #[serde(alias="batchId")] pub batch_id: u32, - /// The account to create or update. Only defined if the method is insert or update. + /// The account to create or update. Only defined if the method is insert or update. pub account: Account, - /// The ID of the account to get or delete. Only defined if the method is get or delete. + /// The ID of the account to get or delete. Only defined if the method is get or delete. #[serde(alias="accountId")] pub account_id: String, - /// The ID of the managing account. + /// The ID of the managing account. #[serde(alias="merchantId")] pub merchant_id: String, - /// no description provided + /// no description provided pub method: String, } @@ -1375,9 +1400,12 @@ impl Part for AccountsCustomBatchRequestEntry {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountsAuthInfoResponse { - /// Identifies what kind of resource this is. Value: the fixed string "content#accountsAuthInfoResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#accountsAuthInfoResponse". pub kind: String, - /// The account identifiers corresponding to the authenticated user. + /// The account identifiers corresponding to the authenticated user. + /// - For an individual account: only the merchant ID is defined + /// - For an aggregator: only the aggregator ID is defined + /// - For a subaccount of an MCA: both the merchant ID and the aggregator ID are defined. #[serde(alias="accountIdentifiers")] pub account_identifiers: Vec, } @@ -1396,7 +1424,7 @@ impl ResponseResult for AccountsAuthInfoResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct ProductsCustomBatchRequest { - /// The request entries to be processed in the batch. + /// The request entries to be processed in the batch. pub entries: Option>, } @@ -1414,12 +1442,12 @@ impl RequestValue for ProductsCustomBatchRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DatafeedstatusesListResponse { - /// The token for the retrieval of the next page of datafeed statuses. + /// The token for the retrieval of the next page of datafeed statuses. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "content#datafeedstatusesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#datafeedstatusesListResponse". pub kind: String, - /// no description provided + /// no description provided pub resources: Vec, } @@ -1432,9 +1460,9 @@ impl ResponseResult for DatafeedstatusesListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductUnitPricingMeasure { - /// The unit of the measure. + /// The unit of the measure. pub unit: String, - /// The measure of an item. + /// The measure of an item. pub value: f64, } @@ -1452,9 +1480,9 @@ impl Part for ProductUnitPricingMeasure {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountstatusesCustomBatchResponse { - /// Identifies what kind of resource this is. Value: the fixed string "content#accountstatusesCustomBatchResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#accountstatusesCustomBatchResponse". pub kind: String, - /// The result of the execution of the batch requests. + /// The result of the execution of the batch requests. pub entries: Vec, } @@ -1472,12 +1500,12 @@ impl ResponseResult for AccountstatusesCustomBatchResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountStatus { - /// Identifies what kind of resource this is. Value: the fixed string "content#accountStatus". + /// Identifies what kind of resource this is. Value: the fixed string "content#accountStatus". pub kind: String, - /// A list of data quality issues. + /// A list of data quality issues. #[serde(alias="dataQualityIssues")] pub data_quality_issues: Vec, - /// The ID of the account for which the status is reported. + /// The ID of the account for which the status is reported. #[serde(alias="accountId")] pub account_id: String, } @@ -1491,9 +1519,9 @@ impl ResponseResult for AccountStatus {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductInstallment { - /// The amount the buyer has to pay per month. + /// The amount the buyer has to pay per month. pub amount: Price, - /// The number of installments the buyer has to pay. + /// The number of installments the buyer has to pay. pub months: String, } @@ -1506,12 +1534,12 @@ impl Part for ProductInstallment {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DatafeedstatusesCustomBatchResponseEntry { - /// The ID of the request entry this entry responds to. + /// The ID of the request entry this entry responds to. #[serde(alias="batchId")] pub batch_id: u32, - /// A list of errors defined if and only if the request failed. + /// A list of errors defined if and only if the request failed. pub errors: Errors, - /// The requested data feed status. Defined if and only if the request was successful. + /// The requested data feed status. Defined if and only if the request was successful. #[serde(alias="datafeedStatus")] pub datafeed_status: DatafeedStatus, } @@ -1525,19 +1553,19 @@ impl Part for DatafeedstatusesCustomBatchResponseEntry {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct Inventory { - /// Identifies what kind of resource this is. Value: the fixed string "content#inventory". + /// Identifies what kind of resource this is. Value: the fixed string "content#inventory". pub kind: String, - /// The sale price of the product. Mandatory if sale_price_effective_date is defined. + /// The sale price of the product. Mandatory if sale_price_effective_date is defined. #[serde(alias="salePrice")] pub sale_price: Price, - /// A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates might be specified as 'null' if undecided. + /// A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates might be specified as 'null' if undecided. #[serde(alias="salePriceEffectiveDate")] pub sale_price_effective_date: String, - /// The price of the product. + /// The price of the product. pub price: Price, - /// The availability of the product. + /// The availability of the product. pub availability: String, - /// The quantity of the product. Must be equal to or greater than zero. Supported only for local products. + /// The quantity of the product. Must be equal to or greater than zero. Supported only for local products. pub quantity: u32, } @@ -1550,12 +1578,12 @@ impl Part for Inventory {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountShippingRateTable { - /// One-dimensional table cells define one condition along the same dimension. Bi-dimensional table cells use two dimensions with respectively M and N distinct values and must contain exactly M * N cells with distinct conditions (for each possible value pairs). + /// One-dimensional table cells define one condition along the same dimension. Bi-dimensional table cells use two dimensions with respectively M and N distinct values and must contain exactly M * N cells with distinct conditions (for each possible value pairs). pub content: Vec, - /// Sale country for which this table is valid, represented as an ISO 3166-1 Alpha-2 code. + /// Sale country for which this table is valid, represented as an ISO 3166-1 Alpha-2 code. #[serde(alias="saleCountry")] pub sale_country: i64, - /// The name of the rate table. + /// The name of the rate table. pub name: String, } @@ -1568,12 +1596,12 @@ impl Part for AccountShippingRateTable {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ProductStatusDestinationStatus { - /// The destination's approval status. + /// The destination's approval status. #[serde(alias="approvalStatus")] pub approval_status: String, - /// The name of the destination + /// The name of the destination pub destination: String, - /// Whether the destination is required, excluded, selected by default or should be validated. + /// Whether the destination is required, excluded, selected by default or should be validated. pub intention: String, } @@ -1591,7 +1619,7 @@ impl Part for ProductStatusDestinationStatus {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct AccounttaxCustomBatchRequest { - /// The request entries to be processed in the batch. + /// The request entries to be processed in the batch. pub entries: Option>, } @@ -1604,18 +1632,18 @@ impl RequestValue for AccounttaxCustomBatchRequest {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct InventoryCustomBatchRequestEntry { - /// An entry ID, unique within the batch request. + /// An entry ID, unique within the batch request. #[serde(alias="batchId")] pub batch_id: u32, - /// The code of the store for which to update price and availability. Use online to update price and availability of an online product. + /// The code of the store for which to update price and availability. Use online to update price and availability of an online product. #[serde(alias="storeCode")] pub store_code: String, - /// The ID of the managing account. + /// The ID of the managing account. #[serde(alias="merchantId")] pub merchant_id: String, - /// Price and availability of the product. + /// Price and availability of the product. pub inventory: Inventory, - /// The ID of the product for which to update price and availability. + /// The ID of the product for which to update price and availability. #[serde(alias="productId")] pub product_id: String, } @@ -1634,9 +1662,9 @@ impl Part for InventoryCustomBatchRequestEntry {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ProductsCustomBatchResponse { - /// Identifies what kind of resource this is. Value: the fixed string "content#productsCustomBatchResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#productsCustomBatchResponse". pub kind: String, - /// The result of the execution of the batch requests. + /// The result of the execution of the batch requests. pub entries: Vec, } @@ -1654,12 +1682,12 @@ impl ResponseResult for ProductsCustomBatchResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountshippingListResponse { - /// The token for the retrieval of the next page of account shipping settings. + /// The token for the retrieval of the next page of account shipping settings. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "content#accountshippingListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#accountshippingListResponse". pub kind: String, - /// no description provided + /// no description provided pub resources: Vec, } @@ -1672,18 +1700,18 @@ impl ResponseResult for AccountshippingListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountStatusExampleItem { - /// Unique item ID as specified in the uploaded product data. + /// Unique item ID as specified in the uploaded product data. #[serde(alias="itemId")] pub item_id: String, - /// The item value that was submitted. + /// The item value that was submitted. #[serde(alias="submittedValue")] pub submitted_value: String, - /// Landing page of the item. + /// Landing page of the item. pub link: String, - /// The actual value on the landing page. + /// The actual value on the landing page. #[serde(alias="valueOnLandingPage")] pub value_on_landing_page: String, - /// Title of the item. + /// Title of the item. pub title: String, } @@ -1696,15 +1724,15 @@ impl Part for AccountStatusExampleItem {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct ProductstatusesCustomBatchRequestEntry { - /// An entry ID, unique within the batch request. + /// An entry ID, unique within the batch request. #[serde(alias="batchId")] pub batch_id: u32, - /// The ID of the managing account. + /// The ID of the managing account. #[serde(alias="merchantId")] pub merchant_id: String, - /// no description provided + /// no description provided pub method: String, - /// The ID of the product whose status to get. + /// The ID of the product whose status to get. #[serde(alias="productId")] pub product_id: String, } @@ -1718,9 +1746,9 @@ impl Part for ProductstatusesCustomBatchRequestEntry {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Price { - /// The currency of the price. + /// The currency of the price. pub currency: String, - /// The price represented as a number. + /// The price represented as a number. pub value: String, } @@ -1733,13 +1761,13 @@ impl Part for Price {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DatafeedStatusError { - /// The number of occurrences of the error in the feed. + /// The number of occurrences of the error in the feed. pub count: String, - /// The error message, e.g., "Invalid price". + /// The error message, e.g., "Invalid price". pub message: String, - /// The code of the error, e.g., "validation/invalid_value". + /// The code of the error, e.g., "validation/invalid_value". pub code: String, - /// A list of example occurrences of the error, grouped by product. + /// A list of example occurrences of the error, grouped by product. pub examples: Vec, } @@ -1752,12 +1780,12 @@ impl Part for DatafeedStatusError {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DatafeedStatusExample { - /// The ID of the example item. + /// The ID of the example item. #[serde(alias="itemId")] pub item_id: String, - /// The problematic value. + /// The problematic value. pub value: String, - /// Line number in the data feed where the example is found. + /// Line number in the data feed where the example is found. #[serde(alias="lineNumber")] pub line_number: String, } @@ -1771,9 +1799,9 @@ impl Part for DatafeedStatusExample {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductShippingWeight { - /// The unit of value. + /// The unit of value. pub unit: String, - /// The weight of the product used to calculate the shipping cost of the item. + /// The weight of the product used to calculate the shipping cost of the item. pub value: f64, } @@ -1786,19 +1814,19 @@ impl Part for ProductShippingWeight {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct AccounttaxCustomBatchRequestEntry { - /// An entry ID, unique within the batch request. + /// An entry ID, unique within the batch request. #[serde(alias="batchId")] pub batch_id: u32, - /// The account tax settings to update. Only defined if the method is update. + /// The account tax settings to update. Only defined if the method is update. #[serde(alias="accountTax")] pub account_tax: AccountTax, - /// The ID of the account for which to get/update account tax settings. + /// The ID of the account for which to get/update account tax settings. #[serde(alias="accountId")] pub account_id: String, - /// The ID of the managing account. + /// The ID of the managing account. #[serde(alias="merchantId")] pub merchant_id: String, - /// no description provided + /// no description provided pub method: String, } @@ -1818,20 +1846,20 @@ impl Part for AccounttaxCustomBatchRequestEntry {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountShipping { - /// Carrier-based shipping calculations. + /// Carrier-based shipping calculations. #[serde(alias="carrierRates")] pub carrier_rates: Option>, - /// Identifies what kind of resource this is. Value: the fixed string "content#accountShipping". + /// Identifies what kind of resource this is. Value: the fixed string "content#accountShipping". pub kind: Option, - /// Location groups for shipping. + /// Location groups for shipping. #[serde(alias="locationGroups")] pub location_groups: Option>, - /// Shipping services describing shipping fees calculation. + /// Shipping services describing shipping fees calculation. pub services: Option>, - /// The ID of the account to which these account shipping settings belong. + /// The ID of the account to which these account shipping settings belong. #[serde(alias="accountId")] pub account_id: Option, - /// Rate tables definitions. + /// Rate tables definitions. #[serde(alias="rateTables")] pub rate_tables: Option>, } @@ -1846,9 +1874,9 @@ impl ResponseResult for AccountShipping {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductUnitPricingBaseMeasure { - /// The unit of the denominator. + /// The unit of the denominator. pub unit: String, - /// The denominator of the unit price. + /// The denominator of the unit price. pub value: String, } @@ -1861,18 +1889,18 @@ impl Part for ProductUnitPricingBaseMeasure {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountTaxTaxRule { - /// Country code in which tax is applicable. + /// Country code in which tax is applicable. pub country: String, - /// Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative. + /// Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative. #[serde(alias="ratePercent")] pub rate_percent: String, - /// If true, shipping charges are also taxed. + /// If true, shipping charges are also taxed. #[serde(alias="shippingTaxed")] pub shipping_taxed: bool, - /// State (or province) is which the tax is applicable, described by its location id (also called criteria id). + /// State (or province) is which the tax is applicable, described by its location id (also called criteria id). #[serde(alias="locationId")] pub location_id: String, - /// Whether the tax rate is taken from a global tax table or specified explicitly. + /// Whether the tax rate is taken from a global tax table or specified explicitly. #[serde(alias="useGlobalRate")] pub use_global_rate: bool, } @@ -1886,14 +1914,14 @@ impl Part for AccountTaxTaxRule {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductCustomAttribute { - /// Free-form unit of the attribute. Unit can only be used for values of type INT or FLOAT. + /// Free-form unit of the attribute. Unit can only be used for values of type INT or FLOAT. pub unit: String, - /// The type of the attribute. + /// The type of the attribute. #[serde(alias="type")] pub type_: String, - /// The name of the attribute. Underscores will be replaced by spaces upon insertion. + /// The name of the attribute. Underscores will be replaced by spaces upon insertion. pub name: String, - /// The value of the attribute. + /// The value of the attribute. pub value: String, } @@ -1911,12 +1939,12 @@ impl Part for ProductCustomAttribute {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountstatusesListResponse { - /// The token for the retrieval of the next page of account statuses. + /// The token for the retrieval of the next page of account statuses. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "content#accountstatusesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#accountstatusesListResponse". pub kind: String, - /// no description provided + /// no description provided pub resources: Vec, } @@ -1929,25 +1957,25 @@ impl ResponseResult for AccountstatusesListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountShippingCondition { - /// Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). + /// Maximum shipping weight. Forms an interval between the maximum of smaller weight (exclusive) and this weight (inclusive). #[serde(alias="weightMax")] pub weight_max: Weight, - /// Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. + /// Delivery location in terms of a location ID. Can be used to represent administrative areas, smaller country subdivisions, or cities. #[serde(alias="deliveryLocationId")] pub delivery_location_id: String, - /// Shipping label of the product. The products with the label are matched. + /// Shipping label of the product. The products with the label are matched. #[serde(alias="shippingLabel")] pub shipping_label: String, - /// Delivery location in terms of a location group name. A location group with this name must be specified among location groups. + /// Delivery location in terms of a location group name. A location group with this name must be specified among location groups. #[serde(alias="deliveryLocationGroup")] pub delivery_location_group: String, - /// Delivery location in terms of a postal code. + /// Delivery location in terms of a postal code. #[serde(alias="deliveryPostalCode")] pub delivery_postal_code: String, - /// Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). + /// Maximum shipping price. Forms an interval between the maximum of smaller prices (exclusive) and this price (inclusive). #[serde(alias="priceMax")] pub price_max: Price, - /// Delivery location in terms of a postal code range. + /// Delivery location in terms of a postal code range. #[serde(alias="deliveryPostalCodeRange")] pub delivery_postal_code_range: AccountShippingPostalCodeRange, } @@ -1966,7 +1994,7 @@ impl Part for AccountShippingCondition {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct InventoryCustomBatchRequest { - /// The request entries to be processed in the batch. + /// The request entries to be processed in the batch. pub entries: Option>, } @@ -1988,184 +2016,186 @@ impl RequestValue for InventoryCustomBatchRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Product { - /// Set to true if the item is targeted towards adults. + /// Set to true if the item is targeted towards adults. pub adult: Option, - /// Color of the item. + /// Color of the item. pub color: Option, - /// Similar to adwords_grouping, but only works on CPC. + /// Similar to adwords_grouping, but only works on CPC. #[serde(alias="adwordsLabels")] pub adwords_labels: Option>, - /// Shared identifier for all variants of the same product. + /// Shared identifier for all variants of the same product. #[serde(alias="itemGroupId")] pub item_group_id: Option, - /// Date on which the item should expire, as specified upon insertion, in ISO 8601 format. The actual expiration date in Google Shopping is exposed in productstatuses as googleExpirationDate and might be earlier if expirationDate is too far in the future. + /// Date on which the item should expire, as specified upon insertion, in ISO 8601 format. The actual expiration date in Google Shopping is exposed in productstatuses as googleExpirationDate and might be earlier if expirationDate is too far in the future. #[serde(alias="expirationDate")] pub expiration_date: Option, - /// Availability status of the item. + /// Availability status of the item. pub availability: Option, - /// Used to group items in an arbitrary way. Only for CPA%, discouraged otherwise. + /// Used to group items in an arbitrary way. Only for CPA%, discouraged otherwise. #[serde(alias="adwordsGrouping")] pub adwords_grouping: Option, - /// Specifies the intended destinations for the product. + /// Specifies the intended destinations for the product. pub destinations: Option>, - /// The two-letter ISO 3166 country code for the item. + /// The two-letter ISO 3166 country code for the item. #[serde(alias="targetCountry")] pub target_country: Option, - /// Custom label 4 for custom grouping of items in a Shopping campaign. + /// Custom label 4 for custom grouping of items in a Shopping campaign. #[serde(alias="customLabel4")] pub custom_label4: Option, - /// Title of the item. + /// Title of the item. pub title: Option, - /// Whether an item is available for purchase only online. + /// Whether an item is available for purchase only online. #[serde(alias="onlineOnly")] pub online_only: Option, - /// Link to a mobile-optimized version of the landing page. + /// Link to a mobile-optimized version of the landing page. #[serde(alias="mobileLink")] pub mobile_link: Option, - /// Height of the item for shipping. + /// Specifies the intended aspects for the product. + pub aspects: Option>, + /// Height of the item for shipping. #[serde(alias="shippingHeight")] pub shipping_height: Option, - /// The two-letter ISO 639-1 language code for the item. + /// The two-letter ISO 639-1 language code for the item. #[serde(alias="contentLanguage")] pub content_language: Option, - /// Manufacturer Part Number (MPN) of the item. + /// Manufacturer Part Number (MPN) of the item. pub mpn: Option, - /// Date range during which the item is on sale (see product feed specifications). + /// Date range during which the item is on sale (see product feed specifications). #[serde(alias="salePriceEffectiveDate")] pub sale_price_effective_date: Option, - /// Brand of the item. + /// Brand of the item. pub brand: Option, - /// The material of which the item is made. + /// The material of which the item is made. pub material: Option, - /// URL directly linking to your item's page on your website. + /// URL directly linking to your item's page on your website. pub link: Option, - /// Allows advertisers to override the item URL when the product is shown within the context of Product Ads. + /// Allows advertisers to override the item URL when the product is shown within the context of Product Ads. #[serde(alias="adwordsRedirect")] pub adwords_redirect: Option, - /// The energy efficiency class as defined in EU directive 2010/30/EU. + /// The energy efficiency class as defined in EU directive 2010/30/EU. #[serde(alias="energyEfficiencyClass")] pub energy_efficiency_class: Option, - /// System in which the size is specified. Recommended for apparel items. + /// System in which the size is specified. Recommended for apparel items. #[serde(alias="sizeSystem")] pub size_system: Option, - /// The cut of the item. Recommended for apparel items. + /// The cut of the item. Recommended for apparel items. #[serde(alias="sizeType")] pub size_type: Option, - /// Custom label 3 for custom grouping of items in a Shopping campaign. + /// Custom label 3 for custom grouping of items in a Shopping campaign. #[serde(alias="customLabel3")] pub custom_label3: Option, - /// Custom label 2 for custom grouping of items in a Shopping campaign. + /// Custom label 2 for custom grouping of items in a Shopping campaign. #[serde(alias="customLabel2")] pub custom_label2: Option, - /// Condition or state of the item. + /// Condition or state of the item. pub condition: Option, - /// Custom label 0 for custom grouping of items in a Shopping campaign. + /// Custom label 0 for custom grouping of items in a Shopping campaign. #[serde(alias="customLabel0")] pub custom_label0: Option, - /// Identifies what kind of resource this is. Value: the fixed string "content#product". + /// Identifies what kind of resource this is. Value: the fixed string "content#product". pub kind: Option, - /// Number and amount of installments to pay for an item. Brazil only. + /// Number and amount of installments to pay for an item. Brazil only. pub installment: Option, - /// Size of the item. + /// Size of the item. pub sizes: Option>, - /// Target gender of the item. + /// Target gender of the item. pub gender: Option, - /// Tax information. + /// Tax information. pub taxes: Option>, - /// False when the item does not have unique product identifiers appropriate to its category, such as GTIN, MPN, and brand. Required according to the Unique Product Identifier Rules for all target countries except for Canada. + /// False when the item does not have unique product identifiers appropriate to its category, such as GTIN, MPN, and brand. Required according to the Unique Product Identifier Rules for all target countries except for Canada. #[serde(alias="identifierExists")] pub identifier_exists: Option, - /// Advertised sale price of the item. + /// Advertised sale price of the item. #[serde(alias="salePrice")] pub sale_price: Option, - /// Your category of the item (formatted as in product feeds specification). + /// Your category of the item (formatted as in product feeds specification). #[serde(alias="productType")] pub product_type: Option, - /// Advertiser-specified recommendations. + /// Advertiser-specified recommendations. #[serde(alias="displayAdsSimilarIds")] pub display_ads_similar_ids: Option>, - /// Custom label 1 for custom grouping of items in a Shopping campaign. + /// Custom label 1 for custom grouping of items in a Shopping campaign. #[serde(alias="customLabel1")] pub custom_label1: Option, - /// Target age group of the item. + /// Target age group of the item. #[serde(alias="ageGroup")] pub age_group: Option, - /// Additional URLs of images of the item. + /// Additional URLs of images of the item. #[serde(alias="additionalImageLinks")] pub additional_image_links: Option>, - /// An identifier of the item. + /// An identifier of the item. #[serde(alias="offerId")] pub offer_id: Option, - /// Global Trade Item Number (GTIN) of the item. + /// Global Trade Item Number (GTIN) of the item. pub gtin: Option, - /// The shipping label of the product, used to group product in account-level shipping rules. + /// The shipping label of the product, used to group product in account-level shipping rules. #[serde(alias="shippingLabel")] pub shipping_label: Option, - /// Google's category of the item (see Google product taxonomy). + /// Google's category of the item (see Google product taxonomy). #[serde(alias="googleProductCategory")] pub google_product_category: Option, - /// The number of identical products in a merchant-defined multipack. + /// The number of identical products in a merchant-defined multipack. pub multipack: Option, - /// An identifier for an item for dynamic remarketing campaigns. + /// An identifier for an item for dynamic remarketing campaigns. #[serde(alias="displayAdsId")] pub display_ads_id: Option, - /// Offer margin for dynamic remarketing campaigns. + /// Offer margin for dynamic remarketing campaigns. #[serde(alias="displayAdsValue")] pub display_ads_value: Option, - /// The REST id of the product. + /// The REST id of the product. pub id: Option, - /// Width of the item for shipping. + /// Width of the item for shipping. #[serde(alias="shippingWidth")] pub shipping_width: Option, - /// The item's pattern (e.g. polka dots). + /// The item's pattern (e.g. polka dots). pub pattern: Option, - /// The measure and dimension of an item. + /// The measure and dimension of an item. #[serde(alias="unitPricingMeasure")] pub unit_pricing_measure: Option, - /// A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the feed specification in its generic form (e.g., { "name": "size type", "type": "text", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API. + /// A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the feed specification in its generic form (e.g., { "name": "size type", "type": "text", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API. #[serde(alias="customAttributes")] pub custom_attributes: Option>, - /// The day a pre-ordered product becomes available for delivery, in ISO 8601 format. + /// The day a pre-ordered product becomes available for delivery, in ISO 8601 format. #[serde(alias="availabilityDate")] pub availability_date: Option, - /// Whether the item is a merchant-defined bundle. A bundle is a custom grouping of different products sold by a merchant for a single price. + /// Whether the item is a merchant-defined bundle. A bundle is a custom grouping of different products sold by a merchant for a single price. #[serde(alias="isBundle")] pub is_bundle: Option, - /// The item's channel (online or local). + /// The item's channel (online or local). pub channel: Option, - /// Description of the item. + /// Description of the item. pub description: Option, - /// Read-only warnings. - pub warnings: Option>, - /// Price of the item. + /// Read-only warnings. + pub warnings: Option>, + /// Price of the item. pub price: Option, - /// Length of the item for shipping. + /// Length of the item for shipping. #[serde(alias="shippingLength")] pub shipping_length: Option, - /// URL directly to your item's landing page for dynamic remarketing campaigns. + /// URL directly to your item's landing page for dynamic remarketing campaigns. #[serde(alias="displayAdsLink")] pub display_ads_link: Option, - /// The read-only list of intended destinations which passed validation. + /// The read-only list of intended destinations which passed validation. #[serde(alias="validatedDestinations")] pub validated_destinations: Option>, - /// A list of custom (merchant-provided) custom attribute groups. + /// A list of custom (merchant-provided) custom attribute groups. #[serde(alias="customGroups")] pub custom_groups: Option>, - /// Loyalty points that users receive after purchasing the item. Japan only. + /// Loyalty points that users receive after purchasing the item. Japan only. #[serde(alias="loyaltyPoints")] pub loyalty_points: Option, - /// The preference of the denominator of the unit price. + /// The preference of the denominator of the unit price. #[serde(alias="unitPricingBaseMeasure")] pub unit_pricing_base_measure: Option, - /// Shipping rules. + /// Shipping rules. pub shipping: Option>, - /// Weight of the item for shipping. + /// Weight of the item for shipping. #[serde(alias="shippingWeight")] pub shipping_weight: Option, - /// URL of an image of the item. + /// URL of an image of the item. #[serde(alias="imageLink")] pub image_link: Option, - /// Title of an item for dynamic remarketing campaigns. + /// Title of an item for dynamic remarketing campaigns. #[serde(alias="displayAdsTitle")] pub display_ads_title: Option, } @@ -2181,23 +2211,23 @@ impl ResponseResult for Product {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ProductStatusDataQualityIssue { - /// The value the attribute had at time of evaluation. + /// The value the attribute had at time of evaluation. #[serde(alias="valueProvided")] pub value_provided: String, - /// The severity of the data quality issue. + /// The severity of the data quality issue. pub severity: String, - /// The time stamp of the data quality issue. + /// The time stamp of the data quality issue. pub timestamp: String, - /// A more detailed error string. + /// A more detailed error string. pub detail: String, - /// The attribute name that is relevant for the issue. + /// The attribute name that is relevant for the issue. pub location: String, - /// The value of that attribute that was found on the landing page + /// The value of that attribute that was found on the landing page #[serde(alias="valueOnLandingPage")] pub value_on_landing_page: String, - /// The id of the data quality issue. + /// The id of the data quality issue. pub id: String, - /// The fetch status for landing_page_errors. + /// The fetch status for landing_page_errors. #[serde(alias="fetchStatus")] pub fetch_status: String, } @@ -2216,12 +2246,12 @@ impl Part for ProductStatusDataQualityIssue {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ProductsListResponse { - /// The token for the retrieval of the next page of products. + /// The token for the retrieval of the next page of products. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "content#productsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#productsListResponse". pub kind: String, - /// no description provided + /// no description provided pub resources: Vec, } @@ -2234,18 +2264,18 @@ impl ResponseResult for ProductsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountShippingShippingService { - /// Whether the shipping service is available. + /// Whether the shipping service is available. pub active: bool, - /// Decision tree for "complicated" shipping cost calculation. + /// Decision tree for "complicated" shipping cost calculation. #[serde(alias="costRuleTree")] pub cost_rule_tree: AccountShippingShippingServiceCostRule, - /// Sale country for which this service can be used, represented as an ISO 3166-1 Alpha-2 code. + /// Sale country for which this service can be used, represented as an ISO 3166-1 Alpha-2 code. #[serde(alias="saleCountry")] pub sale_country: i64, - /// Calculation method for the "simple" case that needs no rules. + /// Calculation method for the "simple" case that needs no rules. #[serde(alias="calculationMethod")] pub calculation_method: AccountShippingShippingServiceCalculationMethod, - /// The name of this shipping service. + /// The name of this shipping service. pub name: String, } @@ -2258,14 +2288,14 @@ impl Part for AccountShippingShippingService {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountshippingCustomBatchResponseEntry { - /// The ID of the request entry this entry responds to. + /// The ID of the request entry this entry responds to. #[serde(alias="batchId")] pub batch_id: u32, - /// Identifies what kind of resource this is. Value: the fixed string "content#accountshippingCustomBatchResponseEntry". + /// Identifies what kind of resource this is. Value: the fixed string "content#accountshippingCustomBatchResponseEntry". pub kind: String, - /// A list of errors defined if and only if the request failed. + /// A list of errors defined if and only if the request failed. pub errors: Errors, - /// The retrieved or updated account shipping settings. + /// The retrieved or updated account shipping settings. #[serde(alias="accountShipping")] pub account_shipping: AccountShipping, } @@ -2284,16 +2314,16 @@ impl Part for AccountshippingCustomBatchResponseEntry {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct InventorySetRequest { - /// A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates might be specified as 'null' if undecided. + /// A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates might be specified as 'null' if undecided. #[serde(alias="salePriceEffectiveDate")] pub sale_price_effective_date: Option, - /// The price of the product. + /// The price of the product. pub price: Option, - /// The quantity of the product. Must be equal to or greater than zero. Supported only for local products. + /// The quantity of the product. Must be equal to or greater than zero. Supported only for local products. pub quantity: Option, - /// The availability of the product. + /// The availability of the product. pub availability: Option, - /// The sale price of the product. Mandatory if sale_price_effective_date is defined. + /// The sale price of the product. Mandatory if sale_price_effective_date is defined. #[serde(alias="salePrice")] pub sale_price: Option, } @@ -2307,9 +2337,9 @@ impl RequestValue for InventorySetRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProductDestination { - /// Whether the destination is required, excluded or should be validated. + /// Whether the destination is required, excluded or should be validated. pub intention: String, - /// The name of the destination. + /// The name of the destination. #[serde(alias="destinationName")] pub destination_name: String, } @@ -2328,9 +2358,9 @@ impl Part for ProductDestination {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountsCustomBatchResponse { - /// Identifies what kind of resource this is. Value: the fixed string "content#accountsCustomBatchResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#accountsCustomBatchResponse". pub kind: String, - /// The result of the execution of the batch requests. + /// The result of the execution of the batch requests. pub entries: Vec, } @@ -2343,18 +2373,18 @@ impl ResponseResult for AccountsCustomBatchResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct DatafeedsCustomBatchRequestEntry { - /// An entry ID, unique within the batch request. + /// An entry ID, unique within the batch request. #[serde(alias="batchId")] pub batch_id: u32, - /// The ID of the data feed to get or delete. + /// The ID of the data feed to get or delete. #[serde(alias="datafeedId")] pub datafeed_id: String, - /// The data feed to insert. + /// The data feed to insert. pub datafeed: Datafeed, - /// The ID of the managing account. + /// The ID of the managing account. #[serde(alias="merchantId")] pub merchant_id: String, - /// no description provided + /// no description provided pub method: String, } @@ -2372,12 +2402,12 @@ impl Part for DatafeedsCustomBatchRequestEntry {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ProductstatusesListResponse { - /// The token for the retrieval of the next page of products statuses. + /// The token for the retrieval of the next page of products statuses. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "content#productstatusesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#productstatusesListResponse". pub kind: String, - /// no description provided + /// no description provided pub resources: Vec, } @@ -2390,9 +2420,9 @@ impl ResponseResult for ProductstatusesListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Weight { - /// The weight unit. + /// The weight unit. pub unit: String, - /// The weight represented as a number. + /// The weight represented as a number. pub value: String, } @@ -2405,26 +2435,26 @@ impl Part for Weight {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountStatusDataQualityIssue { - /// Actual value displayed on the landing page. + /// Actual value displayed on the landing page. #[serde(alias="displayedValue")] pub displayed_value: String, - /// Severity of the problem. + /// Severity of the problem. pub severity: String, - /// Last time the account was checked for this issue. + /// Last time the account was checked for this issue. #[serde(alias="lastChecked")] pub last_checked: String, - /// Country for which this issue is reported. + /// Country for which this issue is reported. pub country: String, - /// Example items featuring the issue. + /// Example items featuring the issue. #[serde(alias="exampleItems")] pub example_items: Vec, - /// Submitted value that causes the issue. + /// Submitted value that causes the issue. #[serde(alias="submittedValue")] pub submitted_value: String, - /// Number of items in the account found to have the said issue. + /// Number of items in the account found to have the said issue. #[serde(alias="numItems")] pub num_items: u32, - /// Issue identifier. + /// Issue identifier. pub id: String, } @@ -2442,12 +2472,12 @@ impl Part for AccountStatusDataQualityIssue {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountsListResponse { - /// The token for the retrieval of the next page of accounts. + /// The token for the retrieval of the next page of accounts. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "content#accountsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "content#accountsListResponse". pub kind: String, - /// no description provided + /// no description provided pub resources: Vec, } @@ -2460,14 +2490,14 @@ impl ResponseResult for AccountsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ProductstatusesCustomBatchResponseEntry { - /// The ID of the request entry this entry responds to. + /// The ID of the request entry this entry responds to. #[serde(alias="batchId")] pub batch_id: u32, - /// Identifies what kind of resource this is. Value: the fixed string "content#productstatusesCustomBatchResponseEntry". + /// Identifies what kind of resource this is. Value: the fixed string "content#productstatusesCustomBatchResponseEntry". pub kind: String, - /// A list of errors, if the request failed. + /// A list of errors, if the request failed. pub errors: Errors, - /// The requested product status. Only defined if the request was successful. + /// The requested product status. Only defined if the request was successful. #[serde(alias="productStatus")] pub product_status: ProductStatus, } @@ -2486,7 +2516,7 @@ impl Part for ProductstatusesCustomBatchResponseEntry {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct AccountshippingCustomBatchRequest { - /// The request entries to be processed in the batch. + /// The request entries to be processed in the batch. pub entries: Option>, } @@ -2499,11 +2529,11 @@ impl RequestValue for AccountshippingCustomBatchRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LoyaltyPoints { - /// The ratio of a point when converted to currency. Google assumes currency based on Merchant Center settings. If ratio is left out, it defaults to 1.0. + /// The ratio of a point when converted to currency. Google assumes currency based on Merchant Center settings. If ratio is left out, it defaults to 1.0. pub ratio: f64, - /// Name of loyalty points program. It is recommended to limit the name to 12 full-width characters or 24 Roman characters. + /// Name of loyalty points program. It is recommended to limit the name to 12 full-width characters or 24 Roman characters. pub name: String, - /// The retailer's loyalty points in absolute value. + /// The retailer's loyalty points in absolute value. #[serde(alias="pointsValue")] pub points_value: String, } @@ -2522,7 +2552,7 @@ impl Part for LoyaltyPoints {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct DatafeedsCustomBatchRequest { - /// The request entries to be processed in the batch. + /// The request entries to be processed in the batch. pub entries: Option>, } @@ -2535,13 +2565,13 @@ impl RequestValue for DatafeedsCustomBatchRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DatafeedFormat { - /// Character encoding scheme of the data feed. If not specified, the encoding will be auto-detected. + /// Character encoding scheme of the data feed. If not specified, the encoding will be auto-detected. #[serde(alias="fileEncoding")] pub file_encoding: String, - /// Specifies how double quotes are interpreted. If not specified, the mode will be auto-detected. Ignored for non-DSV data feeds. + /// Specifies how double quotes are interpreted. If not specified, the mode will be auto-detected. Ignored for non-DSV data feeds. #[serde(alias="quotingMode")] pub quoting_mode: String, - /// Delimiter for the separation of values in a delimiter-separated values feed. If not specified, the delimiter will be auto-detected. Ignored for non-DSV data feeds. + /// Delimiter for the separation of values in a delimiter-separated values feed. If not specified, the delimiter will be auto-detected. Ignored for non-DSV data feeds. #[serde(alias="columnDelimiter")] pub column_delimiter: String, } @@ -2555,9 +2585,9 @@ impl Part for DatafeedFormat {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountAdwordsLink { - /// Status of the link between this Merchant Center account and the AdWords account. + /// Status of the link between this Merchant Center account and the AdWords account. pub status: String, - /// Customer ID of the AdWords account. + /// Customer ID of the AdWords account. #[serde(alias="adwordsId")] pub adwords_id: String, } @@ -2573,9 +2603,9 @@ impl Part for AccountAdwordsLink {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AccountShippingPostalCodeRange { - /// The first (inclusive) postal code or prefix of the range. + /// The first (inclusive) postal code or prefix of the range. pub start: String, - /// The last (inclusive) postal code or prefix of the range. + /// The last (inclusive) postal code or prefix of the range. pub end: String, } @@ -2621,13 +2651,17 @@ pub struct AccounttaxMethods<'a, C, NC, A> hub: &'a ShoppingContent, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AccounttaxMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AccounttaxMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AccounttaxMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves and updates tax settings of multiple accounts in a single request. + /// Retrieves and updates tax settings of multiple accounts in a single request. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn custombatch(&self, request: &AccounttaxCustomBatchRequest) -> AccounttaxCustombatchCall<'a, C, NC, A> { AccounttaxCustombatchCall { hub: self.hub, @@ -2640,7 +2674,13 @@ impl<'a, C, NC, A> AccounttaxMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the tax settings of the account. This method supports patch semantics. + /// Updates the tax settings of the account. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `merchantId` - The ID of the managing account. + /// * `accountId` - The ID of the account for which to get/update account tax settings. pub fn patch(&self, request: &AccountTax, merchant_id: &str, account_id: &str) -> AccounttaxPatchCall<'a, C, NC, A> { AccounttaxPatchCall { hub: self.hub, @@ -2655,7 +2695,11 @@ impl<'a, C, NC, A> AccounttaxMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists the tax settings of the sub-accounts in your Merchant Center account. + /// Lists the tax settings of the sub-accounts in your Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. pub fn list(&self, merchant_id: &str) -> AccounttaxListCall<'a, C, NC, A> { AccounttaxListCall { hub: self.hub, @@ -2670,7 +2714,13 @@ impl<'a, C, NC, A> AccounttaxMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the tax settings of the account. + /// Updates the tax settings of the account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `merchantId` - The ID of the managing account. + /// * `accountId` - The ID of the account for which to get/update account tax settings. pub fn update(&self, request: &AccountTax, merchant_id: &str, account_id: &str) -> AccounttaxUpdateCall<'a, C, NC, A> { AccounttaxUpdateCall { hub: self.hub, @@ -2685,7 +2735,12 @@ impl<'a, C, NC, A> AccounttaxMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the tax settings of the account. + /// Retrieves the tax settings of the account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. + /// * `accountId` - The ID of the account for which to get/update account tax settings. pub fn get(&self, merchant_id: &str, account_id: &str) -> AccounttaxGetCall<'a, C, NC, A> { AccounttaxGetCall { hub: self.hub, @@ -2734,13 +2789,18 @@ pub struct DatafeedstatuseMethods<'a, C, NC, A> hub: &'a ShoppingContent, } -impl<'a, C, NC, A> ResourceMethodsBuilder for DatafeedstatuseMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for DatafeedstatuseMethods<'a, C, NC, A> {} impl<'a, C, NC, A> DatafeedstatuseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the status of a datafeed from your Merchant Center account. + /// Retrieves the status of a datafeed from your Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - No description provided. + /// * `datafeedId` - No description provided. pub fn get(&self, merchant_id: &str, datafeed_id: &str) -> DatafeedstatuseGetCall<'a, C, NC, A> { DatafeedstatuseGetCall { hub: self.hub, @@ -2754,7 +2814,11 @@ impl<'a, C, NC, A> DatafeedstatuseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists the statuses of the datafeeds in your Merchant Center account. + /// Lists the statuses of the datafeeds in your Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. pub fn list(&self, merchant_id: &str) -> DatafeedstatuseListCall<'a, C, NC, A> { DatafeedstatuseListCall { hub: self.hub, @@ -2767,6 +2831,10 @@ impl<'a, C, NC, A> DatafeedstatuseMethods<'a, C, NC, A> { } } + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn custombatch(&self, request: &DatafeedstatusesCustomBatchRequest) -> DatafeedstatuseCustombatchCall<'a, C, NC, A> { DatafeedstatuseCustombatchCall { hub: self.hub, @@ -2814,10 +2882,14 @@ pub struct DatafeedMethods<'a, C, NC, A> hub: &'a ShoppingContent, } -impl<'a, C, NC, A> ResourceMethodsBuilder for DatafeedMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for DatafeedMethods<'a, C, NC, A> {} impl<'a, C, NC, A> DatafeedMethods<'a, C, NC, A> { + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn custombatch(&self, request: &DatafeedsCustomBatchRequest) -> DatafeedCustombatchCall<'a, C, NC, A> { DatafeedCustombatchCall { hub: self.hub, @@ -2830,7 +2902,12 @@ impl<'a, C, NC, A> DatafeedMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a datafeed from your Merchant Center account. + /// Retrieves a datafeed from your Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - No description provided. + /// * `datafeedId` - No description provided. pub fn get(&self, merchant_id: &str, datafeed_id: &str) -> DatafeedGetCall<'a, C, NC, A> { DatafeedGetCall { hub: self.hub, @@ -2844,7 +2921,13 @@ impl<'a, C, NC, A> DatafeedMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a datafeed of your Merchant Center account. This method supports patch semantics. + /// Updates a datafeed of your Merchant Center account. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `merchantId` - No description provided. + /// * `datafeedId` - No description provided. pub fn patch(&self, request: &Datafeed, merchant_id: &str, datafeed_id: &str) -> DatafeedPatchCall<'a, C, NC, A> { DatafeedPatchCall { hub: self.hub, @@ -2859,7 +2942,12 @@ impl<'a, C, NC, A> DatafeedMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a datafeed from your Merchant Center account. + /// Deletes a datafeed from your Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - No description provided. + /// * `datafeedId` - No description provided. pub fn delete(&self, merchant_id: &str, datafeed_id: &str) -> DatafeedDeleteCall<'a, C, NC, A> { DatafeedDeleteCall { hub: self.hub, @@ -2873,7 +2961,12 @@ impl<'a, C, NC, A> DatafeedMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Registers a datafeed with your Merchant Center account. + /// Registers a datafeed with your Merchant Center account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `merchantId` - No description provided. pub fn insert(&self, request: &Datafeed, merchant_id: &str) -> DatafeedInsertCall<'a, C, NC, A> { DatafeedInsertCall { hub: self.hub, @@ -2887,7 +2980,11 @@ impl<'a, C, NC, A> DatafeedMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists the datafeeds in your Merchant Center account. + /// Lists the datafeeds in your Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. pub fn list(&self, merchant_id: &str) -> DatafeedListCall<'a, C, NC, A> { DatafeedListCall { hub: self.hub, @@ -2902,7 +2999,13 @@ impl<'a, C, NC, A> DatafeedMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a datafeed of your Merchant Center account. + /// Updates a datafeed of your Merchant Center account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `merchantId` - No description provided. + /// * `datafeedId` - No description provided. pub fn update(&self, request: &Datafeed, merchant_id: &str, datafeed_id: &str) -> DatafeedUpdateCall<'a, C, NC, A> { DatafeedUpdateCall { hub: self.hub, @@ -2952,13 +3055,18 @@ pub struct ProductstatuseMethods<'a, C, NC, A> hub: &'a ShoppingContent, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ProductstatuseMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ProductstatuseMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ProductstatuseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the status of a product from your Merchant Center account. + /// Gets the status of a product from your Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. + /// * `productId` - The ID of the product. pub fn get(&self, merchant_id: &str, product_id: &str) -> ProductstatuseGetCall<'a, C, NC, A> { ProductstatuseGetCall { hub: self.hub, @@ -2972,7 +3080,11 @@ impl<'a, C, NC, A> ProductstatuseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists the statuses of the products in your Merchant Center account. + /// Lists the statuses of the products in your Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. pub fn list(&self, merchant_id: &str) -> ProductstatuseListCall<'a, C, NC, A> { ProductstatuseListCall { hub: self.hub, @@ -2987,7 +3099,11 @@ impl<'a, C, NC, A> ProductstatuseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the statuses of multiple products in a single request. + /// Gets the statuses of multiple products in a single request. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn custombatch(&self, request: &ProductstatusesCustomBatchRequest) -> ProductstatuseCustombatchCall<'a, C, NC, A> { ProductstatuseCustombatchCall { hub: self.hub, @@ -3035,13 +3151,13 @@ pub struct AccountMethods<'a, C, NC, A> hub: &'a ShoppingContent, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AccountMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AccountMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns information about the authenticated user. + /// Returns information about the authenticated user. pub fn authinfo(&self) -> AccountAuthinfoCall<'a, C, NC, A> { AccountAuthinfoCall { hub: self.hub, @@ -3053,7 +3169,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a Merchant Center account. This method supports patch semantics. + /// Updates a Merchant Center account. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `merchantId` - The ID of the managing account. + /// * `accountId` - The ID of the account. pub fn patch(&self, request: &Account, merchant_id: &str, account_id: &str) -> AccountPatchCall<'a, C, NC, A> { AccountPatchCall { hub: self.hub, @@ -3068,7 +3190,12 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a Merchant Center account. + /// Retrieves a Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. + /// * `accountId` - The ID of the account. pub fn get(&self, merchant_id: &str, account_id: &str) -> AccountGetCall<'a, C, NC, A> { AccountGetCall { hub: self.hub, @@ -3082,7 +3209,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a Merchant Center account. + /// Updates a Merchant Center account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `merchantId` - The ID of the managing account. + /// * `accountId` - The ID of the account. pub fn update(&self, request: &Account, merchant_id: &str, account_id: &str) -> AccountUpdateCall<'a, C, NC, A> { AccountUpdateCall { hub: self.hub, @@ -3097,7 +3230,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists the sub-accounts in your Merchant Center account. + /// Lists the sub-accounts in your Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. pub fn list(&self, merchant_id: &str) -> AccountListCall<'a, C, NC, A> { AccountListCall { hub: self.hub, @@ -3112,7 +3249,12 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a Merchant Center sub-account. + /// Deletes a Merchant Center sub-account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. + /// * `accountId` - The ID of the account. pub fn delete(&self, merchant_id: &str, account_id: &str) -> AccountDeleteCall<'a, C, NC, A> { AccountDeleteCall { hub: self.hub, @@ -3126,7 +3268,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request. + /// Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn custombatch(&self, request: &AccountsCustomBatchRequest) -> AccountCustombatchCall<'a, C, NC, A> { AccountCustombatchCall { hub: self.hub, @@ -3139,7 +3285,12 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a Merchant Center sub-account. + /// Creates a Merchant Center sub-account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `merchantId` - The ID of the managing account. pub fn insert(&self, request: &Account, merchant_id: &str) -> AccountInsertCall<'a, C, NC, A> { AccountInsertCall { hub: self.hub, @@ -3188,13 +3339,20 @@ pub struct InventoryMethods<'a, C, NC, A> hub: &'a ShoppingContent, } -impl<'a, C, NC, A> ResourceMethodsBuilder for InventoryMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for InventoryMethods<'a, C, NC, A> {} impl<'a, C, NC, A> InventoryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates price and availability of a product in your Merchant Center account. + /// Updates price and availability of a product in your Merchant Center account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `merchantId` - The ID of the managing account. + /// * `storeCode` - The code of the store for which to update price and availability. Use online to update price and availability of an online product. + /// * `productId` - The ID of the product for which to update price and availability. pub fn set(&self, request: &InventorySetRequest, merchant_id: &str, store_code: &str, product_id: &str) -> InventorySetCall<'a, C, NC, A> { InventorySetCall { hub: self.hub, @@ -3210,7 +3368,11 @@ impl<'a, C, NC, A> InventoryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates price and availability for multiple products or stores in a single request. + /// Updates price and availability for multiple products or stores in a single request. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn custombatch(&self, request: &InventoryCustomBatchRequest) -> InventoryCustombatchCall<'a, C, NC, A> { InventoryCustombatchCall { hub: self.hub, @@ -3258,13 +3420,18 @@ pub struct AccountstatuseMethods<'a, C, NC, A> hub: &'a ShoppingContent, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AccountstatuseMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AccountstatuseMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AccountstatuseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the status of a Merchant Center account. + /// Retrieves the status of a Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. + /// * `accountId` - The ID of the account. pub fn get(&self, merchant_id: &str, account_id: &str) -> AccountstatuseGetCall<'a, C, NC, A> { AccountstatuseGetCall { hub: self.hub, @@ -3278,7 +3445,11 @@ impl<'a, C, NC, A> AccountstatuseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists the statuses of the sub-accounts in your Merchant Center account. + /// Lists the statuses of the sub-accounts in your Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. pub fn list(&self, merchant_id: &str) -> AccountstatuseListCall<'a, C, NC, A> { AccountstatuseListCall { hub: self.hub, @@ -3291,6 +3462,10 @@ impl<'a, C, NC, A> AccountstatuseMethods<'a, C, NC, A> { } } + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn custombatch(&self, request: &AccountstatusesCustomBatchRequest) -> AccountstatuseCustombatchCall<'a, C, NC, A> { AccountstatuseCustombatchCall { hub: self.hub, @@ -3338,13 +3513,17 @@ pub struct ProductMethods<'a, C, NC, A> hub: &'a ShoppingContent, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ProductMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ProductMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ProductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists the products in your Merchant Center account. + /// Lists the products in your Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. pub fn list(&self, merchant_id: &str) -> ProductListCall<'a, C, NC, A> { ProductListCall { hub: self.hub, @@ -3359,7 +3538,12 @@ impl<'a, C, NC, A> ProductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a product from your Merchant Center account. + /// Retrieves a product from your Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. + /// * `productId` - The ID of the product. pub fn get(&self, merchant_id: &str, product_id: &str) -> ProductGetCall<'a, C, NC, A> { ProductGetCall { hub: self.hub, @@ -3373,7 +3557,12 @@ impl<'a, C, NC, A> ProductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a product from your Merchant Center account. + /// Deletes a product from your Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. + /// * `productId` - The ID of the product. pub fn delete(&self, merchant_id: &str, product_id: &str) -> ProductDeleteCall<'a, C, NC, A> { ProductDeleteCall { hub: self.hub, @@ -3388,7 +3577,11 @@ impl<'a, C, NC, A> ProductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves, inserts, and deletes multiple products in a single request. + /// Retrieves, inserts, and deletes multiple products in a single request. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn custombatch(&self, request: &ProductsCustomBatchRequest) -> ProductCustombatchCall<'a, C, NC, A> { ProductCustombatchCall { hub: self.hub, @@ -3402,7 +3595,12 @@ impl<'a, C, NC, A> ProductMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Uploads a product to your Merchant Center account. + /// Uploads a product to your Merchant Center account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `merchantId` - The ID of the managing account. pub fn insert(&self, request: &Product, merchant_id: &str) -> ProductInsertCall<'a, C, NC, A> { ProductInsertCall { hub: self.hub, @@ -3452,13 +3650,17 @@ pub struct AccountshippingMethods<'a, C, NC, A> hub: &'a ShoppingContent, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AccountshippingMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AccountshippingMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AccountshippingMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists the shipping settings of the sub-accounts in your Merchant Center account. + /// Lists the shipping settings of the sub-accounts in your Merchant Center account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. pub fn list(&self, merchant_id: &str) -> AccountshippingListCall<'a, C, NC, A> { AccountshippingListCall { hub: self.hub, @@ -3473,7 +3675,13 @@ impl<'a, C, NC, A> AccountshippingMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the shipping settings of the account. This method supports patch semantics. + /// Updates the shipping settings of the account. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `merchantId` - The ID of the managing account. + /// * `accountId` - The ID of the account for which to get/update account shipping settings. pub fn patch(&self, request: &AccountShipping, merchant_id: &str, account_id: &str) -> AccountshippingPatchCall<'a, C, NC, A> { AccountshippingPatchCall { hub: self.hub, @@ -3488,7 +3696,13 @@ impl<'a, C, NC, A> AccountshippingMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the shipping settings of the account. + /// Updates the shipping settings of the account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `merchantId` - The ID of the managing account. + /// * `accountId` - The ID of the account for which to get/update account shipping settings. pub fn update(&self, request: &AccountShipping, merchant_id: &str, account_id: &str) -> AccountshippingUpdateCall<'a, C, NC, A> { AccountshippingUpdateCall { hub: self.hub, @@ -3503,7 +3717,11 @@ impl<'a, C, NC, A> AccountshippingMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves and updates the shipping settings of multiple accounts in a single request. + /// Retrieves and updates the shipping settings of multiple accounts in a single request. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn custombatch(&self, request: &AccountshippingCustomBatchRequest) -> AccountshippingCustombatchCall<'a, C, NC, A> { AccountshippingCustombatchCall { hub: self.hub, @@ -3516,7 +3734,12 @@ impl<'a, C, NC, A> AccountshippingMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the shipping settings of the account. + /// Retrieves the shipping settings of the account. + /// + /// # Arguments + /// + /// * `merchantId` - The ID of the managing account. + /// * `accountId` - The ID of the account for which to get/update account shipping settings. pub fn get(&self, merchant_id: &str, account_id: &str) -> AccountshippingGetCall<'a, C, NC, A> { AccountshippingGetCall { hub: self.hub, @@ -3540,7 +3763,7 @@ impl<'a, C, NC, A> AccountshippingMethods<'a, C, NC, A> { /// Retrieves and updates tax settings of multiple accounts in a single request. /// /// A builder for the *custombatch* method supported by a *accounttax* resource. -/// It is not used directly, but through a `AccounttaxMethods`. +/// It is not used directly, but through a `AccounttaxMethods` instance. /// /// # Example /// @@ -3603,7 +3826,7 @@ impl<'a, C, NC, A> AccounttaxCustombatchCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3636,7 +3859,7 @@ impl<'a, C, NC, A> AccounttaxCustombatchCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3652,7 +3875,6 @@ impl<'a, C, NC, A> AccounttaxCustombatchCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -3662,7 +3884,7 @@ impl<'a, C, NC, A> AccounttaxCustombatchCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3673,7 +3895,7 @@ impl<'a, C, NC, A> AccounttaxCustombatchCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3682,13 +3904,13 @@ impl<'a, C, NC, A> AccounttaxCustombatchCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3760,7 +3982,7 @@ impl<'a, C, NC, A> AccounttaxCustombatchCall<'a, C, NC, A> where NC: hyper::net: /// Updates the tax settings of the account. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *accounttax* resource. -/// It is not used directly, but through a `AccounttaxMethods`. +/// It is not used directly, but through a `AccounttaxMethods` instance. /// /// # Example /// @@ -3827,7 +4049,7 @@ impl<'a, C, NC, A> AccounttaxPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "merchantId", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3884,7 +4106,7 @@ impl<'a, C, NC, A> AccounttaxPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3900,7 +4122,6 @@ impl<'a, C, NC, A> AccounttaxPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -3910,7 +4131,7 @@ impl<'a, C, NC, A> AccounttaxPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3921,7 +4142,7 @@ impl<'a, C, NC, A> AccounttaxPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3930,13 +4151,13 @@ impl<'a, C, NC, A> AccounttaxPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3957,7 +4178,7 @@ impl<'a, C, NC, A> AccounttaxPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccounttaxPatchCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -3967,7 +4188,7 @@ impl<'a, C, NC, A> AccounttaxPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the account for which to get/update account tax settings. + /// The ID of the account for which to get/update account tax settings. pub fn account_id(mut self, new_value: &str) -> AccounttaxPatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -4028,7 +4249,7 @@ impl<'a, C, NC, A> AccounttaxPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Lists the tax settings of the sub-accounts in your Merchant Center account. /// /// A builder for the *list* method supported by a *accounttax* resource. -/// It is not used directly, but through a `AccounttaxMethods`. +/// It is not used directly, but through a `AccounttaxMethods` instance. /// /// # Example /// @@ -4096,7 +4317,7 @@ impl<'a, C, NC, A> AccounttaxListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "merchantId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4149,7 +4370,7 @@ impl<'a, C, NC, A> AccounttaxListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4161,7 +4382,6 @@ impl<'a, C, NC, A> AccounttaxListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -4171,7 +4391,7 @@ impl<'a, C, NC, A> AccounttaxListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4182,7 +4402,7 @@ impl<'a, C, NC, A> AccounttaxListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4191,13 +4411,13 @@ impl<'a, C, NC, A> AccounttaxListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4209,7 +4429,7 @@ impl<'a, C, NC, A> AccounttaxListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccounttaxListCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -4217,7 +4437,7 @@ impl<'a, C, NC, A> AccounttaxListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *page token* query property to the given value. /// /// - /// The token returned by the previous request. + /// The token returned by the previous request. pub fn page_token(mut self, new_value: &str) -> AccounttaxListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -4225,7 +4445,7 @@ impl<'a, C, NC, A> AccounttaxListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of tax settings to return in the response, used for paging. + /// The maximum number of tax settings to return in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> AccounttaxListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -4286,7 +4506,7 @@ impl<'a, C, NC, A> AccounttaxListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Updates the tax settings of the account. /// /// A builder for the *update* method supported by a *accounttax* resource. -/// It is not used directly, but through a `AccounttaxMethods`. +/// It is not used directly, but through a `AccounttaxMethods` instance. /// /// # Example /// @@ -4353,7 +4573,7 @@ impl<'a, C, NC, A> AccounttaxUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "merchantId", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4410,7 +4630,7 @@ impl<'a, C, NC, A> AccounttaxUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4426,7 +4646,6 @@ impl<'a, C, NC, A> AccounttaxUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -4436,7 +4655,7 @@ impl<'a, C, NC, A> AccounttaxUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4447,7 +4666,7 @@ impl<'a, C, NC, A> AccounttaxUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4456,13 +4675,13 @@ impl<'a, C, NC, A> AccounttaxUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4483,7 +4702,7 @@ impl<'a, C, NC, A> AccounttaxUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccounttaxUpdateCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -4493,7 +4712,7 @@ impl<'a, C, NC, A> AccounttaxUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the account for which to get/update account tax settings. + /// The ID of the account for which to get/update account tax settings. pub fn account_id(mut self, new_value: &str) -> AccounttaxUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -4554,7 +4773,7 @@ impl<'a, C, NC, A> AccounttaxUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Retrieves the tax settings of the account. /// /// A builder for the *get* method supported by a *accounttax* resource. -/// It is not used directly, but through a `AccounttaxMethods`. +/// It is not used directly, but through a `AccounttaxMethods` instance. /// /// # Example /// @@ -4614,7 +4833,7 @@ impl<'a, C, NC, A> AccounttaxGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "merchantId", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4667,7 +4886,7 @@ impl<'a, C, NC, A> AccounttaxGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4679,7 +4898,6 @@ impl<'a, C, NC, A> AccounttaxGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -4689,7 +4907,7 @@ impl<'a, C, NC, A> AccounttaxGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4700,7 +4918,7 @@ impl<'a, C, NC, A> AccounttaxGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4709,13 +4927,13 @@ impl<'a, C, NC, A> AccounttaxGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4727,7 +4945,7 @@ impl<'a, C, NC, A> AccounttaxGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccounttaxGetCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -4737,7 +4955,7 @@ impl<'a, C, NC, A> AccounttaxGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the account for which to get/update account tax settings. + /// The ID of the account for which to get/update account tax settings. pub fn account_id(mut self, new_value: &str) -> AccounttaxGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -4798,7 +5016,7 @@ impl<'a, C, NC, A> AccounttaxGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Retrieves the status of a datafeed from your Merchant Center account. /// /// A builder for the *get* method supported by a *datafeedstatuse* resource. -/// It is not used directly, but through a `DatafeedstatuseMethods`. +/// It is not used directly, but through a `DatafeedstatuseMethods` instance. /// /// # Example /// @@ -4858,7 +5076,7 @@ impl<'a, C, NC, A> DatafeedstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "merchantId", "datafeedId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4911,7 +5129,7 @@ impl<'a, C, NC, A> DatafeedstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4923,7 +5141,6 @@ impl<'a, C, NC, A> DatafeedstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -4933,7 +5150,7 @@ impl<'a, C, NC, A> DatafeedstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4944,7 +5161,7 @@ impl<'a, C, NC, A> DatafeedstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4953,13 +5170,13 @@ impl<'a, C, NC, A> DatafeedstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5040,7 +5257,7 @@ impl<'a, C, NC, A> DatafeedstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Lists the statuses of the datafeeds in your Merchant Center account. /// /// A builder for the *list* method supported by a *datafeedstatuse* resource. -/// It is not used directly, but through a `DatafeedstatuseMethods`. +/// It is not used directly, but through a `DatafeedstatuseMethods` instance. /// /// # Example /// @@ -5108,7 +5325,7 @@ impl<'a, C, NC, A> DatafeedstatuseListCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "merchantId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5161,7 +5378,7 @@ impl<'a, C, NC, A> DatafeedstatuseListCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5173,7 +5390,6 @@ impl<'a, C, NC, A> DatafeedstatuseListCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -5183,7 +5399,7 @@ impl<'a, C, NC, A> DatafeedstatuseListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5194,7 +5410,7 @@ impl<'a, C, NC, A> DatafeedstatuseListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5203,13 +5419,13 @@ impl<'a, C, NC, A> DatafeedstatuseListCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5221,7 +5437,7 @@ impl<'a, C, NC, A> DatafeedstatuseListCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> DatafeedstatuseListCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -5229,7 +5445,7 @@ impl<'a, C, NC, A> DatafeedstatuseListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *page token* query property to the given value. /// /// - /// The token returned by the previous request. + /// The token returned by the previous request. pub fn page_token(mut self, new_value: &str) -> DatafeedstatuseListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -5237,7 +5453,7 @@ impl<'a, C, NC, A> DatafeedstatuseListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of products to return in the response, used for paging. + /// The maximum number of products to return in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> DatafeedstatuseListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -5296,7 +5512,7 @@ impl<'a, C, NC, A> DatafeedstatuseListCall<'a, C, NC, A> where NC: hyper::net::N /// A builder for the *custombatch* method supported by a *datafeedstatuse* resource. -/// It is not used directly, but through a `DatafeedstatuseMethods`. +/// It is not used directly, but through a `DatafeedstatuseMethods` instance. /// /// # Example /// @@ -5359,7 +5575,7 @@ impl<'a, C, NC, A> DatafeedstatuseCustombatchCall<'a, C, NC, A> where NC: hyper: for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5392,7 +5608,7 @@ impl<'a, C, NC, A> DatafeedstatuseCustombatchCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5408,7 +5624,6 @@ impl<'a, C, NC, A> DatafeedstatuseCustombatchCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -5418,7 +5633,7 @@ impl<'a, C, NC, A> DatafeedstatuseCustombatchCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5429,7 +5644,7 @@ impl<'a, C, NC, A> DatafeedstatuseCustombatchCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5438,13 +5653,13 @@ impl<'a, C, NC, A> DatafeedstatuseCustombatchCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5514,7 +5729,7 @@ impl<'a, C, NC, A> DatafeedstatuseCustombatchCall<'a, C, NC, A> where NC: hyper: /// A builder for the *custombatch* method supported by a *datafeed* resource. -/// It is not used directly, but through a `DatafeedMethods`. +/// It is not used directly, but through a `DatafeedMethods` instance. /// /// # Example /// @@ -5577,7 +5792,7 @@ impl<'a, C, NC, A> DatafeedCustombatchCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5610,7 +5825,7 @@ impl<'a, C, NC, A> DatafeedCustombatchCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5626,7 +5841,6 @@ impl<'a, C, NC, A> DatafeedCustombatchCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -5636,7 +5850,7 @@ impl<'a, C, NC, A> DatafeedCustombatchCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5647,7 +5861,7 @@ impl<'a, C, NC, A> DatafeedCustombatchCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5656,13 +5870,13 @@ impl<'a, C, NC, A> DatafeedCustombatchCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5734,7 +5948,7 @@ impl<'a, C, NC, A> DatafeedCustombatchCall<'a, C, NC, A> where NC: hyper::net::N /// Retrieves a datafeed from your Merchant Center account. /// /// A builder for the *get* method supported by a *datafeed* resource. -/// It is not used directly, but through a `DatafeedMethods`. +/// It is not used directly, but through a `DatafeedMethods` instance. /// /// # Example /// @@ -5794,7 +6008,7 @@ impl<'a, C, NC, A> DatafeedGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "merchantId", "datafeedId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -5847,7 +6061,7 @@ impl<'a, C, NC, A> DatafeedGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -5859,7 +6073,6 @@ impl<'a, C, NC, A> DatafeedGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -5869,7 +6082,7 @@ impl<'a, C, NC, A> DatafeedGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -5880,7 +6093,7 @@ impl<'a, C, NC, A> DatafeedGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -5889,13 +6102,13 @@ impl<'a, C, NC, A> DatafeedGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -5976,7 +6189,7 @@ impl<'a, C, NC, A> DatafeedGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Updates a datafeed of your Merchant Center account. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *datafeed* resource. -/// It is not used directly, but through a `DatafeedMethods`. +/// It is not used directly, but through a `DatafeedMethods` instance. /// /// # Example /// @@ -6043,7 +6256,7 @@ impl<'a, C, NC, A> DatafeedPatchCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "merchantId", "datafeedId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6100,7 +6313,7 @@ impl<'a, C, NC, A> DatafeedPatchCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6116,7 +6329,6 @@ impl<'a, C, NC, A> DatafeedPatchCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -6126,7 +6338,7 @@ impl<'a, C, NC, A> DatafeedPatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6137,7 +6349,7 @@ impl<'a, C, NC, A> DatafeedPatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6146,13 +6358,13 @@ impl<'a, C, NC, A> DatafeedPatchCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6242,7 +6454,7 @@ impl<'a, C, NC, A> DatafeedPatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Deletes a datafeed from your Merchant Center account. /// /// A builder for the *delete* method supported by a *datafeed* resource. -/// It is not used directly, but through a `DatafeedMethods`. +/// It is not used directly, but through a `DatafeedMethods` instance. /// /// # Example /// @@ -6302,7 +6514,7 @@ impl<'a, C, NC, A> DatafeedDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["merchantId", "datafeedId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6354,7 +6566,7 @@ impl<'a, C, NC, A> DatafeedDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6366,7 +6578,6 @@ impl<'a, C, NC, A> DatafeedDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -6376,7 +6587,7 @@ impl<'a, C, NC, A> DatafeedDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6387,12 +6598,12 @@ impl<'a, C, NC, A> DatafeedDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6473,7 +6684,7 @@ impl<'a, C, NC, A> DatafeedDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Registers a datafeed with your Merchant Center account. /// /// A builder for the *insert* method supported by a *datafeed* resource. -/// It is not used directly, but through a `DatafeedMethods`. +/// It is not used directly, but through a `DatafeedMethods` instance. /// /// # Example /// @@ -6538,7 +6749,7 @@ impl<'a, C, NC, A> DatafeedInsertCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "merchantId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6595,7 +6806,7 @@ impl<'a, C, NC, A> DatafeedInsertCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6611,7 +6822,6 @@ impl<'a, C, NC, A> DatafeedInsertCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -6621,7 +6831,7 @@ impl<'a, C, NC, A> DatafeedInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6632,7 +6842,7 @@ impl<'a, C, NC, A> DatafeedInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6641,13 +6851,13 @@ impl<'a, C, NC, A> DatafeedInsertCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6728,7 +6938,7 @@ impl<'a, C, NC, A> DatafeedInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Lists the datafeeds in your Merchant Center account. /// /// A builder for the *list* method supported by a *datafeed* resource. -/// It is not used directly, but through a `DatafeedMethods`. +/// It is not used directly, but through a `DatafeedMethods` instance. /// /// # Example /// @@ -6796,7 +7006,7 @@ impl<'a, C, NC, A> DatafeedListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "merchantId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -6849,7 +7059,7 @@ impl<'a, C, NC, A> DatafeedListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -6861,7 +7071,6 @@ impl<'a, C, NC, A> DatafeedListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -6871,7 +7080,7 @@ impl<'a, C, NC, A> DatafeedListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -6882,7 +7091,7 @@ impl<'a, C, NC, A> DatafeedListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -6891,13 +7100,13 @@ impl<'a, C, NC, A> DatafeedListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -6909,7 +7118,7 @@ impl<'a, C, NC, A> DatafeedListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> DatafeedListCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -6917,7 +7126,7 @@ impl<'a, C, NC, A> DatafeedListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// The token returned by the previous request. + /// The token returned by the previous request. pub fn page_token(mut self, new_value: &str) -> DatafeedListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -6925,7 +7134,7 @@ impl<'a, C, NC, A> DatafeedListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of products to return in the response, used for paging. + /// The maximum number of products to return in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> DatafeedListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -6986,7 +7195,7 @@ impl<'a, C, NC, A> DatafeedListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Updates a datafeed of your Merchant Center account. /// /// A builder for the *update* method supported by a *datafeed* resource. -/// It is not used directly, but through a `DatafeedMethods`. +/// It is not used directly, but through a `DatafeedMethods` instance. /// /// # Example /// @@ -7053,7 +7262,7 @@ impl<'a, C, NC, A> DatafeedUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "merchantId", "datafeedId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7110,7 +7319,7 @@ impl<'a, C, NC, A> DatafeedUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7126,7 +7335,6 @@ impl<'a, C, NC, A> DatafeedUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -7136,7 +7344,7 @@ impl<'a, C, NC, A> DatafeedUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7147,7 +7355,7 @@ impl<'a, C, NC, A> DatafeedUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7156,13 +7364,13 @@ impl<'a, C, NC, A> DatafeedUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7252,7 +7460,7 @@ impl<'a, C, NC, A> DatafeedUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Gets the status of a product from your Merchant Center account. /// /// A builder for the *get* method supported by a *productstatuse* resource. -/// It is not used directly, but through a `ProductstatuseMethods`. +/// It is not used directly, but through a `ProductstatuseMethods` instance. /// /// # Example /// @@ -7312,7 +7520,7 @@ impl<'a, C, NC, A> ProductstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "merchantId", "productId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7365,7 +7573,7 @@ impl<'a, C, NC, A> ProductstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7377,7 +7585,6 @@ impl<'a, C, NC, A> ProductstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -7387,7 +7594,7 @@ impl<'a, C, NC, A> ProductstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7398,7 +7605,7 @@ impl<'a, C, NC, A> ProductstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7407,13 +7614,13 @@ impl<'a, C, NC, A> ProductstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7425,7 +7632,7 @@ impl<'a, C, NC, A> ProductstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> ProductstatuseGetCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -7435,7 +7642,7 @@ impl<'a, C, NC, A> ProductstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the product. + /// The ID of the product. pub fn product_id(mut self, new_value: &str) -> ProductstatuseGetCall<'a, C, NC, A> { self._product_id = new_value.to_string(); self @@ -7496,7 +7703,7 @@ impl<'a, C, NC, A> ProductstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Lists the statuses of the products in your Merchant Center account. /// /// A builder for the *list* method supported by a *productstatuse* resource. -/// It is not used directly, but through a `ProductstatuseMethods`. +/// It is not used directly, but through a `ProductstatuseMethods` instance. /// /// # Example /// @@ -7564,7 +7771,7 @@ impl<'a, C, NC, A> ProductstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "merchantId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7617,7 +7824,7 @@ impl<'a, C, NC, A> ProductstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7629,7 +7836,6 @@ impl<'a, C, NC, A> ProductstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -7639,7 +7845,7 @@ impl<'a, C, NC, A> ProductstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7650,7 +7856,7 @@ impl<'a, C, NC, A> ProductstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7659,13 +7865,13 @@ impl<'a, C, NC, A> ProductstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7677,7 +7883,7 @@ impl<'a, C, NC, A> ProductstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> ProductstatuseListCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -7685,7 +7891,7 @@ impl<'a, C, NC, A> ProductstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *page token* query property to the given value. /// /// - /// The token returned by the previous request. + /// The token returned by the previous request. pub fn page_token(mut self, new_value: &str) -> ProductstatuseListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -7693,7 +7899,7 @@ impl<'a, C, NC, A> ProductstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of product statuses to return in the response, used for paging. + /// The maximum number of product statuses to return in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> ProductstatuseListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -7754,7 +7960,7 @@ impl<'a, C, NC, A> ProductstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Gets the statuses of multiple products in a single request. /// /// A builder for the *custombatch* method supported by a *productstatuse* resource. -/// It is not used directly, but through a `ProductstatuseMethods`. +/// It is not used directly, but through a `ProductstatuseMethods` instance. /// /// # Example /// @@ -7817,7 +8023,7 @@ impl<'a, C, NC, A> ProductstatuseCustombatchCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -7850,7 +8056,7 @@ impl<'a, C, NC, A> ProductstatuseCustombatchCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -7866,7 +8072,6 @@ impl<'a, C, NC, A> ProductstatuseCustombatchCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -7876,7 +8081,7 @@ impl<'a, C, NC, A> ProductstatuseCustombatchCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -7887,7 +8092,7 @@ impl<'a, C, NC, A> ProductstatuseCustombatchCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -7896,13 +8101,13 @@ impl<'a, C, NC, A> ProductstatuseCustombatchCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -7974,7 +8179,7 @@ impl<'a, C, NC, A> ProductstatuseCustombatchCall<'a, C, NC, A> where NC: hyper:: /// Returns information about the authenticated user. /// /// A builder for the *authinfo* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -8030,7 +8235,7 @@ impl<'a, C, NC, A> AccountAuthinfoCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8059,7 +8264,7 @@ impl<'a, C, NC, A> AccountAuthinfoCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8071,7 +8276,6 @@ impl<'a, C, NC, A> AccountAuthinfoCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -8081,7 +8285,7 @@ impl<'a, C, NC, A> AccountAuthinfoCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8092,7 +8296,7 @@ impl<'a, C, NC, A> AccountAuthinfoCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8101,13 +8305,13 @@ impl<'a, C, NC, A> AccountAuthinfoCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8170,7 +8374,7 @@ impl<'a, C, NC, A> AccountAuthinfoCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Updates a Merchant Center account. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -8237,7 +8441,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "merchantId", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8294,7 +8498,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8310,7 +8514,6 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -8320,7 +8523,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8331,7 +8534,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8340,13 +8543,13 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8367,7 +8570,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountPatchCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -8377,7 +8580,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the account. + /// The ID of the account. pub fn account_id(mut self, new_value: &str) -> AccountPatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -8438,7 +8641,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Retrieves a Merchant Center account. /// /// A builder for the *get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -8498,7 +8701,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "merchantId", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8551,7 +8754,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8563,7 +8766,6 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -8573,7 +8775,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8584,7 +8786,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8593,13 +8795,13 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8611,7 +8813,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountGetCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -8621,7 +8823,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the account. + /// The ID of the account. pub fn account_id(mut self, new_value: &str) -> AccountGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -8682,7 +8884,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Updates a Merchant Center account. /// /// A builder for the *update* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -8749,7 +8951,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "merchantId", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -8806,7 +9008,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -8822,7 +9024,6 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -8832,7 +9033,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -8843,7 +9044,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -8852,13 +9053,13 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -8879,7 +9080,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountUpdateCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -8889,7 +9090,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the account. + /// The ID of the account. pub fn account_id(mut self, new_value: &str) -> AccountUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -8950,7 +9151,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Lists the sub-accounts in your Merchant Center account. /// /// A builder for the *list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -9018,7 +9219,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "merchantId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9071,7 +9272,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9083,7 +9284,6 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -9093,7 +9293,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9104,7 +9304,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9113,13 +9313,13 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9131,7 +9331,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountListCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -9139,7 +9339,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *page token* query property to the given value. /// /// - /// The token returned by the previous request. + /// The token returned by the previous request. pub fn page_token(mut self, new_value: &str) -> AccountListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -9147,7 +9347,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of accounts to return in the response, used for paging. + /// The maximum number of accounts to return in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> AccountListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -9208,7 +9408,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Deletes a Merchant Center sub-account. /// /// A builder for the *delete* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -9268,7 +9468,7 @@ impl<'a, C, NC, A> AccountDeleteCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["merchantId", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9320,7 +9520,7 @@ impl<'a, C, NC, A> AccountDeleteCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9332,7 +9532,6 @@ impl<'a, C, NC, A> AccountDeleteCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -9342,7 +9541,7 @@ impl<'a, C, NC, A> AccountDeleteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9353,12 +9552,12 @@ impl<'a, C, NC, A> AccountDeleteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9370,7 +9569,7 @@ impl<'a, C, NC, A> AccountDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountDeleteCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -9380,7 +9579,7 @@ impl<'a, C, NC, A> AccountDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the account. + /// The ID of the account. pub fn account_id(mut self, new_value: &str) -> AccountDeleteCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -9441,7 +9640,7 @@ impl<'a, C, NC, A> AccountDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request. /// /// A builder for the *custombatch* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -9504,7 +9703,7 @@ impl<'a, C, NC, A> AccountCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9537,7 +9736,7 @@ impl<'a, C, NC, A> AccountCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9553,7 +9752,6 @@ impl<'a, C, NC, A> AccountCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -9563,7 +9761,7 @@ impl<'a, C, NC, A> AccountCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9574,7 +9772,7 @@ impl<'a, C, NC, A> AccountCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9583,13 +9781,13 @@ impl<'a, C, NC, A> AccountCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9661,7 +9859,7 @@ impl<'a, C, NC, A> AccountCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Creates a Merchant Center sub-account. /// /// A builder for the *insert* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -9726,7 +9924,7 @@ impl<'a, C, NC, A> AccountInsertCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "merchantId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -9783,7 +9981,7 @@ impl<'a, C, NC, A> AccountInsertCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -9799,7 +9997,6 @@ impl<'a, C, NC, A> AccountInsertCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -9809,7 +10006,7 @@ impl<'a, C, NC, A> AccountInsertCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -9820,7 +10017,7 @@ impl<'a, C, NC, A> AccountInsertCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -9829,13 +10026,13 @@ impl<'a, C, NC, A> AccountInsertCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -9856,7 +10053,7 @@ impl<'a, C, NC, A> AccountInsertCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountInsertCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -9917,7 +10114,7 @@ impl<'a, C, NC, A> AccountInsertCall<'a, C, NC, A> where NC: hyper::net::Network /// Updates price and availability of a product in your Merchant Center account. /// /// A builder for the *set* method supported by a *inventory* resource. -/// It is not used directly, but through a `InventoryMethods`. +/// It is not used directly, but through a `InventoryMethods` instance. /// /// # Example /// @@ -9986,7 +10183,7 @@ impl<'a, C, NC, A> InventorySetCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "merchantId", "storeCode", "productId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10043,7 +10240,7 @@ impl<'a, C, NC, A> InventorySetCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10059,7 +10256,6 @@ impl<'a, C, NC, A> InventorySetCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -10069,7 +10265,7 @@ impl<'a, C, NC, A> InventorySetCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10080,7 +10276,7 @@ impl<'a, C, NC, A> InventorySetCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10089,13 +10285,13 @@ impl<'a, C, NC, A> InventorySetCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10116,7 +10312,7 @@ impl<'a, C, NC, A> InventorySetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> InventorySetCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -10126,7 +10322,7 @@ impl<'a, C, NC, A> InventorySetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The code of the store for which to update price and availability. Use online to update price and availability of an online product. + /// The code of the store for which to update price and availability. Use online to update price and availability of an online product. pub fn store_code(mut self, new_value: &str) -> InventorySetCall<'a, C, NC, A> { self._store_code = new_value.to_string(); self @@ -10136,7 +10332,7 @@ impl<'a, C, NC, A> InventorySetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the product for which to update price and availability. + /// The ID of the product for which to update price and availability. pub fn product_id(mut self, new_value: &str) -> InventorySetCall<'a, C, NC, A> { self._product_id = new_value.to_string(); self @@ -10197,7 +10393,7 @@ impl<'a, C, NC, A> InventorySetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Updates price and availability for multiple products or stores in a single request. /// /// A builder for the *custombatch* method supported by a *inventory* resource. -/// It is not used directly, but through a `InventoryMethods`. +/// It is not used directly, but through a `InventoryMethods` instance. /// /// # Example /// @@ -10260,7 +10456,7 @@ impl<'a, C, NC, A> InventoryCustombatchCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10293,7 +10489,7 @@ impl<'a, C, NC, A> InventoryCustombatchCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10309,7 +10505,6 @@ impl<'a, C, NC, A> InventoryCustombatchCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -10319,7 +10514,7 @@ impl<'a, C, NC, A> InventoryCustombatchCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10330,7 +10525,7 @@ impl<'a, C, NC, A> InventoryCustombatchCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10339,13 +10534,13 @@ impl<'a, C, NC, A> InventoryCustombatchCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10417,7 +10612,7 @@ impl<'a, C, NC, A> InventoryCustombatchCall<'a, C, NC, A> where NC: hyper::net:: /// Retrieves the status of a Merchant Center account. /// /// A builder for the *get* method supported by a *accountstatuse* resource. -/// It is not used directly, but through a `AccountstatuseMethods`. +/// It is not used directly, but through a `AccountstatuseMethods` instance. /// /// # Example /// @@ -10477,7 +10672,7 @@ impl<'a, C, NC, A> AccountstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "merchantId", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10530,7 +10725,7 @@ impl<'a, C, NC, A> AccountstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10542,7 +10737,6 @@ impl<'a, C, NC, A> AccountstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -10552,7 +10746,7 @@ impl<'a, C, NC, A> AccountstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10563,7 +10757,7 @@ impl<'a, C, NC, A> AccountstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10572,13 +10766,13 @@ impl<'a, C, NC, A> AccountstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10590,7 +10784,7 @@ impl<'a, C, NC, A> AccountstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountstatuseGetCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -10600,7 +10794,7 @@ impl<'a, C, NC, A> AccountstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the account. + /// The ID of the account. pub fn account_id(mut self, new_value: &str) -> AccountstatuseGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -10661,7 +10855,7 @@ impl<'a, C, NC, A> AccountstatuseGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Lists the statuses of the sub-accounts in your Merchant Center account. /// /// A builder for the *list* method supported by a *accountstatuse* resource. -/// It is not used directly, but through a `AccountstatuseMethods`. +/// It is not used directly, but through a `AccountstatuseMethods` instance. /// /// # Example /// @@ -10729,7 +10923,7 @@ impl<'a, C, NC, A> AccountstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "merchantId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10782,7 +10976,7 @@ impl<'a, C, NC, A> AccountstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10794,7 +10988,6 @@ impl<'a, C, NC, A> AccountstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -10804,7 +10997,7 @@ impl<'a, C, NC, A> AccountstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10815,7 +11008,7 @@ impl<'a, C, NC, A> AccountstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10824,13 +11017,13 @@ impl<'a, C, NC, A> AccountstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10842,7 +11035,7 @@ impl<'a, C, NC, A> AccountstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountstatuseListCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -10850,7 +11043,7 @@ impl<'a, C, NC, A> AccountstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *page token* query property to the given value. /// /// - /// The token returned by the previous request. + /// The token returned by the previous request. pub fn page_token(mut self, new_value: &str) -> AccountstatuseListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -10858,7 +11051,7 @@ impl<'a, C, NC, A> AccountstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of account statuses to return in the response, used for paging. + /// The maximum number of account statuses to return in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> AccountstatuseListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -10917,7 +11110,7 @@ impl<'a, C, NC, A> AccountstatuseListCall<'a, C, NC, A> where NC: hyper::net::Ne /// A builder for the *custombatch* method supported by a *accountstatuse* resource. -/// It is not used directly, but through a `AccountstatuseMethods`. +/// It is not used directly, but through a `AccountstatuseMethods` instance. /// /// # Example /// @@ -10980,7 +11173,7 @@ impl<'a, C, NC, A> AccountstatuseCustombatchCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11013,7 +11206,7 @@ impl<'a, C, NC, A> AccountstatuseCustombatchCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11029,7 +11222,6 @@ impl<'a, C, NC, A> AccountstatuseCustombatchCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -11039,7 +11231,7 @@ impl<'a, C, NC, A> AccountstatuseCustombatchCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11050,7 +11242,7 @@ impl<'a, C, NC, A> AccountstatuseCustombatchCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11059,13 +11251,13 @@ impl<'a, C, NC, A> AccountstatuseCustombatchCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11137,7 +11329,7 @@ impl<'a, C, NC, A> AccountstatuseCustombatchCall<'a, C, NC, A> where NC: hyper:: /// Lists the products in your Merchant Center account. /// /// A builder for the *list* method supported by a *product* resource. -/// It is not used directly, but through a `ProductMethods`. +/// It is not used directly, but through a `ProductMethods` instance. /// /// # Example /// @@ -11205,7 +11397,7 @@ impl<'a, C, NC, A> ProductListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "merchantId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11258,7 +11450,7 @@ impl<'a, C, NC, A> ProductListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11270,7 +11462,6 @@ impl<'a, C, NC, A> ProductListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -11280,7 +11471,7 @@ impl<'a, C, NC, A> ProductListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11291,7 +11482,7 @@ impl<'a, C, NC, A> ProductListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11300,13 +11491,13 @@ impl<'a, C, NC, A> ProductListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11318,7 +11509,7 @@ impl<'a, C, NC, A> ProductListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> ProductListCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -11326,7 +11517,7 @@ impl<'a, C, NC, A> ProductListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *page token* query property to the given value. /// /// - /// The token returned by the previous request. + /// The token returned by the previous request. pub fn page_token(mut self, new_value: &str) -> ProductListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -11334,7 +11525,7 @@ impl<'a, C, NC, A> ProductListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of products to return in the response, used for paging. + /// The maximum number of products to return in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> ProductListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -11395,7 +11586,7 @@ impl<'a, C, NC, A> ProductListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Retrieves a product from your Merchant Center account. /// /// A builder for the *get* method supported by a *product* resource. -/// It is not used directly, but through a `ProductMethods`. +/// It is not used directly, but through a `ProductMethods` instance. /// /// # Example /// @@ -11455,7 +11646,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "merchantId", "productId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11508,7 +11699,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11520,7 +11711,6 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -11530,7 +11720,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11541,7 +11731,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11550,13 +11740,13 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11568,7 +11758,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> ProductGetCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -11578,7 +11768,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the product. + /// The ID of the product. pub fn product_id(mut self, new_value: &str) -> ProductGetCall<'a, C, NC, A> { self._product_id = new_value.to_string(); self @@ -11639,7 +11829,7 @@ impl<'a, C, NC, A> ProductGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Deletes a product from your Merchant Center account. /// /// A builder for the *delete* method supported by a *product* resource. -/// It is not used directly, but through a `ProductMethods`. +/// It is not used directly, but through a `ProductMethods` instance. /// /// # Example /// @@ -11704,7 +11894,7 @@ impl<'a, C, NC, A> ProductDeleteCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["merchantId", "productId", "dryRun"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11756,7 +11946,7 @@ impl<'a, C, NC, A> ProductDeleteCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11768,7 +11958,6 @@ impl<'a, C, NC, A> ProductDeleteCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -11778,7 +11967,7 @@ impl<'a, C, NC, A> ProductDeleteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11789,12 +11978,12 @@ impl<'a, C, NC, A> ProductDeleteCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11806,7 +11995,7 @@ impl<'a, C, NC, A> ProductDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> ProductDeleteCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -11816,7 +12005,7 @@ impl<'a, C, NC, A> ProductDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the product. + /// The ID of the product. pub fn product_id(mut self, new_value: &str) -> ProductDeleteCall<'a, C, NC, A> { self._product_id = new_value.to_string(); self @@ -11824,7 +12013,7 @@ impl<'a, C, NC, A> ProductDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *dry run* query property to the given value. /// /// - /// Flag to run the request in dry-run mode. + /// Flag to run the request in dry-run mode. pub fn dry_run(mut self, new_value: bool) -> ProductDeleteCall<'a, C, NC, A> { self._dry_run = Some(new_value); self @@ -11885,7 +12074,7 @@ impl<'a, C, NC, A> ProductDeleteCall<'a, C, NC, A> where NC: hyper::net::Network /// Retrieves, inserts, and deletes multiple products in a single request. /// /// A builder for the *custombatch* method supported by a *product* resource. -/// It is not used directly, but through a `ProductMethods`. +/// It is not used directly, but through a `ProductMethods` instance. /// /// # Example /// @@ -11953,7 +12142,7 @@ impl<'a, C, NC, A> ProductCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "dryRun"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11986,7 +12175,7 @@ impl<'a, C, NC, A> ProductCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12002,7 +12191,6 @@ impl<'a, C, NC, A> ProductCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -12012,7 +12200,7 @@ impl<'a, C, NC, A> ProductCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12023,7 +12211,7 @@ impl<'a, C, NC, A> ProductCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12032,13 +12220,13 @@ impl<'a, C, NC, A> ProductCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12057,7 +12245,7 @@ impl<'a, C, NC, A> ProductCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *dry run* query property to the given value. /// /// - /// Flag to run the request in dry-run mode. + /// Flag to run the request in dry-run mode. pub fn dry_run(mut self, new_value: bool) -> ProductCustombatchCall<'a, C, NC, A> { self._dry_run = Some(new_value); self @@ -12118,7 +12306,7 @@ impl<'a, C, NC, A> ProductCustombatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Uploads a product to your Merchant Center account. /// /// A builder for the *insert* method supported by a *product* resource. -/// It is not used directly, but through a `ProductMethods`. +/// It is not used directly, but through a `ProductMethods` instance. /// /// # Example /// @@ -12188,7 +12376,7 @@ impl<'a, C, NC, A> ProductInsertCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "merchantId", "dryRun"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12245,7 +12433,7 @@ impl<'a, C, NC, A> ProductInsertCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12261,7 +12449,6 @@ impl<'a, C, NC, A> ProductInsertCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -12271,7 +12458,7 @@ impl<'a, C, NC, A> ProductInsertCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12282,7 +12469,7 @@ impl<'a, C, NC, A> ProductInsertCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12291,13 +12478,13 @@ impl<'a, C, NC, A> ProductInsertCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12318,7 +12505,7 @@ impl<'a, C, NC, A> ProductInsertCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> ProductInsertCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -12326,7 +12513,7 @@ impl<'a, C, NC, A> ProductInsertCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *dry run* query property to the given value. /// /// - /// Flag to run the request in dry-run mode. + /// Flag to run the request in dry-run mode. pub fn dry_run(mut self, new_value: bool) -> ProductInsertCall<'a, C, NC, A> { self._dry_run = Some(new_value); self @@ -12387,7 +12574,7 @@ impl<'a, C, NC, A> ProductInsertCall<'a, C, NC, A> where NC: hyper::net::Network /// Lists the shipping settings of the sub-accounts in your Merchant Center account. /// /// A builder for the *list* method supported by a *accountshipping* resource. -/// It is not used directly, but through a `AccountshippingMethods`. +/// It is not used directly, but through a `AccountshippingMethods` instance. /// /// # Example /// @@ -12455,7 +12642,7 @@ impl<'a, C, NC, A> AccountshippingListCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "merchantId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12508,7 +12695,7 @@ impl<'a, C, NC, A> AccountshippingListCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12520,7 +12707,6 @@ impl<'a, C, NC, A> AccountshippingListCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -12530,7 +12716,7 @@ impl<'a, C, NC, A> AccountshippingListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12541,7 +12727,7 @@ impl<'a, C, NC, A> AccountshippingListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12550,13 +12736,13 @@ impl<'a, C, NC, A> AccountshippingListCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12568,7 +12754,7 @@ impl<'a, C, NC, A> AccountshippingListCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountshippingListCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -12576,7 +12762,7 @@ impl<'a, C, NC, A> AccountshippingListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *page token* query property to the given value. /// /// - /// The token returned by the previous request. + /// The token returned by the previous request. pub fn page_token(mut self, new_value: &str) -> AccountshippingListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -12584,7 +12770,7 @@ impl<'a, C, NC, A> AccountshippingListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *max results* query property to the given value. /// /// - /// The maximum number of shipping settings to return in the response, used for paging. + /// The maximum number of shipping settings to return in the response, used for paging. pub fn max_results(mut self, new_value: u32) -> AccountshippingListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -12645,7 +12831,7 @@ impl<'a, C, NC, A> AccountshippingListCall<'a, C, NC, A> where NC: hyper::net::N /// Updates the shipping settings of the account. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *accountshipping* resource. -/// It is not used directly, but through a `AccountshippingMethods`. +/// It is not used directly, but through a `AccountshippingMethods` instance. /// /// # Example /// @@ -12712,7 +12898,7 @@ impl<'a, C, NC, A> AccountshippingPatchCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "merchantId", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12769,7 +12955,7 @@ impl<'a, C, NC, A> AccountshippingPatchCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12785,7 +12971,6 @@ impl<'a, C, NC, A> AccountshippingPatchCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -12795,7 +12980,7 @@ impl<'a, C, NC, A> AccountshippingPatchCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12806,7 +12991,7 @@ impl<'a, C, NC, A> AccountshippingPatchCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12815,13 +13000,13 @@ impl<'a, C, NC, A> AccountshippingPatchCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12842,7 +13027,7 @@ impl<'a, C, NC, A> AccountshippingPatchCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountshippingPatchCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -12852,7 +13037,7 @@ impl<'a, C, NC, A> AccountshippingPatchCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the account for which to get/update account shipping settings. + /// The ID of the account for which to get/update account shipping settings. pub fn account_id(mut self, new_value: &str) -> AccountshippingPatchCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -12913,7 +13098,7 @@ impl<'a, C, NC, A> AccountshippingPatchCall<'a, C, NC, A> where NC: hyper::net:: /// Updates the shipping settings of the account. /// /// A builder for the *update* method supported by a *accountshipping* resource. -/// It is not used directly, but through a `AccountshippingMethods`. +/// It is not used directly, but through a `AccountshippingMethods` instance. /// /// # Example /// @@ -12980,7 +13165,7 @@ impl<'a, C, NC, A> AccountshippingUpdateCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "merchantId", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13037,7 +13222,7 @@ impl<'a, C, NC, A> AccountshippingUpdateCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13053,7 +13238,6 @@ impl<'a, C, NC, A> AccountshippingUpdateCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -13063,7 +13247,7 @@ impl<'a, C, NC, A> AccountshippingUpdateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13074,7 +13258,7 @@ impl<'a, C, NC, A> AccountshippingUpdateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13083,13 +13267,13 @@ impl<'a, C, NC, A> AccountshippingUpdateCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13110,7 +13294,7 @@ impl<'a, C, NC, A> AccountshippingUpdateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountshippingUpdateCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -13120,7 +13304,7 @@ impl<'a, C, NC, A> AccountshippingUpdateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the account for which to get/update account shipping settings. + /// The ID of the account for which to get/update account shipping settings. pub fn account_id(mut self, new_value: &str) -> AccountshippingUpdateCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self @@ -13181,7 +13365,7 @@ impl<'a, C, NC, A> AccountshippingUpdateCall<'a, C, NC, A> where NC: hyper::net: /// Retrieves and updates the shipping settings of multiple accounts in a single request. /// /// A builder for the *custombatch* method supported by a *accountshipping* resource. -/// It is not used directly, but through a `AccountshippingMethods`. +/// It is not used directly, but through a `AccountshippingMethods` instance. /// /// # Example /// @@ -13244,7 +13428,7 @@ impl<'a, C, NC, A> AccountshippingCustombatchCall<'a, C, NC, A> where NC: hyper: for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13277,7 +13461,7 @@ impl<'a, C, NC, A> AccountshippingCustombatchCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13293,7 +13477,6 @@ impl<'a, C, NC, A> AccountshippingCustombatchCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -13303,7 +13486,7 @@ impl<'a, C, NC, A> AccountshippingCustombatchCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13314,7 +13497,7 @@ impl<'a, C, NC, A> AccountshippingCustombatchCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13323,13 +13506,13 @@ impl<'a, C, NC, A> AccountshippingCustombatchCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13401,7 +13584,7 @@ impl<'a, C, NC, A> AccountshippingCustombatchCall<'a, C, NC, A> where NC: hyper: /// Retrieves the shipping settings of the account. /// /// A builder for the *get* method supported by a *accountshipping* resource. -/// It is not used directly, but through a `AccountshippingMethods`. +/// It is not used directly, but through a `AccountshippingMethods` instance. /// /// # Example /// @@ -13461,7 +13644,7 @@ impl<'a, C, NC, A> AccountshippingGetCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "merchantId", "accountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13514,7 +13697,7 @@ impl<'a, C, NC, A> AccountshippingGetCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13526,7 +13709,6 @@ impl<'a, C, NC, A> AccountshippingGetCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -13536,7 +13718,7 @@ impl<'a, C, NC, A> AccountshippingGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13547,7 +13729,7 @@ impl<'a, C, NC, A> AccountshippingGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13556,13 +13738,13 @@ impl<'a, C, NC, A> AccountshippingGetCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13574,7 +13756,7 @@ impl<'a, C, NC, A> AccountshippingGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the managing account. + /// The ID of the managing account. pub fn merchant_id(mut self, new_value: &str) -> AccountshippingGetCall<'a, C, NC, A> { self._merchant_id = new_value.to_string(); self @@ -13584,7 +13766,7 @@ impl<'a, C, NC, A> AccountshippingGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the account for which to get/update account shipping settings. + /// The ID of the account for which to get/update account shipping settings. pub fn account_id(mut self, new_value: &str) -> AccountshippingGetCall<'a, C, NC, A> { self._account_id = new_value.to_string(); self diff --git a/gen/coordinate1/Cargo.toml b/gen/coordinate1/Cargo.toml index 577e02b830..65333d9424 100644 --- a/gen/coordinate1/Cargo.toml +++ b/gen/coordinate1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-coordinate1" -version = "0.1.1+20141215" +version = "0.1.2+20141215" authors = ["Sebastian Thiel "] description = "A complete library to interact with coordinate (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/coordinate1" @@ -16,7 +16,7 @@ keywords = ["coordinate", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/coordinate1/README.md b/gen/coordinate1/README.md index 2ae6fef609..deaccf990d 100644 --- a/gen/coordinate1/README.md +++ b/gen/coordinate1/README.md @@ -1,11 +1,11 @@ The `google-coordinate1` library allows access to all features of the *Google coordinate* service. -This documentation was generated from *coordinate* crate version *0.1.1+20141215*, where *20141215* is the exact revision of the *coordinate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *coordinate* crate version *0.1.2+20141215*, where *20141215* is the exact revision of the *coordinate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *coordinate* *v1* API can be found at the [official documentation site](https://developers.google.com/coordinate/). @@ -35,6 +35,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-coordinate1/struct.Coordinate.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-coordinate1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-coordinate1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-coordinate1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -44,6 +46,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-coordinate1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -83,7 +87,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-coordinate1" as coordinate1; use coordinate1::Job; -use coordinate1::Result; +use coordinate1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use coordinate1::Coordinate; @@ -122,15 +126,17 @@ let result = hub.jobs().update(&req, "teamId", "jobId") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -143,7 +149,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-coordinate1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-coordinate1/trait.ResponseResult.html), it will return that by default. @@ -166,8 +172,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-coordinate1/tr ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-coordinate1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-coordinate1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-coordinate1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-coordinate1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-coordinate1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/coordinate1/src/cmn.rs b/gen/coordinate1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/coordinate1/src/cmn.rs +++ b/gen/coordinate1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/coordinate1/src/lib.rs b/gen/coordinate1/src/lib.rs index 45b11767f3..5cc73b5ba6 100644 --- a/gen/coordinate1/src/lib.rs +++ b/gen/coordinate1/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *coordinate* crate version *0.1.1+20141215*, where *20141215* is the exact revision of the *coordinate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *coordinate* crate version *0.1.2+20141215*, where *20141215* is the exact revision of the *coordinate:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *coordinate* *v1* API can be found at the //! [official documentation site](https://developers.google.com/coordinate/). @@ -35,6 +35,8 @@ //! //! * **[Hub](struct.Coordinate.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -44,6 +46,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -83,7 +87,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-coordinate1" as coordinate1; //! use coordinate1::Job; -//! use coordinate1::Result; +//! use coordinate1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -123,15 +127,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -144,7 +150,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -167,8 +173,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -217,7 +224,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -268,7 +275,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-coordinate1" as coordinate1; /// use coordinate1::Job; -/// use coordinate1::Result; +/// use coordinate1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -308,15 +315,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -337,7 +346,7 @@ impl<'a, C, NC, A> Coordinate Coordinate { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -362,7 +371,7 @@ impl<'a, C, NC, A> Coordinate } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -387,14 +396,14 @@ impl<'a, C, NC, A> Coordinate /// #[derive(Default, Clone, Debug, Deserialize)] pub struct LocationListResponse { - /// A token to provide to get the next page of results. + /// A token to provide to get the next page of results. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Locations in the collection. + /// Locations in the collection. pub items: Vec, - /// Identifies this object as a list of locations. + /// Identifies this object as a list of locations. pub kind: String, - /// Pagination information for token pagination. + /// Pagination information for token pagination. #[serde(alias="tokenPagination")] pub token_pagination: TokenPagination, } @@ -408,11 +417,11 @@ impl ResponseResult for LocationListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobChange { - /// Time at which this change was applied. + /// Time at which this change was applied. pub timestamp: String, - /// Identifies this object as a job change. + /// Identifies this object as a job change. pub kind: String, - /// Change applied to the job. Only the fields that were changed are set. + /// Change applied to the job. Only the fields that were changed are set. pub state: JobState, } @@ -425,11 +434,11 @@ impl Part for JobChange {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct EnumItemDef { - /// Whether the enum item is active. Jobs may contain inactive enum values; however, setting an enum to an inactive value when creating or updating a job will result in a 500 error. + /// Whether the enum item is active. Jobs may contain inactive enum values; however, setting an enum to an inactive value when creating or updating a job will result in a 500 error. pub active: bool, - /// Identifies this object as an enum item definition. + /// Identifies this object as an enum item definition. pub kind: String, - /// Custom field value. + /// Custom field value. pub value: String, } @@ -447,9 +456,9 @@ impl Part for EnumItemDef {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomFieldDefListResponse { - /// Collection of custom field definitions in a team. + /// Collection of custom field definitions in a team. pub items: Vec, - /// Identifies this object as a collection of custom field definitions in a team. + /// Identifies this object as a collection of custom field definitions in a team. pub kind: String, } @@ -462,13 +471,13 @@ impl ResponseResult for CustomFieldDefListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TokenPagination { - /// A token to provide to get the next page of results. + /// A token to provide to get the next page of results. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// A token to provide to get the previous page of results. + /// A token to provide to get the previous page of results. #[serde(alias="previousPageToken")] pub previous_page_token: String, - /// Identifies this object as pagination information. + /// Identifies this object as pagination information. pub kind: String, } @@ -481,14 +490,14 @@ impl Part for TokenPagination {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Location { - /// Latitude. + /// Latitude. pub lat: f64, - /// Identifies this object as a location. + /// Identifies this object as a location. pub kind: String, - /// Address. + /// Address. #[serde(alias="addressLine")] pub address_line: Vec, - /// Longitude. + /// Longitude. pub lng: f64, } @@ -501,11 +510,11 @@ impl Part for Location {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Team { - /// Identifies this object as a team. + /// Identifies this object as a team. pub kind: String, - /// Team id, as found in a coordinate team url e.g. https://coordinate.google.com/f/xyz where "xyz" is the team id. + /// Team id, as found in a coordinate team url e.g. https://coordinate.google.com/f/xyz where "xyz" is the team id. pub id: String, - /// Team name + /// Team name pub name: String, } @@ -518,25 +527,25 @@ impl Part for Team {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct JobState { - /// Identifies this object as a job state. + /// Identifies this object as a job state. pub kind: String, - /// Customer name. + /// Customer name. #[serde(alias="customerName")] pub customer_name: String, - /// Job title. + /// Job title. pub title: String, - /// Note added to the job. + /// Note added to the job. pub note: Vec, - /// Email address of the assignee, or the string "DELETED_USER" if the account is no longer available. + /// Email address of the assignee, or the string "DELETED_USER" if the account is no longer available. pub assignee: String, - /// Customer phone number. + /// Customer phone number. #[serde(alias="customerPhoneNumber")] pub customer_phone_number: String, - /// Job location. + /// Job location. pub location: Location, - /// Job progress. + /// Job progress. pub progress: String, - /// Custom fields. + /// Custom fields. #[serde(alias="customFields")] pub custom_fields: CustomFields, } @@ -550,9 +559,9 @@ impl Part for JobState {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomFields { - /// Identifies this object as a collection of custom fields. + /// Identifies this object as a collection of custom fields. pub kind: String, - /// Collection of custom fields. + /// Collection of custom fields. #[serde(alias="customField")] pub custom_field: Vec, } @@ -571,9 +580,9 @@ impl Part for CustomFields {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct WorkerListResponse { - /// Workers in the collection. + /// Workers in the collection. pub items: Vec, - /// Identifies this object as a list of workers. + /// Identifies this object as a list of workers. pub kind: String, } @@ -586,17 +595,17 @@ impl ResponseResult for WorkerListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct LocationRecord { - /// Latitude. + /// Latitude. pub latitude: f64, - /// The collection time in milliseconds since the epoch. + /// The collection time in milliseconds since the epoch. #[serde(alias="collectionTime")] pub collection_time: String, - /// The location accuracy in meters. This is the radius of a 95% confidence interval around the location measurement. + /// The location accuracy in meters. This is the radius of a 95% confidence interval around the location measurement. #[serde(alias="confidenceRadius")] pub confidence_radius: f64, - /// Identifies this object as a location. + /// Identifies this object as a location. pub kind: String, - /// Longitude. + /// Longitude. pub longitude: f64, } @@ -616,17 +625,17 @@ impl Part for LocationRecord {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Schedule { - /// Job duration in milliseconds. + /// Job duration in milliseconds. pub duration: Option, - /// Identifies this object as a job schedule. + /// Identifies this object as a job schedule. pub kind: Option, - /// Whether the job is scheduled for the whole day. Time of day in start/end times is ignored if this is true. + /// Whether the job is scheduled for the whole day. Time of day in start/end times is ignored if this is true. #[serde(alias="allDay")] pub all_day: Option, - /// Scheduled start time in milliseconds since epoch. + /// Scheduled start time in milliseconds since epoch. #[serde(alias="startTime")] pub start_time: Option, - /// Scheduled end time in milliseconds since epoch. + /// Scheduled end time in milliseconds since epoch. #[serde(alias="endTime")] pub end_time: Option, } @@ -646,9 +655,9 @@ impl ResponseResult for Schedule {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TeamListResponse { - /// Teams in the collection. + /// Teams in the collection. pub items: Vec, - /// Identifies this object as a list of teams. + /// Identifies this object as a list of teams. pub kind: String, } @@ -666,12 +675,12 @@ impl ResponseResult for TeamListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct JobListResponse { - /// A token to provide to get the next page of results. + /// A token to provide to get the next page of results. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Jobs in the collection. + /// Jobs in the collection. pub items: Vec, - /// Identifies this object as a list of jobs. + /// Identifies this object as a list of jobs. pub kind: String, } @@ -684,9 +693,9 @@ impl ResponseResult for JobListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Worker { - /// Identifies this object as a worker. + /// Identifies this object as a worker. pub kind: String, - /// Worker email address. If a worker has been deleted from your team, the email address will appear as DELETED_USER. + /// Worker email address. If a worker has been deleted from your team, the email address will appear as DELETED_USER. pub id: String, } @@ -708,14 +717,14 @@ impl Part for Worker {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Job { - /// Identifies this object as a job. + /// Identifies this object as a job. pub kind: Option, - /// List of job changes since it was created. The first change corresponds to the state of the job when it was created. + /// List of job changes since it was created. The first change corresponds to the state of the job when it was created. #[serde(alias="jobChange")] pub job_change: Option>, - /// Job id. + /// Job id. pub id: Option, - /// Current job state. + /// Current job state. pub state: Option, } @@ -730,21 +739,21 @@ impl ResponseResult for Job {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CustomFieldDef { - /// Identifies this object as a custom field definition. + /// Identifies this object as a custom field definition. pub kind: String, - /// List of enum items for this custom field. Populated only if the field type is enum. Enum fields appear as 'lists' in the Coordinate web and mobile UI. + /// List of enum items for this custom field. Populated only if the field type is enum. Enum fields appear as 'lists' in the Coordinate web and mobile UI. pub enumitems: Vec, - /// Custom field name. + /// Custom field name. pub name: String, - /// Custom field type. + /// Custom field type. #[serde(alias="type")] pub type_: String, - /// Whether the field is required for checkout. + /// Whether the field is required for checkout. #[serde(alias="requiredForCheckout")] pub required_for_checkout: bool, - /// Whether the field is enabled. + /// Whether the field is enabled. pub enabled: bool, - /// Custom field id. + /// Custom field id. pub id: String, } @@ -757,12 +766,12 @@ impl Part for CustomFieldDef {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomField { - /// Identifies this object as a custom field. + /// Identifies this object as a custom field. pub kind: String, - /// Custom field id. + /// Custom field id. #[serde(alias="customFieldId")] pub custom_field_id: String, - /// Custom field value. + /// Custom field value. pub value: String, } @@ -808,13 +817,18 @@ pub struct JobMethods<'a, C, NC, A> hub: &'a Coordinate, } -impl<'a, C, NC, A> ResourceMethodsBuilder for JobMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for JobMethods<'a, C, NC, A> {} impl<'a, C, NC, A> JobMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a job, including all the changes made to the job. + /// Retrieves a job, including all the changes made to the job. + /// + /// # Arguments + /// + /// * `teamId` - Team ID + /// * `jobId` - Job number pub fn get(&self, team_id: &str, job_id: &str) -> JobGetCall<'a, C, NC, A> { JobGetCall { hub: self.hub, @@ -828,7 +842,13 @@ impl<'a, C, NC, A> JobMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a job. Fields that are set in the job state will be updated. + /// Updates a job. Fields that are set in the job state will be updated. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `teamId` - Team ID + /// * `jobId` - Job number pub fn update(&self, request: &Job, team_id: &str, job_id: &str) -> JobUpdateCall<'a, C, NC, A> { JobUpdateCall { hub: self.hub, @@ -853,7 +873,13 @@ impl<'a, C, NC, A> JobMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a job. Fields that are set in the job state will be updated. This method supports patch semantics. + /// Updates a job. Fields that are set in the job state will be updated. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `teamId` - Team ID + /// * `jobId` - Job number pub fn patch(&self, request: &Job, team_id: &str, job_id: &str) -> JobPatchCall<'a, C, NC, A> { JobPatchCall { hub: self.hub, @@ -878,7 +904,11 @@ impl<'a, C, NC, A> JobMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves jobs created or modified since the given timestamp. + /// Retrieves jobs created or modified since the given timestamp. + /// + /// # Arguments + /// + /// * `teamId` - Team ID pub fn list(&self, team_id: &str) -> JobListCall<'a, C, NC, A> { JobListCall { hub: self.hub, @@ -894,7 +924,16 @@ impl<'a, C, NC, A> JobMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new job. Only the state field of the job should be set. + /// Inserts a new job. Only the state field of the job should be set. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `teamId` - Team ID + /// * `address` - Job address as newline (Unix) separated string + /// * `lat` - The latitude coordinate of this job's location. + /// * `lng` - The longitude coordinate of this job's location. + /// * `title` - Job title pub fn insert(&self, request: &Job, team_id: &str, address: &str, lat: f64, lng: f64, title: &str) -> JobInsertCall<'a, C, NC, A> { JobInsertCall { hub: self.hub, @@ -952,13 +991,19 @@ pub struct ScheduleMethods<'a, C, NC, A> hub: &'a Coordinate, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ScheduleMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ScheduleMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ScheduleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Replaces the schedule of a job with the provided schedule. + /// Replaces the schedule of a job with the provided schedule. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `teamId` - Team ID + /// * `jobId` - Job number pub fn update(&self, request: &Schedule, team_id: &str, job_id: &str) -> ScheduleUpdateCall<'a, C, NC, A> { ScheduleUpdateCall { hub: self.hub, @@ -977,7 +1022,13 @@ impl<'a, C, NC, A> ScheduleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Replaces the schedule of a job with the provided schedule. This method supports patch semantics. + /// Replaces the schedule of a job with the provided schedule. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `teamId` - Team ID + /// * `jobId` - Job number pub fn patch(&self, request: &Schedule, team_id: &str, job_id: &str) -> SchedulePatchCall<'a, C, NC, A> { SchedulePatchCall { hub: self.hub, @@ -996,7 +1047,12 @@ impl<'a, C, NC, A> ScheduleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the schedule for a job. + /// Retrieves the schedule for a job. + /// + /// # Arguments + /// + /// * `teamId` - Team ID + /// * `jobId` - Job number pub fn get(&self, team_id: &str, job_id: &str) -> ScheduleGetCall<'a, C, NC, A> { ScheduleGetCall { hub: self.hub, @@ -1045,13 +1101,17 @@ pub struct WorkerMethods<'a, C, NC, A> hub: &'a Coordinate, } -impl<'a, C, NC, A> ResourceMethodsBuilder for WorkerMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for WorkerMethods<'a, C, NC, A> {} impl<'a, C, NC, A> WorkerMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of workers in a team. + /// Retrieves a list of workers in a team. + /// + /// # Arguments + /// + /// * `teamId` - Team ID pub fn list(&self, team_id: &str) -> WorkerListCall<'a, C, NC, A> { WorkerListCall { hub: self.hub, @@ -1099,13 +1159,19 @@ pub struct LocationMethods<'a, C, NC, A> hub: &'a Coordinate, } -impl<'a, C, NC, A> ResourceMethodsBuilder for LocationMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for LocationMethods<'a, C, NC, A> {} impl<'a, C, NC, A> LocationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of locations for a worker. + /// Retrieves a list of locations for a worker. + /// + /// # Arguments + /// + /// * `teamId` - Team ID + /// * `workerEmail` - Worker email address. + /// * `startTimestampMs` - Start timestamp in milliseconds since the epoch. pub fn list(&self, team_id: &str, worker_email: &str, start_timestamp_ms: &str) -> LocationListCall<'a, C, NC, A> { LocationListCall { hub: self.hub, @@ -1157,13 +1223,13 @@ pub struct TeamMethods<'a, C, NC, A> hub: &'a Coordinate, } -impl<'a, C, NC, A> ResourceMethodsBuilder for TeamMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for TeamMethods<'a, C, NC, A> {} impl<'a, C, NC, A> TeamMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of teams for a user. + /// Retrieves a list of teams for a user. pub fn list(&self) -> TeamListCall<'a, C, NC, A> { TeamListCall { hub: self.hub, @@ -1213,13 +1279,17 @@ pub struct CustomFieldDefMethods<'a, C, NC, A> hub: &'a Coordinate, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CustomFieldDefMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CustomFieldDefMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CustomFieldDefMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of custom field definitions for a team. + /// Retrieves a list of custom field definitions for a team. + /// + /// # Arguments + /// + /// * `teamId` - Team ID pub fn list(&self, team_id: &str) -> CustomFieldDefListCall<'a, C, NC, A> { CustomFieldDefListCall { hub: self.hub, @@ -1242,7 +1312,7 @@ impl<'a, C, NC, A> CustomFieldDefMethods<'a, C, NC, A> { /// Retrieves a job, including all the changes made to the job. /// /// A builder for the *get* method supported by a *job* resource. -/// It is not used directly, but through a `JobMethods`. +/// It is not used directly, but through a `JobMethods` instance. /// /// # Example /// @@ -1302,7 +1372,7 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect for &field in ["alt", "teamId", "jobId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1355,7 +1425,7 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1367,7 +1437,6 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect dlg.pre_request(); req.send() - }; match req_result { @@ -1377,7 +1446,7 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1388,7 +1457,7 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1397,13 +1466,13 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1415,7 +1484,7 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Team ID + /// Team ID pub fn team_id(mut self, new_value: &str) -> JobGetCall<'a, C, NC, A> { self._team_id = new_value.to_string(); self @@ -1425,7 +1494,7 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Job number + /// Job number pub fn job_id(mut self, new_value: &str) -> JobGetCall<'a, C, NC, A> { self._job_id = new_value.to_string(); self @@ -1486,7 +1555,7 @@ impl<'a, C, NC, A> JobGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Updates a job. Fields that are set in the job state will be updated. /// /// A builder for the *update* method supported by a *job* resource. -/// It is not used directly, but through a `JobMethods`. +/// It is not used directly, but through a `JobMethods` instance. /// /// # Example /// @@ -1607,7 +1676,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "teamId", "jobId", "title", "progress", "note", "lng", "lat", "customerPhoneNumber", "customerName", "customField", "assignee", "address"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1664,7 +1733,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1680,7 +1749,6 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -1690,7 +1758,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1701,7 +1769,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1710,13 +1778,13 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1737,7 +1805,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Team ID + /// Team ID pub fn team_id(mut self, new_value: &str) -> JobUpdateCall<'a, C, NC, A> { self._team_id = new_value.to_string(); self @@ -1747,7 +1815,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Job number + /// Job number pub fn job_id(mut self, new_value: &str) -> JobUpdateCall<'a, C, NC, A> { self._job_id = new_value.to_string(); self @@ -1755,7 +1823,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *title* query property to the given value. /// /// - /// Job title + /// Job title pub fn title(mut self, new_value: &str) -> JobUpdateCall<'a, C, NC, A> { self._title = Some(new_value.to_string()); self @@ -1763,7 +1831,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *progress* query property to the given value. /// /// - /// Job progress + /// Job progress pub fn progress(mut self, new_value: &str) -> JobUpdateCall<'a, C, NC, A> { self._progress = Some(new_value.to_string()); self @@ -1771,7 +1839,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *note* query property to the given value. /// /// - /// Job note as newline (Unix) separated string + /// Job note as newline (Unix) separated string pub fn note(mut self, new_value: &str) -> JobUpdateCall<'a, C, NC, A> { self._note = Some(new_value.to_string()); self @@ -1779,7 +1847,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *lng* query property to the given value. /// /// - /// The longitude coordinate of this job's location. + /// The longitude coordinate of this job's location. pub fn lng(mut self, new_value: f64) -> JobUpdateCall<'a, C, NC, A> { self._lng = Some(new_value); self @@ -1787,7 +1855,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *lat* query property to the given value. /// /// - /// The latitude coordinate of this job's location. + /// The latitude coordinate of this job's location. pub fn lat(mut self, new_value: f64) -> JobUpdateCall<'a, C, NC, A> { self._lat = Some(new_value); self @@ -1795,7 +1863,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *customer phone number* query property to the given value. /// /// - /// Customer phone number + /// Customer phone number pub fn customer_phone_number(mut self, new_value: &str) -> JobUpdateCall<'a, C, NC, A> { self._customer_phone_number = Some(new_value.to_string()); self @@ -1803,7 +1871,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *customer name* query property to the given value. /// /// - /// Customer name + /// Customer name pub fn customer_name(mut self, new_value: &str) -> JobUpdateCall<'a, C, NC, A> { self._customer_name = Some(new_value.to_string()); self @@ -1812,7 +1880,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500. + /// Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500. pub fn add_custom_field(mut self, new_value: &str) -> JobUpdateCall<'a, C, NC, A> { self._custom_field.push(new_value.to_string()); self @@ -1820,7 +1888,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *assignee* query property to the given value. /// /// - /// Assignee email address, or empty string to unassign. + /// Assignee email address, or empty string to unassign. pub fn assignee(mut self, new_value: &str) -> JobUpdateCall<'a, C, NC, A> { self._assignee = Some(new_value.to_string()); self @@ -1828,7 +1896,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *address* query property to the given value. /// /// - /// Job address as newline (Unix) separated string + /// Job address as newline (Unix) separated string pub fn address(mut self, new_value: &str) -> JobUpdateCall<'a, C, NC, A> { self._address = Some(new_value.to_string()); self @@ -1889,7 +1957,7 @@ impl<'a, C, NC, A> JobUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Updates a job. Fields that are set in the job state will be updated. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *job* resource. -/// It is not used directly, but through a `JobMethods`. +/// It is not used directly, but through a `JobMethods` instance. /// /// # Example /// @@ -2010,7 +2078,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "teamId", "jobId", "title", "progress", "note", "lng", "lat", "customerPhoneNumber", "customerName", "customField", "assignee", "address"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2067,7 +2135,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2083,7 +2151,6 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -2093,7 +2160,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2104,7 +2171,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2113,13 +2180,13 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2140,7 +2207,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Team ID + /// Team ID pub fn team_id(mut self, new_value: &str) -> JobPatchCall<'a, C, NC, A> { self._team_id = new_value.to_string(); self @@ -2150,7 +2217,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Job number + /// Job number pub fn job_id(mut self, new_value: &str) -> JobPatchCall<'a, C, NC, A> { self._job_id = new_value.to_string(); self @@ -2158,7 +2225,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *title* query property to the given value. /// /// - /// Job title + /// Job title pub fn title(mut self, new_value: &str) -> JobPatchCall<'a, C, NC, A> { self._title = Some(new_value.to_string()); self @@ -2166,7 +2233,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *progress* query property to the given value. /// /// - /// Job progress + /// Job progress pub fn progress(mut self, new_value: &str) -> JobPatchCall<'a, C, NC, A> { self._progress = Some(new_value.to_string()); self @@ -2174,7 +2241,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *note* query property to the given value. /// /// - /// Job note as newline (Unix) separated string + /// Job note as newline (Unix) separated string pub fn note(mut self, new_value: &str) -> JobPatchCall<'a, C, NC, A> { self._note = Some(new_value.to_string()); self @@ -2182,7 +2249,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *lng* query property to the given value. /// /// - /// The longitude coordinate of this job's location. + /// The longitude coordinate of this job's location. pub fn lng(mut self, new_value: f64) -> JobPatchCall<'a, C, NC, A> { self._lng = Some(new_value); self @@ -2190,7 +2257,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *lat* query property to the given value. /// /// - /// The latitude coordinate of this job's location. + /// The latitude coordinate of this job's location. pub fn lat(mut self, new_value: f64) -> JobPatchCall<'a, C, NC, A> { self._lat = Some(new_value); self @@ -2198,7 +2265,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *customer phone number* query property to the given value. /// /// - /// Customer phone number + /// Customer phone number pub fn customer_phone_number(mut self, new_value: &str) -> JobPatchCall<'a, C, NC, A> { self._customer_phone_number = Some(new_value.to_string()); self @@ -2206,7 +2273,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *customer name* query property to the given value. /// /// - /// Customer name + /// Customer name pub fn customer_name(mut self, new_value: &str) -> JobPatchCall<'a, C, NC, A> { self._customer_name = Some(new_value.to_string()); self @@ -2215,7 +2282,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500. + /// Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500. pub fn add_custom_field(mut self, new_value: &str) -> JobPatchCall<'a, C, NC, A> { self._custom_field.push(new_value.to_string()); self @@ -2223,7 +2290,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *assignee* query property to the given value. /// /// - /// Assignee email address, or empty string to unassign. + /// Assignee email address, or empty string to unassign. pub fn assignee(mut self, new_value: &str) -> JobPatchCall<'a, C, NC, A> { self._assignee = Some(new_value.to_string()); self @@ -2231,7 +2298,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *address* query property to the given value. /// /// - /// Job address as newline (Unix) separated string + /// Job address as newline (Unix) separated string pub fn address(mut self, new_value: &str) -> JobPatchCall<'a, C, NC, A> { self._address = Some(new_value.to_string()); self @@ -2292,7 +2359,7 @@ impl<'a, C, NC, A> JobPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Retrieves jobs created or modified since the given timestamp. /// /// A builder for the *list* method supported by a *job* resource. -/// It is not used directly, but through a `JobMethods`. +/// It is not used directly, but through a `JobMethods` instance. /// /// # Example /// @@ -2365,7 +2432,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "teamId", "pageToken", "minModifiedTimestampMs", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2418,7 +2485,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2430,7 +2497,6 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -2440,7 +2506,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2451,7 +2517,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2460,13 +2526,13 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2478,7 +2544,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Team ID + /// Team ID pub fn team_id(mut self, new_value: &str) -> JobListCall<'a, C, NC, A> { self._team_id = new_value.to_string(); self @@ -2486,7 +2552,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *page token* query property to the given value. /// /// - /// Continuation token + /// Continuation token pub fn page_token(mut self, new_value: &str) -> JobListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2494,7 +2560,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *min modified timestamp ms* query property to the given value. /// /// - /// Minimum time a job was modified in milliseconds since epoch. + /// Minimum time a job was modified in milliseconds since epoch. pub fn min_modified_timestamp_ms(mut self, new_value: &str) -> JobListCall<'a, C, NC, A> { self._min_modified_timestamp_ms = Some(new_value.to_string()); self @@ -2502,7 +2568,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return in one page. + /// Maximum number of results to return in one page. pub fn max_results(mut self, new_value: u32) -> JobListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2563,7 +2629,7 @@ impl<'a, C, NC, A> JobListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Inserts a new job. Only the state field of the job should be set. /// /// A builder for the *insert* method supported by a *job* resource. -/// It is not used directly, but through a `JobMethods`. +/// It is not used directly, but through a `JobMethods` instance. /// /// # Example /// @@ -2665,7 +2731,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "teamId", "address", "lat", "lng", "title", "note", "customerPhoneNumber", "customerName", "customField", "assignee"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2722,7 +2788,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2738,7 +2804,6 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -2748,7 +2813,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2759,7 +2824,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2768,13 +2833,13 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2795,7 +2860,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Team ID + /// Team ID pub fn team_id(mut self, new_value: &str) -> JobInsertCall<'a, C, NC, A> { self._team_id = new_value.to_string(); self @@ -2805,7 +2870,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Job address as newline (Unix) separated string + /// Job address as newline (Unix) separated string pub fn address(mut self, new_value: &str) -> JobInsertCall<'a, C, NC, A> { self._address = new_value.to_string(); self @@ -2815,7 +2880,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The latitude coordinate of this job's location. + /// The latitude coordinate of this job's location. pub fn lat(mut self, new_value: f64) -> JobInsertCall<'a, C, NC, A> { self._lat = new_value; self @@ -2825,7 +2890,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The longitude coordinate of this job's location. + /// The longitude coordinate of this job's location. pub fn lng(mut self, new_value: f64) -> JobInsertCall<'a, C, NC, A> { self._lng = new_value; self @@ -2835,7 +2900,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Job title + /// Job title pub fn title(mut self, new_value: &str) -> JobInsertCall<'a, C, NC, A> { self._title = new_value.to_string(); self @@ -2843,7 +2908,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *note* query property to the given value. /// /// - /// Job note as newline (Unix) separated string + /// Job note as newline (Unix) separated string pub fn note(mut self, new_value: &str) -> JobInsertCall<'a, C, NC, A> { self._note = Some(new_value.to_string()); self @@ -2851,7 +2916,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *customer phone number* query property to the given value. /// /// - /// Customer phone number + /// Customer phone number pub fn customer_phone_number(mut self, new_value: &str) -> JobInsertCall<'a, C, NC, A> { self._customer_phone_number = Some(new_value.to_string()); self @@ -2859,7 +2924,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *customer name* query property to the given value. /// /// - /// Customer name + /// Customer name pub fn customer_name(mut self, new_value: &str) -> JobInsertCall<'a, C, NC, A> { self._customer_name = Some(new_value.to_string()); self @@ -2868,7 +2933,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500. + /// Sets the value of custom fields. To set a custom field, pass the field id (from /team/teamId/custom_fields), a URL escaped '=' character, and the desired value as a parameter. For example, customField=12%3DAlice. Repeat the parameter for each custom field. Note that '=' cannot appear in the parameter value. Specifying an invalid, or inactive enum field will result in an error 500. pub fn add_custom_field(mut self, new_value: &str) -> JobInsertCall<'a, C, NC, A> { self._custom_field.push(new_value.to_string()); self @@ -2876,7 +2941,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *assignee* query property to the given value. /// /// - /// Assignee email address, or empty string to unassign. + /// Assignee email address, or empty string to unassign. pub fn assignee(mut self, new_value: &str) -> JobInsertCall<'a, C, NC, A> { self._assignee = Some(new_value.to_string()); self @@ -2937,7 +3002,7 @@ impl<'a, C, NC, A> JobInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Replaces the schedule of a job with the provided schedule. /// /// A builder for the *update* method supported by a *schedule* resource. -/// It is not used directly, but through a `ScheduleMethods`. +/// It is not used directly, but through a `ScheduleMethods` instance. /// /// # Example /// @@ -3024,7 +3089,7 @@ impl<'a, C, NC, A> ScheduleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "teamId", "jobId", "startTime", "endTime", "duration", "allDay"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3081,7 +3146,7 @@ impl<'a, C, NC, A> ScheduleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3097,7 +3162,6 @@ impl<'a, C, NC, A> ScheduleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -3107,7 +3171,7 @@ impl<'a, C, NC, A> ScheduleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3118,7 +3182,7 @@ impl<'a, C, NC, A> ScheduleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3127,13 +3191,13 @@ impl<'a, C, NC, A> ScheduleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3154,7 +3218,7 @@ impl<'a, C, NC, A> ScheduleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Team ID + /// Team ID pub fn team_id(mut self, new_value: &str) -> ScheduleUpdateCall<'a, C, NC, A> { self._team_id = new_value.to_string(); self @@ -3164,7 +3228,7 @@ impl<'a, C, NC, A> ScheduleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Job number + /// Job number pub fn job_id(mut self, new_value: &str) -> ScheduleUpdateCall<'a, C, NC, A> { self._job_id = new_value.to_string(); self @@ -3172,7 +3236,7 @@ impl<'a, C, NC, A> ScheduleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *start time* query property to the given value. /// /// - /// Scheduled start time in milliseconds since epoch. + /// Scheduled start time in milliseconds since epoch. pub fn start_time(mut self, new_value: &str) -> ScheduleUpdateCall<'a, C, NC, A> { self._start_time = Some(new_value.to_string()); self @@ -3180,7 +3244,7 @@ impl<'a, C, NC, A> ScheduleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *end time* query property to the given value. /// /// - /// Scheduled end time in milliseconds since epoch. + /// Scheduled end time in milliseconds since epoch. pub fn end_time(mut self, new_value: &str) -> ScheduleUpdateCall<'a, C, NC, A> { self._end_time = Some(new_value.to_string()); self @@ -3188,7 +3252,7 @@ impl<'a, C, NC, A> ScheduleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *duration* query property to the given value. /// /// - /// Job duration in milliseconds. + /// Job duration in milliseconds. pub fn duration(mut self, new_value: &str) -> ScheduleUpdateCall<'a, C, NC, A> { self._duration = Some(new_value.to_string()); self @@ -3196,7 +3260,7 @@ impl<'a, C, NC, A> ScheduleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *all day* query property to the given value. /// /// - /// Whether the job is scheduled for the whole day. Time of day in start/end times is ignored if this is true. + /// Whether the job is scheduled for the whole day. Time of day in start/end times is ignored if this is true. pub fn all_day(mut self, new_value: bool) -> ScheduleUpdateCall<'a, C, NC, A> { self._all_day = Some(new_value); self @@ -3257,7 +3321,7 @@ impl<'a, C, NC, A> ScheduleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Replaces the schedule of a job with the provided schedule. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *schedule* resource. -/// It is not used directly, but through a `ScheduleMethods`. +/// It is not used directly, but through a `ScheduleMethods` instance. /// /// # Example /// @@ -3344,7 +3408,7 @@ impl<'a, C, NC, A> SchedulePatchCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "teamId", "jobId", "startTime", "endTime", "duration", "allDay"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3401,7 +3465,7 @@ impl<'a, C, NC, A> SchedulePatchCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3417,7 +3481,6 @@ impl<'a, C, NC, A> SchedulePatchCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -3427,7 +3490,7 @@ impl<'a, C, NC, A> SchedulePatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3438,7 +3501,7 @@ impl<'a, C, NC, A> SchedulePatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3447,13 +3510,13 @@ impl<'a, C, NC, A> SchedulePatchCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3474,7 +3537,7 @@ impl<'a, C, NC, A> SchedulePatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Team ID + /// Team ID pub fn team_id(mut self, new_value: &str) -> SchedulePatchCall<'a, C, NC, A> { self._team_id = new_value.to_string(); self @@ -3484,7 +3547,7 @@ impl<'a, C, NC, A> SchedulePatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Job number + /// Job number pub fn job_id(mut self, new_value: &str) -> SchedulePatchCall<'a, C, NC, A> { self._job_id = new_value.to_string(); self @@ -3492,7 +3555,7 @@ impl<'a, C, NC, A> SchedulePatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *start time* query property to the given value. /// /// - /// Scheduled start time in milliseconds since epoch. + /// Scheduled start time in milliseconds since epoch. pub fn start_time(mut self, new_value: &str) -> SchedulePatchCall<'a, C, NC, A> { self._start_time = Some(new_value.to_string()); self @@ -3500,7 +3563,7 @@ impl<'a, C, NC, A> SchedulePatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *end time* query property to the given value. /// /// - /// Scheduled end time in milliseconds since epoch. + /// Scheduled end time in milliseconds since epoch. pub fn end_time(mut self, new_value: &str) -> SchedulePatchCall<'a, C, NC, A> { self._end_time = Some(new_value.to_string()); self @@ -3508,7 +3571,7 @@ impl<'a, C, NC, A> SchedulePatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *duration* query property to the given value. /// /// - /// Job duration in milliseconds. + /// Job duration in milliseconds. pub fn duration(mut self, new_value: &str) -> SchedulePatchCall<'a, C, NC, A> { self._duration = Some(new_value.to_string()); self @@ -3516,7 +3579,7 @@ impl<'a, C, NC, A> SchedulePatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *all day* query property to the given value. /// /// - /// Whether the job is scheduled for the whole day. Time of day in start/end times is ignored if this is true. + /// Whether the job is scheduled for the whole day. Time of day in start/end times is ignored if this is true. pub fn all_day(mut self, new_value: bool) -> SchedulePatchCall<'a, C, NC, A> { self._all_day = Some(new_value); self @@ -3577,7 +3640,7 @@ impl<'a, C, NC, A> SchedulePatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Retrieves the schedule for a job. /// /// A builder for the *get* method supported by a *schedule* resource. -/// It is not used directly, but through a `ScheduleMethods`. +/// It is not used directly, but through a `ScheduleMethods` instance. /// /// # Example /// @@ -3637,7 +3700,7 @@ impl<'a, C, NC, A> ScheduleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "teamId", "jobId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3690,7 +3753,7 @@ impl<'a, C, NC, A> ScheduleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3702,7 +3765,6 @@ impl<'a, C, NC, A> ScheduleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -3712,7 +3774,7 @@ impl<'a, C, NC, A> ScheduleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3723,7 +3785,7 @@ impl<'a, C, NC, A> ScheduleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3732,13 +3794,13 @@ impl<'a, C, NC, A> ScheduleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3750,7 +3812,7 @@ impl<'a, C, NC, A> ScheduleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Team ID + /// Team ID pub fn team_id(mut self, new_value: &str) -> ScheduleGetCall<'a, C, NC, A> { self._team_id = new_value.to_string(); self @@ -3760,7 +3822,7 @@ impl<'a, C, NC, A> ScheduleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Job number + /// Job number pub fn job_id(mut self, new_value: &str) -> ScheduleGetCall<'a, C, NC, A> { self._job_id = new_value.to_string(); self @@ -3821,7 +3883,7 @@ impl<'a, C, NC, A> ScheduleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Retrieves a list of workers in a team. /// /// A builder for the *list* method supported by a *worker* resource. -/// It is not used directly, but through a `WorkerMethods`. +/// It is not used directly, but through a `WorkerMethods` instance. /// /// # Example /// @@ -3879,7 +3941,7 @@ impl<'a, C, NC, A> WorkerListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "teamId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3932,7 +3994,7 @@ impl<'a, C, NC, A> WorkerListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3944,7 +4006,6 @@ impl<'a, C, NC, A> WorkerListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -3954,7 +4015,7 @@ impl<'a, C, NC, A> WorkerListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3965,7 +4026,7 @@ impl<'a, C, NC, A> WorkerListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3974,13 +4035,13 @@ impl<'a, C, NC, A> WorkerListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3992,7 +4053,7 @@ impl<'a, C, NC, A> WorkerListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Team ID + /// Team ID pub fn team_id(mut self, new_value: &str) -> WorkerListCall<'a, C, NC, A> { self._team_id = new_value.to_string(); self @@ -4053,7 +4114,7 @@ impl<'a, C, NC, A> WorkerListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Retrieves a list of locations for a worker. /// /// A builder for the *list* method supported by a *location* resource. -/// It is not used directly, but through a `LocationMethods`. +/// It is not used directly, but through a `LocationMethods` instance. /// /// # Example /// @@ -4125,7 +4186,7 @@ impl<'a, C, NC, A> LocationListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "teamId", "workerEmail", "startTimestampMs", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4178,7 +4239,7 @@ impl<'a, C, NC, A> LocationListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4190,7 +4251,6 @@ impl<'a, C, NC, A> LocationListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -4200,7 +4260,7 @@ impl<'a, C, NC, A> LocationListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4211,7 +4271,7 @@ impl<'a, C, NC, A> LocationListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4220,13 +4280,13 @@ impl<'a, C, NC, A> LocationListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4238,7 +4298,7 @@ impl<'a, C, NC, A> LocationListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Team ID + /// Team ID pub fn team_id(mut self, new_value: &str) -> LocationListCall<'a, C, NC, A> { self._team_id = new_value.to_string(); self @@ -4248,7 +4308,7 @@ impl<'a, C, NC, A> LocationListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Worker email address. + /// Worker email address. pub fn worker_email(mut self, new_value: &str) -> LocationListCall<'a, C, NC, A> { self._worker_email = new_value.to_string(); self @@ -4258,7 +4318,7 @@ impl<'a, C, NC, A> LocationListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Start timestamp in milliseconds since the epoch. + /// Start timestamp in milliseconds since the epoch. pub fn start_timestamp_ms(mut self, new_value: &str) -> LocationListCall<'a, C, NC, A> { self._start_timestamp_ms = new_value.to_string(); self @@ -4266,7 +4326,7 @@ impl<'a, C, NC, A> LocationListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// Continuation token + /// Continuation token pub fn page_token(mut self, new_value: &str) -> LocationListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -4274,7 +4334,7 @@ impl<'a, C, NC, A> LocationListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return in one page. + /// Maximum number of results to return in one page. pub fn max_results(mut self, new_value: u32) -> LocationListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -4335,7 +4395,7 @@ impl<'a, C, NC, A> LocationListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Retrieves a list of teams for a user. /// /// A builder for the *list* method supported by a *team* resource. -/// It is not used directly, but through a `TeamMethods`. +/// It is not used directly, but through a `TeamMethods` instance. /// /// # Example /// @@ -4406,7 +4466,7 @@ impl<'a, C, NC, A> TeamListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "worker", "dispatcher", "admin"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4435,7 +4495,7 @@ impl<'a, C, NC, A> TeamListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4447,7 +4507,6 @@ impl<'a, C, NC, A> TeamListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -4457,7 +4516,7 @@ impl<'a, C, NC, A> TeamListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4468,7 +4527,7 @@ impl<'a, C, NC, A> TeamListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4477,13 +4536,13 @@ impl<'a, C, NC, A> TeamListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4493,7 +4552,7 @@ impl<'a, C, NC, A> TeamListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *worker* query property to the given value. /// /// - /// Whether to include teams for which the user has the Worker role. + /// Whether to include teams for which the user has the Worker role. pub fn worker(mut self, new_value: bool) -> TeamListCall<'a, C, NC, A> { self._worker = Some(new_value); self @@ -4501,7 +4560,7 @@ impl<'a, C, NC, A> TeamListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *dispatcher* query property to the given value. /// /// - /// Whether to include teams for which the user has the Dispatcher role. + /// Whether to include teams for which the user has the Dispatcher role. pub fn dispatcher(mut self, new_value: bool) -> TeamListCall<'a, C, NC, A> { self._dispatcher = Some(new_value); self @@ -4509,7 +4568,7 @@ impl<'a, C, NC, A> TeamListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *admin* query property to the given value. /// /// - /// Whether to include teams for which the user has the Admin role. + /// Whether to include teams for which the user has the Admin role. pub fn admin(mut self, new_value: bool) -> TeamListCall<'a, C, NC, A> { self._admin = Some(new_value); self @@ -4570,7 +4629,7 @@ impl<'a, C, NC, A> TeamListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Retrieves a list of custom field definitions for a team. /// /// A builder for the *list* method supported by a *customFieldDef* resource. -/// It is not used directly, but through a `CustomFieldDefMethods`. +/// It is not used directly, but through a `CustomFieldDefMethods` instance. /// /// # Example /// @@ -4628,7 +4687,7 @@ impl<'a, C, NC, A> CustomFieldDefListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "teamId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -4681,7 +4740,7 @@ impl<'a, C, NC, A> CustomFieldDefListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -4693,7 +4752,6 @@ impl<'a, C, NC, A> CustomFieldDefListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -4703,7 +4761,7 @@ impl<'a, C, NC, A> CustomFieldDefListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -4714,7 +4772,7 @@ impl<'a, C, NC, A> CustomFieldDefListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -4723,13 +4781,13 @@ impl<'a, C, NC, A> CustomFieldDefListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -4741,7 +4799,7 @@ impl<'a, C, NC, A> CustomFieldDefListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Team ID + /// Team ID pub fn team_id(mut self, new_value: &str) -> CustomFieldDefListCall<'a, C, NC, A> { self._team_id = new_value.to_string(); self diff --git a/gen/customsearch1/Cargo.toml b/gen/customsearch1/Cargo.toml index 726ad7a033..b559eb2d71 100644 --- a/gen/customsearch1/Cargo.toml +++ b/gen/customsearch1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-customsearch1" -version = "0.1.1+20131205" +version = "0.1.2+20131205" authors = ["Sebastian Thiel "] description = "A complete library to interact with customsearch (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/customsearch1" @@ -16,7 +16,7 @@ keywords = ["customsearch", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/customsearch1/README.md b/gen/customsearch1/README.md index 07e5d110c4..6a5559f8d7 100644 --- a/gen/customsearch1/README.md +++ b/gen/customsearch1/README.md @@ -1,11 +1,11 @@ The `google-customsearch1` library allows access to all features of the *Google customsearch* service. -This documentation was generated from *customsearch* crate version *0.1.1+20131205*, where *20131205* is the exact revision of the *customsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *customsearch* crate version *0.1.2+20131205*, where *20131205* is the exact revision of the *customsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *customsearch* *v1* API can be found at the [official documentation site](https://developers.google.com/custom-search/v1/using_rest). @@ -25,6 +25,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-customsearch1/struct.Customsearch.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-customsearch1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-customsearch1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-customsearch1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -34,6 +36,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-customsearch1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -68,7 +72,7 @@ google-customsearch1 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-customsearch1" as customsearch1; -use customsearch1::Result; +use customsearch1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use customsearch1::Customsearch; @@ -123,15 +127,17 @@ let result = hub.cse().list("q") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -144,7 +150,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-customsearch1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-customsearch1/trait.ResponseResult.html), it will return that by default. @@ -167,8 +173,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-customsearch1/ ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-customsearch1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-customsearch1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-customsearch1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-customsearch1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-customsearch1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/customsearch1/src/cmn.rs b/gen/customsearch1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/customsearch1/src/cmn.rs +++ b/gen/customsearch1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/customsearch1/src/lib.rs b/gen/customsearch1/src/lib.rs index f606d087e1..e366145fc4 100644 --- a/gen/customsearch1/src/lib.rs +++ b/gen/customsearch1/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *customsearch* crate version *0.1.1+20131205*, where *20131205* is the exact revision of the *customsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *customsearch* crate version *0.1.2+20131205*, where *20131205* is the exact revision of the *customsearch:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *customsearch* *v1* API can be found at the //! [official documentation site](https://developers.google.com/custom-search/v1/using_rest). @@ -25,6 +25,8 @@ //! //! * **[Hub](struct.Customsearch.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -34,6 +36,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -68,7 +72,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-customsearch1" as customsearch1; -//! use customsearch1::Result; +//! use customsearch1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -124,15 +128,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -145,7 +151,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -168,8 +174,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -218,7 +225,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -242,7 +249,7 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, Re /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-customsearch1" as customsearch1; -/// use customsearch1::Result; +/// use customsearch1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -298,15 +305,17 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, Re /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -327,7 +336,7 @@ impl<'a, C, NC, A> Customsearch Customsearch { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -337,7 +346,7 @@ impl<'a, C, NC, A> Customsearch } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -357,24 +366,24 @@ impl<'a, C, NC, A> Customsearch /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ResultImage { - /// no description provided + /// no description provided pub width: i32, - /// no description provided + /// no description provided #[serde(alias="contextLink")] pub context_link: String, - /// no description provided + /// no description provided #[serde(alias="thumbnailWidth")] pub thumbnail_width: i32, - /// no description provided + /// no description provided #[serde(alias="thumbnailLink")] pub thumbnail_link: String, - /// no description provided + /// no description provided #[serde(alias="byteSize")] pub byte_size: i32, - /// no description provided + /// no description provided #[serde(alias="thumbnailHeight")] pub thumbnail_height: i32, - /// no description provided + /// no description provided pub height: i32, } @@ -393,21 +402,21 @@ impl Part for ResultImage {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Search { - /// no description provided + /// no description provided pub promotions: Vec, - /// no description provided + /// no description provided pub kind: String, - /// no description provided + /// no description provided pub url: SearchUrl, - /// no description provided + /// no description provided pub items: Vec, - /// no description provided + /// no description provided pub context: Context, - /// no description provided + /// no description provided pub queries: HashMap>, - /// no description provided + /// no description provided pub spelling: SearchSpelling, - /// no description provided + /// no description provided #[serde(alias="searchInformation")] pub search_information: SearchSearchInformation, } @@ -421,11 +430,11 @@ impl ResponseResult for Search {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PromotionImage { - /// no description provided + /// no description provided pub source: String, - /// no description provided + /// no description provided pub height: i32, - /// no description provided + /// no description provided pub width: i32, } @@ -439,10 +448,10 @@ impl Part for PromotionImage {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SearchUrl { - /// no description provided + /// no description provided #[serde(alias="type")] pub type_: String, - /// no description provided + /// no description provided pub template: String, } @@ -456,10 +465,10 @@ impl Part for SearchUrl {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SearchSpelling { - /// no description provided + /// no description provided #[serde(alias="correctedQuery")] pub corrected_query: String, - /// no description provided + /// no description provided #[serde(alias="htmlCorrectedQuery")] pub html_corrected_query: String, } @@ -474,14 +483,14 @@ impl Part for SearchSpelling {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PromotionBodyLines { - /// no description provided + /// no description provided pub url: String, - /// no description provided + /// no description provided #[serde(alias="htmlTitle")] pub html_title: String, - /// no description provided + /// no description provided pub link: String, - /// no description provided + /// no description provided pub title: String, } @@ -495,41 +504,41 @@ impl Part for PromotionBodyLines {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ResultType { - /// no description provided + /// no description provided pub kind: String, - /// no description provided + /// no description provided pub labels: Vec, - /// no description provided + /// no description provided pub title: String, - /// no description provided + /// no description provided #[serde(alias="displayLink")] pub display_link: String, - /// no description provided + /// no description provided #[serde(alias="cacheId")] pub cache_id: String, - /// no description provided + /// no description provided #[serde(alias="formattedUrl")] pub formatted_url: String, - /// no description provided + /// no description provided #[serde(alias="htmlFormattedUrl")] pub html_formatted_url: String, - /// no description provided + /// no description provided pub pagemap: HashMap>>, - /// no description provided + /// no description provided #[serde(alias="fileFormat")] pub file_format: String, - /// no description provided + /// no description provided pub snippet: String, - /// no description provided + /// no description provided #[serde(alias="htmlSnippet")] pub html_snippet: String, - /// no description provided + /// no description provided pub link: String, - /// no description provided + /// no description provided pub image: ResultImage, - /// no description provided + /// no description provided pub mime: String, - /// no description provided + /// no description provided #[serde(alias="htmlTitle")] pub html_title: String, } @@ -543,9 +552,9 @@ impl Part for ResultType {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Context { - /// no description provided + /// no description provided pub facets: Vec>, - /// no description provided + /// no description provided pub title: String, } @@ -558,11 +567,11 @@ impl Part for Context {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ContextFacets { - /// no description provided + /// no description provided pub label_with_op: String, - /// no description provided + /// no description provided pub anchor: String, - /// no description provided + /// no description provided pub label: String, } @@ -576,102 +585,102 @@ impl Part for ContextFacets {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Query { - /// no description provided + /// no description provided #[serde(alias="dateRestrict")] pub date_restrict: String, - /// no description provided + /// no description provided #[serde(alias="inputEncoding")] pub input_encoding: String, - /// no description provided + /// no description provided #[serde(alias="orTerms")] pub or_terms: String, - /// no description provided + /// no description provided #[serde(alias="highRange")] pub high_range: String, - /// no description provided + /// no description provided pub cx: String, - /// no description provided + /// no description provided #[serde(alias="startPage")] pub start_page: i32, - /// no description provided + /// no description provided #[serde(alias="disableCnTwTranslation")] pub disable_cn_tw_translation: String, - /// no description provided + /// no description provided pub cr: String, - /// no description provided + /// no description provided #[serde(alias="imgType")] pub img_type: String, - /// no description provided + /// no description provided #[serde(alias="relatedSite")] pub related_site: String, - /// no description provided + /// no description provided pub gl: String, - /// no description provided + /// no description provided #[serde(alias="searchType")] pub search_type: String, - /// no description provided + /// no description provided pub title: String, - /// no description provided + /// no description provided #[serde(alias="googleHost")] pub google_host: String, - /// no description provided + /// no description provided #[serde(alias="fileType")] pub file_type: String, - /// no description provided + /// no description provided #[serde(alias="imgDominantColor")] pub img_dominant_color: String, - /// no description provided + /// no description provided #[serde(alias="siteSearch")] pub site_search: String, - /// no description provided + /// no description provided pub cref: String, - /// no description provided + /// no description provided pub sort: String, - /// no description provided + /// no description provided pub hq: String, - /// no description provided + /// no description provided #[serde(alias="outputEncoding")] pub output_encoding: String, - /// no description provided + /// no description provided pub safe: String, - /// no description provided + /// no description provided #[serde(alias="searchTerms")] pub search_terms: String, - /// no description provided + /// no description provided #[serde(alias="exactTerms")] pub exact_terms: String, - /// no description provided + /// no description provided #[serde(alias="imgColorType")] pub img_color_type: String, - /// no description provided + /// no description provided pub hl: String, - /// no description provided + /// no description provided #[serde(alias="totalResults")] pub total_results: String, - /// no description provided + /// no description provided #[serde(alias="lowRange")] pub low_range: String, - /// no description provided + /// no description provided pub count: i32, - /// no description provided + /// no description provided #[serde(alias="imgSize")] pub img_size: String, - /// no description provided + /// no description provided pub language: String, - /// no description provided + /// no description provided pub rights: String, - /// no description provided + /// no description provided #[serde(alias="startIndex")] pub start_index: i32, - /// no description provided + /// no description provided #[serde(alias="excludeTerms")] pub exclude_terms: String, - /// no description provided + /// no description provided pub filter: String, - /// no description provided + /// no description provided #[serde(alias="linkSite")] pub link_site: String, - /// no description provided + /// no description provided #[serde(alias="siteSearchFilter")] pub site_search_filter: String, } @@ -685,20 +694,20 @@ impl Part for Query {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Promotion { - /// no description provided + /// no description provided #[serde(alias="bodyLines")] pub body_lines: Vec, - /// no description provided + /// no description provided pub title: String, - /// no description provided + /// no description provided pub link: String, - /// no description provided + /// no description provided #[serde(alias="displayLink")] pub display_link: String, - /// no description provided + /// no description provided #[serde(alias="htmlTitle")] pub html_title: String, - /// no description provided + /// no description provided pub image: PromotionImage, } @@ -711,16 +720,16 @@ impl Part for Promotion {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SearchSearchInformation { - /// no description provided + /// no description provided #[serde(alias="formattedSearchTime")] pub formatted_search_time: String, - /// no description provided + /// no description provided #[serde(alias="formattedTotalResults")] pub formatted_total_results: String, - /// no description provided + /// no description provided #[serde(alias="totalResults")] pub total_results: String, - /// no description provided + /// no description provided #[serde(alias="searchTime")] pub search_time: f64, } @@ -735,12 +744,12 @@ impl Part for SearchSearchInformation {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ResultLabels { - /// no description provided + /// no description provided #[serde(alias="displayName")] pub display_name: String, - /// no description provided + /// no description provided pub label_with_op: String, - /// no description provided + /// no description provided pub name: String, } @@ -787,13 +796,17 @@ pub struct CseMethods<'a, C, NC, A> hub: &'a Customsearch, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CseMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CseMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CseMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns metadata about the search performed, metadata about the custom search engine used for the search, and the search results. + /// Returns metadata about the search performed, metadata about the custom search engine used for the search, and the search results. + /// + /// # Arguments + /// + /// * `q` - Query pub fn list(&self, q: &str) -> CseListCall<'a, C, NC, A> { CseListCall { hub: self.hub, @@ -846,7 +859,7 @@ impl<'a, C, NC, A> CseMethods<'a, C, NC, A> { /// Returns metadata about the search performed, metadata about the custom search engine used for the search, and the search results. /// /// A builder for the *list* method supported by a *cse* resource. -/// It is not used directly, but through a `CseMethods`. +/// It is not used directly, but through a `CseMethods` instance. /// /// # Example /// @@ -1058,7 +1071,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "q", "start", "sort", "siteSearchFilter", "siteSearch", "searchType", "safe", "rights", "relatedSite", "orTerms", "num", "lr", "lowRange", "linkSite", "imgType", "imgSize", "imgDominantColor", "imgColorType", "hq", "hl", "highRange", "googlehost", "gl", "filter", "fileType", "excludeTerms", "exactTerms", "dateRestrict", "cx", "cref", "cr", "c2coff"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1077,7 +1090,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Some(value) => params.push(("key", value)), None => { dlg.finished(false); - return Result::MissingAPIKey + return Err(Error::MissingAPIKey) } } @@ -1097,7 +1110,6 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -1107,7 +1119,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1118,7 +1130,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1127,13 +1139,13 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1145,7 +1157,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Query + /// Query pub fn q(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._q = new_value.to_string(); self @@ -1153,7 +1165,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *start* query property to the given value. /// /// - /// The index of the first result to return + /// The index of the first result to return pub fn start(mut self, new_value: u32) -> CseListCall<'a, C, NC, A> { self._start = Some(new_value); self @@ -1161,7 +1173,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *sort* query property to the given value. /// /// - /// The sort expression to apply to the results + /// The sort expression to apply to the results pub fn sort(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._sort = Some(new_value.to_string()); self @@ -1169,7 +1181,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *site search filter* query property to the given value. /// /// - /// Controls whether to include or exclude results from the site named in the as_sitesearch parameter + /// Controls whether to include or exclude results from the site named in the as_sitesearch parameter pub fn site_search_filter(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._site_search_filter = Some(new_value.to_string()); self @@ -1177,7 +1189,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *site search* query property to the given value. /// /// - /// Specifies all search results should be pages from a given site + /// Specifies all search results should be pages from a given site pub fn site_search(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._site_search = Some(new_value.to_string()); self @@ -1185,7 +1197,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *search type* query property to the given value. /// /// - /// Specifies the search type: image. + /// Specifies the search type: image. pub fn search_type(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._search_type = Some(new_value.to_string()); self @@ -1193,7 +1205,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *safe* query property to the given value. /// /// - /// Search safety level + /// Search safety level pub fn safe(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._safe = Some(new_value.to_string()); self @@ -1201,7 +1213,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *rights* query property to the given value. /// /// - /// Filters based on licensing. Supported values include: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived and combinations of these. + /// Filters based on licensing. Supported values include: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived and combinations of these. pub fn rights(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._rights = Some(new_value.to_string()); self @@ -1209,7 +1221,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *related site* query property to the given value. /// /// - /// Specifies that all search results should be pages that are related to the specified URL + /// Specifies that all search results should be pages that are related to the specified URL pub fn related_site(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._related_site = Some(new_value.to_string()); self @@ -1217,7 +1229,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *or terms* query property to the given value. /// /// - /// Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms + /// Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms pub fn or_terms(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._or_terms = Some(new_value.to_string()); self @@ -1225,7 +1237,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *num* query property to the given value. /// /// - /// Number of search results to return + /// Number of search results to return pub fn num(mut self, new_value: u32) -> CseListCall<'a, C, NC, A> { self._num = Some(new_value); self @@ -1233,7 +1245,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *lr* query property to the given value. /// /// - /// The language restriction for the search results + /// The language restriction for the search results pub fn lr(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._lr = Some(new_value.to_string()); self @@ -1241,7 +1253,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *low range* query property to the given value. /// /// - /// Creates a range in form as_nlo value..as_nhi value and attempts to append it to query + /// Creates a range in form as_nlo value..as_nhi value and attempts to append it to query pub fn low_range(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._low_range = Some(new_value.to_string()); self @@ -1249,7 +1261,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *link site* query property to the given value. /// /// - /// Specifies that all search results should contain a link to a particular URL + /// Specifies that all search results should contain a link to a particular URL pub fn link_site(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._link_site = Some(new_value.to_string()); self @@ -1257,7 +1269,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *img type* query property to the given value. /// /// - /// Returns images of a type, which can be one of: clipart, face, lineart, news, and photo. + /// Returns images of a type, which can be one of: clipart, face, lineart, news, and photo. pub fn img_type(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._img_type = Some(new_value.to_string()); self @@ -1265,7 +1277,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *img size* query property to the given value. /// /// - /// Returns images of a specified size, where size can be one of: icon, small, medium, large, xlarge, xxlarge, and huge. + /// Returns images of a specified size, where size can be one of: icon, small, medium, large, xlarge, xxlarge, and huge. pub fn img_size(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._img_size = Some(new_value.to_string()); self @@ -1273,7 +1285,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *img dominant color* query property to the given value. /// /// - /// Returns images of a specific dominant color: yellow, green, teal, blue, purple, pink, white, gray, black and brown. + /// Returns images of a specific dominant color: yellow, green, teal, blue, purple, pink, white, gray, black and brown. pub fn img_dominant_color(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._img_dominant_color = Some(new_value.to_string()); self @@ -1281,7 +1293,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *img color type* query property to the given value. /// /// - /// Returns black and white, grayscale, or color images: mono, gray, and color. + /// Returns black and white, grayscale, or color images: mono, gray, and color. pub fn img_color_type(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._img_color_type = Some(new_value.to_string()); self @@ -1289,7 +1301,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *hq* query property to the given value. /// /// - /// Appends the extra query terms to the query. + /// Appends the extra query terms to the query. pub fn hq(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._hq = Some(new_value.to_string()); self @@ -1297,7 +1309,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *hl* query property to the given value. /// /// - /// Sets the user interface language. + /// Sets the user interface language. pub fn hl(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._hl = Some(new_value.to_string()); self @@ -1305,7 +1317,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *high range* query property to the given value. /// /// - /// Creates a range in form as_nlo value..as_nhi value and attempts to append it to query + /// Creates a range in form as_nlo value..as_nhi value and attempts to append it to query pub fn high_range(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._high_range = Some(new_value.to_string()); self @@ -1313,7 +1325,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *googlehost* query property to the given value. /// /// - /// The local Google domain to use to perform the search. + /// The local Google domain to use to perform the search. pub fn googlehost(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._googlehost = Some(new_value.to_string()); self @@ -1321,7 +1333,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *gl* query property to the given value. /// /// - /// Geolocation of end user. + /// Geolocation of end user. pub fn gl(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._gl = Some(new_value.to_string()); self @@ -1329,7 +1341,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *filter* query property to the given value. /// /// - /// Controls turning on or off the duplicate content filter. + /// Controls turning on or off the duplicate content filter. pub fn filter(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._filter = Some(new_value.to_string()); self @@ -1337,7 +1349,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *file type* query property to the given value. /// /// - /// Returns images of a specified type. Some of the allowed values are: bmp, gif, png, jpg, svg, pdf, ... + /// Returns images of a specified type. Some of the allowed values are: bmp, gif, png, jpg, svg, pdf, ... pub fn file_type(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._file_type = Some(new_value.to_string()); self @@ -1345,7 +1357,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *exclude terms* query property to the given value. /// /// - /// Identifies a word or phrase that should not appear in any documents in the search results + /// Identifies a word or phrase that should not appear in any documents in the search results pub fn exclude_terms(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._exclude_terms = Some(new_value.to_string()); self @@ -1353,7 +1365,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *exact terms* query property to the given value. /// /// - /// Identifies a phrase that all documents in the search results must contain + /// Identifies a phrase that all documents in the search results must contain pub fn exact_terms(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._exact_terms = Some(new_value.to_string()); self @@ -1361,7 +1373,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *date restrict* query property to the given value. /// /// - /// Specifies all search results are from a time period + /// Specifies all search results are from a time period pub fn date_restrict(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._date_restrict = Some(new_value.to_string()); self @@ -1369,7 +1381,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *cx* query property to the given value. /// /// - /// The custom search engine ID to scope this search query + /// The custom search engine ID to scope this search query pub fn cx(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._cx = Some(new_value.to_string()); self @@ -1377,7 +1389,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *cref* query property to the given value. /// /// - /// The URL of a linked custom search engine + /// The URL of a linked custom search engine pub fn cref(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._cref = Some(new_value.to_string()); self @@ -1385,7 +1397,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *cr* query property to the given value. /// /// - /// Country restrict(s). + /// Country restrict(s). pub fn cr(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._cr = Some(new_value.to_string()); self @@ -1393,7 +1405,7 @@ impl<'a, C, NC, A> CseListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Sets the *c2coff* query property to the given value. /// /// - /// Turns off the translation between zh-CN and zh-TW. + /// Turns off the translation between zh-CN and zh-TW. pub fn c2coff(mut self, new_value: &str) -> CseListCall<'a, C, NC, A> { self._c2coff = Some(new_value.to_string()); self diff --git a/gen/dataflow1_b4/Cargo.toml b/gen/dataflow1_b4/Cargo.toml index e113f1ea2a..38c0c3e0cb 100644 --- a/gen/dataflow1_b4/Cargo.toml +++ b/gen/dataflow1_b4/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dataflow1_b4" -version = "0.1.1+20150130" +version = "0.1.2+20150130" authors = ["Sebastian Thiel "] description = "A complete library to interact with dataflow (protocol v1b4)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dataflow1_b4" @@ -16,7 +16,7 @@ keywords = ["dataflow", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/dataflow1_b4/README.md b/gen/dataflow1_b4/README.md index 52a66a818f..73bda2ebc7 100644 --- a/gen/dataflow1_b4/README.md +++ b/gen/dataflow1_b4/README.md @@ -1,11 +1,11 @@ The `google-dataflow1_b4` library allows access to all features of the *Google dataflow* service. -This documentation was generated from *dataflow* crate version *0.1.1+20150130*, where *20150130* is the exact revision of the *dataflow:v1b4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *dataflow* crate version *0.1.2+20150130*, where *20150130* is the exact revision of the *dataflow:v1b4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. # Features It seems there is nothing you can do here ... . @@ -20,6 +20,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-dataflow1_b4/struct.Dataflow.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -29,6 +31,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -87,7 +91,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-dataflow1_b4/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.ResponseResult.html), it will return that by default. @@ -110,8 +114,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-dataflow1_b4/t ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/dataflow1_b4/src/cmn.rs b/gen/dataflow1_b4/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/dataflow1_b4/src/cmn.rs +++ b/gen/dataflow1_b4/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/dataflow1_b4/src/lib.rs b/gen/dataflow1_b4/src/lib.rs index 440bde135e..f2b137f471 100644 --- a/gen/dataflow1_b4/src/lib.rs +++ b/gen/dataflow1_b4/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *dataflow* crate version *0.1.1+20150130*, where *20150130* is the exact revision of the *dataflow:v1b4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *dataflow* crate version *0.1.2+20150130*, where *20150130* is the exact revision of the *dataflow:v1b4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/dataflow1_b4). //! # Features //! @@ -20,6 +20,8 @@ //! //! * **[Hub](struct.Dataflow.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -29,6 +31,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -88,7 +92,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -111,8 +115,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -161,7 +166,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -223,14 +228,14 @@ impl<'a, C, NC, A> Dataflow Dataflow { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { diff --git a/gen/datastore1_beta2/Cargo.toml b/gen/datastore1_beta2/Cargo.toml index 9b3937f0af..20a5044b36 100644 --- a/gen/datastore1_beta2/Cargo.toml +++ b/gen/datastore1_beta2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-datastore1_beta2" -version = "0.1.1+20140916" +version = "0.1.2+20140916" authors = ["Sebastian Thiel "] description = "A complete library to interact with datastore (protocol v1beta2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/datastore1_beta2" @@ -16,7 +16,7 @@ keywords = ["datastore", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/datastore1_beta2/README.md b/gen/datastore1_beta2/README.md index 1b92d94abb..d643eb4a88 100644 --- a/gen/datastore1_beta2/README.md +++ b/gen/datastore1_beta2/README.md @@ -1,11 +1,11 @@ The `google-datastore1_beta2` library allows access to all features of the *Google datastore* service. -This documentation was generated from *datastore* crate version *0.1.1+20140916*, where *20140916* is the exact revision of the *datastore:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *datastore* crate version *0.1.2+20140916*, where *20140916* is the exact revision of the *datastore:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *datastore* *v1_beta2* API can be found at the [official documentation site](https://developers.google.com/datastore/). @@ -25,6 +25,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-datastore1_beta2/struct.Datastore.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-datastore1_beta2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-datastore1_beta2/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-datastore1_beta2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -34,6 +36,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-datastore1_beta2/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -69,7 +73,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-datastore1_beta2" as datastore1_beta2; use datastore1_beta2::LookupRequest; -use datastore1_beta2::Result; +use datastore1_beta2::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use datastore1_beta2::Datastore; @@ -98,15 +102,17 @@ let result = hub.datasets().lookup(&req, "datasetId") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -119,7 +125,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-datastore1_beta2/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-datastore1_beta2/trait.ResponseResult.html), it will return that by default. @@ -142,8 +148,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-datastore1_bet ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-datastore1_beta2/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-datastore1_beta2/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-datastore1_beta2/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-datastore1_beta2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-datastore1_beta2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/datastore1_beta2/src/cmn.rs b/gen/datastore1_beta2/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/datastore1_beta2/src/cmn.rs +++ b/gen/datastore1_beta2/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/datastore1_beta2/src/lib.rs b/gen/datastore1_beta2/src/lib.rs index b4a0739eeb..67c78dbeeb 100644 --- a/gen/datastore1_beta2/src/lib.rs +++ b/gen/datastore1_beta2/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *datastore* crate version *0.1.1+20140916*, where *20140916* is the exact revision of the *datastore:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *datastore* crate version *0.1.2+20140916*, where *20140916* is the exact revision of the *datastore:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *datastore* *v1_beta2* API can be found at the //! [official documentation site](https://developers.google.com/datastore/). @@ -25,6 +25,8 @@ //! //! * **[Hub](struct.Datastore.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -34,6 +36,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -69,7 +73,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-datastore1_beta2" as datastore1_beta2; //! use datastore1_beta2::LookupRequest; -//! use datastore1_beta2::Result; +//! use datastore1_beta2::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -99,15 +103,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -120,7 +126,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -143,8 +149,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -193,7 +200,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -248,7 +255,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-datastore1_beta2" as datastore1_beta2; /// use datastore1_beta2::LookupRequest; -/// use datastore1_beta2::Result; +/// use datastore1_beta2::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -278,15 +285,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -307,7 +316,7 @@ impl<'a, C, NC, A> Datastore Datastore { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -317,7 +326,7 @@ impl<'a, C, NC, A> Datastore } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -339,9 +348,9 @@ impl<'a, C, NC, A> Datastore /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PartitionId { - /// The namespace. + /// The namespace. pub namespace: String, - /// The dataset ID. + /// The dataset ID. #[serde(alias="datasetId")] pub dataset_id: String, } @@ -360,9 +369,9 @@ impl Part for PartitionId {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AllocateIdsResponse { - /// The keys specified in the request (in the same order), each with its key path completed with a newly allocated ID. + /// The keys specified in the request (in the same order), each with its key path completed with a newly allocated ID. pub keys: Vec, - /// no description provided + /// no description provided pub header: ResponseHeader, } @@ -380,9 +389,9 @@ impl ResponseResult for AllocateIdsResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct LookupRequest { - /// Keys of entities to look up from the datastore. + /// Keys of entities to look up from the datastore. pub keys: Option>, - /// Options for this lookup request. Optional. + /// Options for this lookup request. Optional. #[serde(alias="readOptions")] pub read_options: Option, } @@ -401,9 +410,9 @@ impl RequestValue for LookupRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct BeginTransactionResponse { - /// no description provided + /// no description provided pub header: ResponseHeader, - /// The transaction identifier (always present). + /// The transaction identifier (always present). pub transaction: String, } @@ -421,7 +430,7 @@ impl ResponseResult for BeginTransactionResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct AllocateIdsRequest { - /// A list of keys with incomplete key paths to allocate IDs for. No key may be reserved/read-only. + /// A list of keys with incomplete key paths to allocate IDs for. No key may be reserved/read-only. pub keys: Option>, } @@ -439,9 +448,9 @@ impl RequestValue for AllocateIdsRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct RunQueryResponse { - /// no description provided + /// no description provided pub header: ResponseHeader, - /// A batch of query results (always present). + /// A batch of query results (always present). pub batch: QueryResultBatch, } @@ -454,18 +463,18 @@ impl ResponseResult for RunQueryResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct Mutation { - /// Entities to insert. Each inserted entity's key must have a complete path and must not be reserved/read-only. + /// Entities to insert. Each inserted entity's key must have a complete path and must not be reserved/read-only. pub insert: Vec, - /// Ignore a user specified read-only period. Optional. + /// Ignore a user specified read-only period. Optional. pub force: bool, - /// Insert entities with a newly allocated ID. Each inserted entity's key must omit the final identifier in its path and must not be reserved/read-only. + /// Insert entities with a newly allocated ID. Each inserted entity's key must omit the final identifier in its path and must not be reserved/read-only. #[serde(alias="insertAutoId")] pub insert_auto_id: Vec, - /// Keys of entities to delete. Each key must have a complete key path and must not be reserved/read-only. + /// Keys of entities to delete. Each key must have a complete key path and must not be reserved/read-only. pub delete: Vec, - /// Entities to update. Each updated entity's key must have a complete path and must not be reserved/read-only. + /// Entities to update. Each updated entity's key must have a complete path and must not be reserved/read-only. pub update: Vec, - /// Entities to upsert. Each upserted entity's key must have a complete path and must not be reserved/read-only. + /// Entities to upsert. Each upserted entity's key must have a complete path and must not be reserved/read-only. pub upsert: Vec, } @@ -483,9 +492,9 @@ impl Part for Mutation {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CommitResponse { - /// no description provided + /// no description provided pub header: ResponseHeader, - /// The result of performing the mutation (if any). + /// The result of performing the mutation (if any). #[serde(alias="mutationResult")] pub mutation_result: MutationResult, } @@ -499,19 +508,19 @@ impl ResponseResult for CommitResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct QueryResultBatch { - /// The state of the query after the current batch. One of notFinished, moreResultsAfterLimit, noMoreResults. + /// The state of the query after the current batch. One of notFinished, moreResultsAfterLimit, noMoreResults. #[serde(alias="moreResults")] pub more_results: String, - /// The number of results skipped because of Query.offset. + /// The number of results skipped because of Query.offset. #[serde(alias="skippedResults")] pub skipped_results: i32, - /// A cursor that points to the position after the last result in the batch. May be absent. TODO(arfuller): Once all plans produce cursors update documentation here. + /// A cursor that points to the position after the last result in the batch. May be absent. TODO(arfuller): Once all plans produce cursors update documentation here. #[serde(alias="endCursor")] pub end_cursor: String, - /// The results for this batch. + /// The results for this batch. #[serde(alias="entityResults")] pub entity_results: Vec, - /// The result type for every entity in entityResults. full for full entities, projection for entities with only projected properties, keyOnly for entities with only a key. + /// The result type for every entity in entityResults. full for full entities, projection for entities with only projected properties, keyOnly for entities with only a key. #[serde(alias="entityResultType")] pub entity_result_type: String, } @@ -525,7 +534,7 @@ impl Part for QueryResultBatch {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct PropertyReference { - /// The name of the property. + /// The name of the property. pub name: String, } @@ -538,7 +547,7 @@ impl Part for PropertyReference {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct EntityResult { - /// The resulting entity. + /// The resulting entity. pub entity: Entity, } @@ -556,7 +565,7 @@ impl Part for EntityResult {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct RollbackResponse { - /// no description provided + /// no description provided pub header: ResponseHeader, } @@ -569,16 +578,16 @@ impl ResponseResult for RollbackResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct GqlQuery { - /// When false, the query string must not contain a literal. + /// When false, the query string must not contain a literal. #[serde(alias="allowLiteral")] pub allow_literal: bool, - /// A named argument must set field GqlQueryArg.name. No two named arguments may have the same name. For each non-reserved named binding site in the query string, there must be a named argument with that name, but not necessarily the inverse. + /// A named argument must set field GqlQueryArg.name. No two named arguments may have the same name. For each non-reserved named binding site in the query string, there must be a named argument with that name, but not necessarily the inverse. #[serde(alias="nameArgs")] pub name_args: Vec, - /// The query string. + /// The query string. #[serde(alias="queryString")] pub query_string: String, - /// Numbered binding site @1 references the first numbered argument, effectively using 1-based indexing, rather than the usual 0. A numbered argument must NOT set field GqlQueryArg.name. For each binding site numbered i in query_string, there must be an ith numbered argument. The inverse must also be true. + /// Numbered binding site @1 references the first numbered argument, effectively using 1-based indexing, rather than the usual 0. A numbered argument must NOT set field GqlQueryArg.name. For each binding site numbered i in query_string, there must be an ith numbered argument. The inverse must also be true. #[serde(alias="numberArgs")] pub number_args: Vec, } @@ -592,9 +601,9 @@ impl Part for GqlQuery {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Key { - /// The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors. An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty. The path can have at most 100 elements. + /// The entity path. An entity path consists of one or more elements composed of a kind and a string or numerical identifier, which identify entities. The first element identifies a root entity, the second element identifies a child of the root entity, the third element a child of the second entity, and so forth. The entities identified by all prefixes of the path are called the element's ancestors. An entity path is always fully complete: ALL of the entity's ancestors are required to be in the path along with the entity identifier itself. The only exception is that in some documented cases, the identifier in the last path element (for the entity) itself may be omitted. A path can never be empty. The path can have at most 100 elements. pub path: Vec, - /// Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition. + /// Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition. #[serde(alias="partitionId")] pub partition_id: PartitionId, } @@ -608,10 +617,10 @@ impl Part for Key {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct PropertyExpression { - /// The aggregation function to apply to the property. Optional. Can only be used when grouping by at least one property. Must then be set on all properties in the projection that are not being grouped by. Aggregation functions: first selects the first result as determined by the query's order. + /// The aggregation function to apply to the property. Optional. Can only be used when grouping by at least one property. Must then be set on all properties in the projection that are not being grouped by. Aggregation functions: first selects the first result as determined by the query's order. #[serde(alias="aggregationFunction")] pub aggregation_function: String, - /// The property to project. + /// The property to project. pub property: PropertyReference, } @@ -624,10 +633,10 @@ impl Part for PropertyExpression {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct MutationResult { - /// Keys for insertAutoId entities. One per entity from the request, in the same order. + /// Keys for insertAutoId entities. One per entity from the request, in the same order. #[serde(alias="insertAutoIdKeys")] pub insert_auto_id_keys: Vec, - /// Number of index writes. + /// Number of index writes. #[serde(alias="indexUpdates")] pub index_updates: i32, } @@ -641,9 +650,9 @@ impl Part for MutationResult {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct ReadOptions { - /// The transaction to use. Optional. + /// The transaction to use. Optional. pub transaction: String, - /// The read consistency to use. One of default, strong, or eventual. Cannot be set when transaction is set. Lookup and ancestor queries default to strong, global queries default to eventual and cannot be set to strong. Optional. Default is default. + /// The read consistency to use. One of default, strong, or eventual. Cannot be set when transaction is set. Lookup and ancestor queries default to strong, global queries default to eventual and cannot be set to strong. Optional. Default is default. #[serde(alias="readConsistency")] pub read_consistency: String, } @@ -657,11 +666,11 @@ impl Part for ReadOptions {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct PropertyFilter { - /// The operator to filter by. One of lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual, equal, or hasAncestor. + /// The operator to filter by. One of lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual, equal, or hasAncestor. pub operator: String, - /// The property to filter by. + /// The property to filter by. pub property: PropertyReference, - /// The value to compare the property to. + /// The value to compare the property to. pub value: Value, } @@ -674,7 +683,7 @@ impl Part for PropertyFilter {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ResponseHeader { - /// Identifies what kind of resource this is. Value: the fixed string "datastore#responseHeader". + /// Identifies what kind of resource this is. Value: the fixed string "datastore#responseHeader". pub kind: String, } @@ -687,40 +696,40 @@ impl Part for ResponseHeader {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Value { - /// An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key. + /// An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key. #[serde(alias="entityValue")] pub entity_value: Entity, - /// A double value. + /// A double value. #[serde(alias="doubleValue")] pub double_value: f64, - /// A blob key value. + /// A blob key value. #[serde(alias="blobKeyValue")] pub blob_key_value: String, - /// The meaning field is reserved and should not be used. + /// The meaning field is reserved and should not be used. pub meaning: i32, - /// A timestamp value. + /// A timestamp value. #[serde(alias="dateTimeValue")] pub date_time_value: String, - /// A key value. + /// A key value. #[serde(alias="keyValue")] pub key_value: Key, - /// A blob value. May be a maximum of 1,000,000 bytes. + /// A blob value. May be a maximum of 1,000,000 bytes. #[serde(alias="blobValue")] pub blob_value: String, /// If the value should be indexed. /// /// The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true. pub indexed: bool, - /// A UTF-8 encoded string value. + /// A UTF-8 encoded string value. #[serde(alias="stringValue")] pub string_value: String, - /// A list value. Cannot contain another list value. Cannot also have a meaning and indexing set. + /// A list value. Cannot contain another list value. Cannot also have a meaning and indexing set. #[serde(alias="listValue")] pub list_value: Vec, - /// A boolean value. + /// A boolean value. #[serde(alias="booleanValue")] pub boolean_value: bool, - /// An integer value. + /// An integer value. #[serde(alias="integerValue")] pub integer_value: String, } @@ -734,10 +743,10 @@ impl Part for Value {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct Filter { - /// A composite filter. + /// A composite filter. #[serde(alias="compositeFilter")] pub composite_filter: CompositeFilter, - /// A filter on a property. + /// A filter on a property. #[serde(alias="propertyFilter")] pub property_filter: PropertyFilter, } @@ -753,11 +762,11 @@ impl Part for Filter {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct KeyPathElement { - /// The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "". + /// The kind of the entity. A kind matching regex "__.*__" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "". pub kind: String, - /// The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future. + /// The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future. pub id: String, - /// The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "". + /// The name of the entity. A name matching regex "__.*__" is reserved/read-only. A name must not be more than 500 characters. Cannot be "". pub name: String, } @@ -770,40 +779,40 @@ impl Part for KeyPathElement {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Property { - /// An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key. + /// An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key. #[serde(alias="entityValue")] pub entity_value: Entity, - /// A double value. + /// A double value. #[serde(alias="doubleValue")] pub double_value: f64, - /// A blob key value. + /// A blob key value. #[serde(alias="blobKeyValue")] pub blob_key_value: String, - /// The meaning field is reserved and should not be used. + /// The meaning field is reserved and should not be used. pub meaning: i32, - /// A timestamp value. + /// A timestamp value. #[serde(alias="dateTimeValue")] pub date_time_value: String, - /// A key value. + /// A key value. #[serde(alias="keyValue")] pub key_value: Key, - /// A blob value. May be a maximum of 1,000,000 bytes. + /// A blob value. May be a maximum of 1,000,000 bytes. #[serde(alias="blobValue")] pub blob_value: String, /// If the value should be indexed. /// /// The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true. pub indexed: bool, - /// A UTF-8 encoded string value. + /// A UTF-8 encoded string value. #[serde(alias="stringValue")] pub string_value: String, - /// A list value. Cannot contain another list value. Cannot also have a meaning and indexing set. + /// A list value. Cannot contain another list value. Cannot also have a meaning and indexing set. #[serde(alias="listValue")] pub list_value: Vec, - /// A boolean value. + /// A boolean value. #[serde(alias="booleanValue")] pub boolean_value: bool, - /// An integer value. + /// An integer value. #[serde(alias="integerValue")] pub integer_value: String, } @@ -822,13 +831,13 @@ impl Part for Property {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct LookupResponse { - /// Entities found. + /// Entities found. pub found: Vec, - /// no description provided + /// no description provided pub header: ResponseHeader, - /// A list of keys that were not looked up due to resource constraints. + /// A list of keys that were not looked up due to resource constraints. pub deferred: Vec, - /// Entities not found, with only the key populated. + /// Entities not found, with only the key populated. pub missing: Vec, } @@ -841,9 +850,9 @@ impl ResponseResult for LookupResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct CompositeFilter { - /// The operator for combining multiple filters. Only "and" is currently supported. + /// The operator for combining multiple filters. Only "and" is currently supported. pub operator: String, - /// The list of filters to combine. Must contain at least one filter. + /// The list of filters to combine. Must contain at least one filter. pub filters: Vec, } @@ -861,14 +870,14 @@ impl Part for CompositeFilter {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct CommitRequest { - /// no description provided + /// no description provided #[serde(alias="ignoreReadOnly")] pub ignore_read_only: Option, - /// The transaction identifier, returned by a call to beginTransaction. Must be set when mode is TRANSACTIONAL. + /// The transaction identifier, returned by a call to beginTransaction. Must be set when mode is TRANSACTIONAL. pub transaction: Option, - /// The type of commit to perform. Either TRANSACTIONAL or NON_TRANSACTIONAL. + /// The type of commit to perform. Either TRANSACTIONAL or NON_TRANSACTIONAL. pub mode: Option, - /// The mutation to perform. Optional. + /// The mutation to perform. Optional. pub mutation: Option, } @@ -886,15 +895,15 @@ impl RequestValue for CommitRequest {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct RunQueryRequest { - /// The query to run. Either this field or field gql_query must be set, but not both. + /// The query to run. Either this field or field gql_query must be set, but not both. pub query: Option, - /// Entities are partitioned into subsets, identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID, but all other partition IDs in RunQueryRequest are normalized with this partition ID as the context partition ID. + /// Entities are partitioned into subsets, identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID, but all other partition IDs in RunQueryRequest are normalized with this partition ID as the context partition ID. #[serde(alias="partitionId")] pub partition_id: Option, - /// The GQL query to run. Either this field or field query must be set, but not both. + /// The GQL query to run. Either this field or field query must be set, but not both. #[serde(alias="gqlQuery")] pub gql_query: Option, - /// The options for this query. + /// The options for this query. #[serde(alias="readOptions")] pub read_options: Option, } @@ -908,7 +917,7 @@ impl RequestValue for RunQueryRequest {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct KindExpression { - /// The name of the kind. + /// The name of the kind. pub name: String, } @@ -921,11 +930,11 @@ impl Part for KindExpression {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct GqlQueryArg { - /// no description provided + /// no description provided pub cursor: String, - /// Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". Must not match regex "__.*__". Must not be "". + /// Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". Must not match regex "__.*__". Must not be "". pub name: String, - /// no description provided + /// no description provided pub value: Value, } @@ -938,7 +947,7 @@ impl Part for GqlQueryArg {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Entity { - /// The entity's properties. + /// The entity's properties. pub properties: HashMap, /// The entity's key. /// @@ -960,7 +969,7 @@ impl Part for Entity {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct RollbackRequest { - /// The transaction identifier, returned by a call to beginTransaction. + /// The transaction identifier, returned by a call to beginTransaction. pub transaction: Option, } @@ -978,7 +987,7 @@ impl RequestValue for RollbackRequest {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct BeginTransactionRequest { - /// The transaction isolation level. Either snapshot or serializable. The default isolation level is snapshot isolation, which means that another transaction may not concurrently modify the data that is modified by this transaction. Optionally, a transaction can request to be made serializable which means that another transaction cannot concurrently modify the data that is read or modified by this transaction. + /// The transaction isolation level. Either snapshot or serializable. The default isolation level is snapshot isolation, which means that another transaction may not concurrently modify the data that is modified by this transaction. Optionally, a transaction can request to be made serializable which means that another transaction cannot concurrently modify the data that is read or modified by this transaction. #[serde(alias="isolationLevel")] pub isolation_level: Option, } @@ -992,9 +1001,9 @@ impl RequestValue for BeginTransactionRequest {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct PropertyOrder { - /// The direction to order by. One of ascending or descending. Optional, defaults to ascending. + /// The direction to order by. One of ascending or descending. Optional, defaults to ascending. pub direction: String, - /// The property to order by. + /// The property to order by. pub property: PropertyReference, } @@ -1007,26 +1016,26 @@ impl Part for PropertyOrder {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct Query { - /// A starting point for the query results. Optional. Query cursors are returned in query result batches. + /// A starting point for the query results. Optional. Query cursors are returned in query result batches. #[serde(alias="startCursor")] pub start_cursor: String, - /// The kinds to query (if empty, returns entities from all kinds). + /// The kinds to query (if empty, returns entities from all kinds). pub kinds: Vec, - /// The projection to return. If not set the entire entity is returned. + /// The projection to return. If not set the entire entity is returned. pub projection: Vec, - /// The properties to group by (if empty, no grouping is applied to the result set). + /// The properties to group by (if empty, no grouping is applied to the result set). #[serde(alias="groupBy")] pub group_by: Vec, - /// The filter to apply (optional). + /// The filter to apply (optional). pub filter: Filter, - /// The maximum number of results to return. Applies after all other constraints. Optional. + /// The maximum number of results to return. Applies after all other constraints. Optional. pub limit: i32, - /// The number of results to skip. Applies before limit, but after all other constraints (optional, defaults to 0). + /// The number of results to skip. Applies before limit, but after all other constraints (optional, defaults to 0). pub offset: i32, - /// An ending point for the query results. Optional. Query cursors are returned in query result batches. + /// An ending point for the query results. Optional. Query cursors are returned in query result batches. #[serde(alias="endCursor")] pub end_cursor: String, - /// The order to apply to the query results (if empty, order is unspecified). + /// The order to apply to the query results (if empty, order is unspecified). pub order: Vec, } @@ -1072,13 +1081,18 @@ pub struct DatasetMethods<'a, C, NC, A> hub: &'a Datastore, } -impl<'a, C, NC, A> ResourceMethodsBuilder for DatasetMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for DatasetMethods<'a, C, NC, A> {} impl<'a, C, NC, A> DatasetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Commit a transaction, optionally creating, deleting or modifying some entities. + /// Commit a transaction, optionally creating, deleting or modifying some entities. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `datasetId` - Identifies the dataset. pub fn commit(&self, request: &CommitRequest, dataset_id: &str) -> DatasetCommitCall<'a, C, NC, A> { DatasetCommitCall { hub: self.hub, @@ -1092,7 +1106,12 @@ impl<'a, C, NC, A> DatasetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Allocate IDs for incomplete keys (useful for referencing an entity before it is inserted). + /// Allocate IDs for incomplete keys (useful for referencing an entity before it is inserted). + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `datasetId` - Identifies the dataset. pub fn allocate_ids(&self, request: &AllocateIdsRequest, dataset_id: &str) -> DatasetAllocateIdCall<'a, C, NC, A> { DatasetAllocateIdCall { hub: self.hub, @@ -1106,7 +1125,12 @@ impl<'a, C, NC, A> DatasetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Roll back a transaction. + /// Roll back a transaction. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `datasetId` - Identifies the dataset. pub fn rollback(&self, request: &RollbackRequest, dataset_id: &str) -> DatasetRollbackCall<'a, C, NC, A> { DatasetRollbackCall { hub: self.hub, @@ -1120,7 +1144,12 @@ impl<'a, C, NC, A> DatasetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Look up some entities by key. + /// Look up some entities by key. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `datasetId` - Identifies the dataset. pub fn lookup(&self, request: &LookupRequest, dataset_id: &str) -> DatasetLookupCall<'a, C, NC, A> { DatasetLookupCall { hub: self.hub, @@ -1134,7 +1163,12 @@ impl<'a, C, NC, A> DatasetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Query for entities. + /// Query for entities. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `datasetId` - Identifies the dataset. pub fn run_query(&self, request: &RunQueryRequest, dataset_id: &str) -> DatasetRunQueryCall<'a, C, NC, A> { DatasetRunQueryCall { hub: self.hub, @@ -1148,7 +1182,12 @@ impl<'a, C, NC, A> DatasetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Begin a new transaction. + /// Begin a new transaction. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `datasetId` - Identifies the dataset. pub fn begin_transaction(&self, request: &BeginTransactionRequest, dataset_id: &str) -> DatasetBeginTransactionCall<'a, C, NC, A> { DatasetBeginTransactionCall { hub: self.hub, @@ -1172,7 +1211,7 @@ impl<'a, C, NC, A> DatasetMethods<'a, C, NC, A> { /// Commit a transaction, optionally creating, deleting or modifying some entities. /// /// A builder for the *commit* method supported by a *dataset* resource. -/// It is not used directly, but through a `DatasetMethods`. +/// It is not used directly, but through a `DatasetMethods` instance. /// /// # Example /// @@ -1237,7 +1276,7 @@ impl<'a, C, NC, A> DatasetCommitCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "datasetId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1294,7 +1333,7 @@ impl<'a, C, NC, A> DatasetCommitCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1310,7 +1349,6 @@ impl<'a, C, NC, A> DatasetCommitCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -1320,7 +1358,7 @@ impl<'a, C, NC, A> DatasetCommitCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1331,7 +1369,7 @@ impl<'a, C, NC, A> DatasetCommitCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1340,13 +1378,13 @@ impl<'a, C, NC, A> DatasetCommitCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1367,7 +1405,7 @@ impl<'a, C, NC, A> DatasetCommitCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the dataset. + /// Identifies the dataset. pub fn dataset_id(mut self, new_value: &str) -> DatasetCommitCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -1428,7 +1466,7 @@ impl<'a, C, NC, A> DatasetCommitCall<'a, C, NC, A> where NC: hyper::net::Network /// Allocate IDs for incomplete keys (useful for referencing an entity before it is inserted). /// /// A builder for the *allocateIds* method supported by a *dataset* resource. -/// It is not used directly, but through a `DatasetMethods`. +/// It is not used directly, but through a `DatasetMethods` instance. /// /// # Example /// @@ -1493,7 +1531,7 @@ impl<'a, C, NC, A> DatasetAllocateIdCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "datasetId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1550,7 +1588,7 @@ impl<'a, C, NC, A> DatasetAllocateIdCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1566,7 +1604,6 @@ impl<'a, C, NC, A> DatasetAllocateIdCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -1576,7 +1613,7 @@ impl<'a, C, NC, A> DatasetAllocateIdCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1587,7 +1624,7 @@ impl<'a, C, NC, A> DatasetAllocateIdCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1596,13 +1633,13 @@ impl<'a, C, NC, A> DatasetAllocateIdCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1623,7 +1660,7 @@ impl<'a, C, NC, A> DatasetAllocateIdCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the dataset. + /// Identifies the dataset. pub fn dataset_id(mut self, new_value: &str) -> DatasetAllocateIdCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -1684,7 +1721,7 @@ impl<'a, C, NC, A> DatasetAllocateIdCall<'a, C, NC, A> where NC: hyper::net::Net /// Roll back a transaction. /// /// A builder for the *rollback* method supported by a *dataset* resource. -/// It is not used directly, but through a `DatasetMethods`. +/// It is not used directly, but through a `DatasetMethods` instance. /// /// # Example /// @@ -1749,7 +1786,7 @@ impl<'a, C, NC, A> DatasetRollbackCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "datasetId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1806,7 +1843,7 @@ impl<'a, C, NC, A> DatasetRollbackCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1822,7 +1859,6 @@ impl<'a, C, NC, A> DatasetRollbackCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -1832,7 +1868,7 @@ impl<'a, C, NC, A> DatasetRollbackCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1843,7 +1879,7 @@ impl<'a, C, NC, A> DatasetRollbackCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1852,13 +1888,13 @@ impl<'a, C, NC, A> DatasetRollbackCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1879,7 +1915,7 @@ impl<'a, C, NC, A> DatasetRollbackCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the dataset. + /// Identifies the dataset. pub fn dataset_id(mut self, new_value: &str) -> DatasetRollbackCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -1940,7 +1976,7 @@ impl<'a, C, NC, A> DatasetRollbackCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Look up some entities by key. /// /// A builder for the *lookup* method supported by a *dataset* resource. -/// It is not used directly, but through a `DatasetMethods`. +/// It is not used directly, but through a `DatasetMethods` instance. /// /// # Example /// @@ -2005,7 +2041,7 @@ impl<'a, C, NC, A> DatasetLookupCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "datasetId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2062,7 +2098,7 @@ impl<'a, C, NC, A> DatasetLookupCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2078,7 +2114,6 @@ impl<'a, C, NC, A> DatasetLookupCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -2088,7 +2123,7 @@ impl<'a, C, NC, A> DatasetLookupCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2099,7 +2134,7 @@ impl<'a, C, NC, A> DatasetLookupCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2108,13 +2143,13 @@ impl<'a, C, NC, A> DatasetLookupCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2135,7 +2170,7 @@ impl<'a, C, NC, A> DatasetLookupCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the dataset. + /// Identifies the dataset. pub fn dataset_id(mut self, new_value: &str) -> DatasetLookupCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -2196,7 +2231,7 @@ impl<'a, C, NC, A> DatasetLookupCall<'a, C, NC, A> where NC: hyper::net::Network /// Query for entities. /// /// A builder for the *runQuery* method supported by a *dataset* resource. -/// It is not used directly, but through a `DatasetMethods`. +/// It is not used directly, but through a `DatasetMethods` instance. /// /// # Example /// @@ -2261,7 +2296,7 @@ impl<'a, C, NC, A> DatasetRunQueryCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "datasetId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2318,7 +2353,7 @@ impl<'a, C, NC, A> DatasetRunQueryCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2334,7 +2369,6 @@ impl<'a, C, NC, A> DatasetRunQueryCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -2344,7 +2378,7 @@ impl<'a, C, NC, A> DatasetRunQueryCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2355,7 +2389,7 @@ impl<'a, C, NC, A> DatasetRunQueryCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2364,13 +2398,13 @@ impl<'a, C, NC, A> DatasetRunQueryCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2391,7 +2425,7 @@ impl<'a, C, NC, A> DatasetRunQueryCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the dataset. + /// Identifies the dataset. pub fn dataset_id(mut self, new_value: &str) -> DatasetRunQueryCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -2452,7 +2486,7 @@ impl<'a, C, NC, A> DatasetRunQueryCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Begin a new transaction. /// /// A builder for the *beginTransaction* method supported by a *dataset* resource. -/// It is not used directly, but through a `DatasetMethods`. +/// It is not used directly, but through a `DatasetMethods` instance. /// /// # Example /// @@ -2517,7 +2551,7 @@ impl<'a, C, NC, A> DatasetBeginTransactionCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "datasetId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2574,7 +2608,7 @@ impl<'a, C, NC, A> DatasetBeginTransactionCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2590,7 +2624,6 @@ impl<'a, C, NC, A> DatasetBeginTransactionCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -2600,7 +2633,7 @@ impl<'a, C, NC, A> DatasetBeginTransactionCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2611,7 +2644,7 @@ impl<'a, C, NC, A> DatasetBeginTransactionCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2620,13 +2653,13 @@ impl<'a, C, NC, A> DatasetBeginTransactionCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2647,7 +2680,7 @@ impl<'a, C, NC, A> DatasetBeginTransactionCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the dataset. + /// Identifies the dataset. pub fn dataset_id(mut self, new_value: &str) -> DatasetBeginTransactionCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self diff --git a/gen/deploymentmanager2_beta1/Cargo.toml b/gen/deploymentmanager2_beta1/Cargo.toml index 6028b79961..cb76ba7dee 100644 --- a/gen/deploymentmanager2_beta1/Cargo.toml +++ b/gen/deploymentmanager2_beta1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-deploymentmanager2_beta1" -version = "0.1.1+20141215" +version = "0.1.2+20141215" authors = ["Sebastian Thiel "] description = "A complete library to interact with deploymentmanager (protocol v2beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/deploymentmanager2_beta1" @@ -16,7 +16,7 @@ keywords = ["deploymentmanager", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/deploymentmanager2_beta1/README.md b/gen/deploymentmanager2_beta1/README.md index c54afe5f47..7982dc6f7b 100644 --- a/gen/deploymentmanager2_beta1/README.md +++ b/gen/deploymentmanager2_beta1/README.md @@ -1,11 +1,11 @@ The `google-deploymentmanager2_beta1` library allows access to all features of the *Google deploymentmanager* service. -This documentation was generated from *deploymentmanager* crate version *0.1.1+20141215*, where *20141215* is the exact revision of the *deploymentmanager:v2beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *deploymentmanager* crate version *0.1.2+20141215*, where *20141215* is the exact revision of the *deploymentmanager:v2beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *deploymentmanager* *v2_beta1* API can be found at the [official documentation site](https://developers.google.com/deployment-manager/). @@ -33,6 +33,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-deploymentmanager2_beta1/struct.Deploymentmanager.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-deploymentmanager2_beta1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-deploymentmanager2_beta1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-deploymentmanager2_beta1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -42,6 +44,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-deploymentmanager2_beta1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -79,7 +83,7 @@ google-deploymentmanager2_beta1 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-deploymentmanager2_beta1" as deploymentmanager2_beta1; -use deploymentmanager2_beta1::Result; +use deploymentmanager2_beta1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use deploymentmanager2_beta1::Deploymentmanager; @@ -105,15 +109,17 @@ let result = hub.operations().list("project") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -126,7 +132,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-deploymentmanager2_beta1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-deploymentmanager2_beta1/trait.ResponseResult.html), it will return that by default. @@ -149,8 +155,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-deploymentmana ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-deploymentmanager2_beta1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-deploymentmanager2_beta1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-deploymentmanager2_beta1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-deploymentmanager2_beta1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-deploymentmanager2_beta1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/deploymentmanager2_beta1/src/cmn.rs b/gen/deploymentmanager2_beta1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/deploymentmanager2_beta1/src/cmn.rs +++ b/gen/deploymentmanager2_beta1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/deploymentmanager2_beta1/src/lib.rs b/gen/deploymentmanager2_beta1/src/lib.rs index c4a34e8e9d..b35075aeda 100644 --- a/gen/deploymentmanager2_beta1/src/lib.rs +++ b/gen/deploymentmanager2_beta1/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *deploymentmanager* crate version *0.1.1+20141215*, where *20141215* is the exact revision of the *deploymentmanager:v2beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *deploymentmanager* crate version *0.1.2+20141215*, where *20141215* is the exact revision of the *deploymentmanager:v2beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *deploymentmanager* *v2_beta1* API can be found at the //! [official documentation site](https://developers.google.com/deployment-manager/). @@ -33,6 +33,8 @@ //! //! * **[Hub](struct.Deploymentmanager.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -42,6 +44,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -79,7 +83,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-deploymentmanager2_beta1" as deploymentmanager2_beta1; -//! use deploymentmanager2_beta1::Result; +//! use deploymentmanager2_beta1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -106,15 +110,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -127,7 +133,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -150,8 +156,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -200,7 +207,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -254,7 +261,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-deploymentmanager2_beta1" as deploymentmanager2_beta1; -/// use deploymentmanager2_beta1::Result; +/// use deploymentmanager2_beta1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -281,15 +288,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -310,7 +319,7 @@ impl<'a, C, NC, A> Deploymentmanager Deploymentmanager { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -332,7 +341,7 @@ impl<'a, C, NC, A> Deploymentmanager } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -358,22 +367,22 @@ impl<'a, C, NC, A> Deploymentmanager /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ResourceType { - /// [Output Only] A list of any errors that occurred during deployment. + /// [Output Only] A list of any errors that occurred during deployment. pub errors: Vec, - /// [Output Only] The name of the resource as it appears in the YAML config. + /// [Output Only] The name of the resource as it appears in the YAML config. pub name: String, - /// [Output Only] The URL of the actual resource. + /// [Output Only] The URL of the actual resource. pub url: String, - /// [Output Only] URL of the manifest representing the current configuration of this resource. + /// [Output Only] URL of the manifest representing the current configuration of this resource. pub manifest: String, - /// [Output Only] The state of the resource. + /// [Output Only] The state of the resource. pub state: String, - /// [Output Only] The intended state of the resource. + /// [Output Only] The intended state of the resource. pub intent: String, - /// [Output Only] The type of the resource, for example ?compute.v1.instance?, or ?replicaPools.v1beta2.instanceGroupManager? + /// [Output Only] The type of the resource, for example ?compute.v1.instance?, or ?replicaPools.v1beta2.instanceGroupManager? #[serde(alias="type")] pub type_: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, } @@ -387,9 +396,9 @@ impl ResponseResult for ResourceType {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationWarningsData { - /// A key for the warning data. + /// A key for the warning data. pub key: String, - /// A warning data value corresponding to the key. + /// A warning data value corresponding to the key. pub value: String, } @@ -403,11 +412,11 @@ impl Part for OperationWarningsData {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationWarnings { - /// Optional human-readable details for this warning. + /// Optional human-readable details for this warning. pub message: String, - /// The warning type identifier for this warning. + /// The warning type identifier for this warning. pub code: String, - /// Metadata for this warning in 'key: value' format. + /// Metadata for this warning in 'key: value' format. pub data: Vec, } @@ -426,10 +435,10 @@ impl Part for OperationWarnings {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ResourcesListResponse { - /// A token used to continue a truncated list request. + /// A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Resources contained in this list response. + /// Resources contained in this list response. pub resources: Vec, } @@ -442,11 +451,11 @@ impl ResponseResult for ResourcesListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationErrorErrors { - /// An optional, human-readable error message. + /// An optional, human-readable error message. pub message: String, - /// The error type identifier for this error. + /// The error type identifier for this error. pub code: String, - /// Indicates the field in the request which caused the error. This property is optional. + /// Indicates the field in the request which caused the error. This property is optional. pub location: String, } @@ -466,17 +475,17 @@ impl Part for OperationErrorErrors {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Manifest { - /// [Output Only] The fully-expanded configuration file, including any templates and references. + /// [Output Only] The fully-expanded configuration file, including any templates and references. #[serde(alias="evaluatedConfig")] pub evaluated_config: String, - /// The YAML configuration for this manifest. + /// The YAML configuration for this manifest. pub config: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Self link for the manifest. + /// [Output Only] Self link for the manifest. #[serde(alias="selfLink")] pub self_link: String, - /// [Output Only] The name of the manifest. + /// [Output Only] The name of the manifest. pub name: String, } @@ -490,7 +499,7 @@ impl ResponseResult for Manifest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationError { - /// The array of errors encountered while processing this operation. + /// The array of errors encountered while processing this operation. pub errors: Vec, } @@ -509,7 +518,7 @@ impl Part for OperationError {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TypesListResponse { - /// Types supported by Deployment Manager + /// Types supported by Deployment Manager pub types: Vec, } @@ -527,10 +536,10 @@ impl ResponseResult for TypesListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DeploymentsListResponse { - /// A token used to continue a truncated list request. + /// A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The deployments contained in this response. + /// The deployments contained in this response. pub deployments: Vec, } @@ -551,18 +560,18 @@ impl ResponseResult for DeploymentsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Deployment { - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: Option, - /// An optional user-provided description of the deployment. + /// An optional user-provided description of the deployment. pub description: Option, /// [Input Only] The YAML configuration to use in processing this deployment. /// /// When you create a deployment, the server creates a new manifest with the given YAML configuration and sets the `manifest` property to the URL of the manifest resource. #[serde(alias="targetConfig")] pub target_config: Option, - /// The name of the deployment, which must be unique within the project. + /// The name of the deployment, which must be unique within the project. pub name: Option, - /// [Output Only] URL of the manifest representing the full configuration of this deployment. + /// [Output Only] URL of the manifest representing the full configuration of this deployment. pub manifest: Option, } @@ -582,10 +591,10 @@ impl ResponseResult for Deployment {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperationsListResponse { - /// A token used to continue a truncated list request. + /// A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Operations contained in this list response. + /// Operations contained in this list response. pub operations: Vec, } @@ -606,52 +615,52 @@ impl ResponseResult for OperationsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Operation { - /// [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE". + /// [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE". pub status: String, - /// [Output Only] The time that this operation was requested. This is in RFC 3339 format. + /// [Output Only] The time that this operation was requested. This is in RFC 3339 format. #[serde(alias="insertTime")] pub insert_time: String, - /// [Output Only] If warning messages generated during processing of this operation, this field will be populated. + /// [Output Only] If warning messages generated during processing of this operation, this field will be populated. pub warnings: Vec, - /// [Output Only] If operation fails, the HTTP error message returned, e.g. NOT FOUND. + /// [Output Only] If operation fails, the HTTP error message returned, e.g. NOT FOUND. #[serde(alias="httpErrorMessage")] pub http_error_message: String, - /// [Output Only] Unique target id which identifies a particular incarnation of the target. + /// [Output Only] Unique target id which identifies a particular incarnation of the target. #[serde(alias="targetId")] pub target_id: String, - /// [Output Only] URL of the resource the operation is mutating. + /// [Output Only] URL of the resource the operation is mutating. #[serde(alias="targetLink")] pub target_link: String, - /// [Output Only] The time that this operation was started by the server. This is in RFC 3339 format. + /// [Output Only] The time that this operation was started by the server. This is in RFC 3339 format. #[serde(alias="startTime")] pub start_time: String, - /// [Output Only] Creation timestamp in RFC3339 text format. + /// [Output Only] Creation timestamp in RFC3339 text format. #[serde(alias="creationTimestamp")] pub creation_timestamp: String, - /// [Output Only] Unique identifier for the resource; defined by the server. + /// [Output Only] Unique identifier for the resource; defined by the server. pub id: String, - /// [Output Only] Name of the operation. + /// [Output Only] Name of the operation. pub name: String, - /// [Output Only] Self link for the manifest. + /// [Output Only] Self link for the manifest. #[serde(alias="selfLink")] pub self_link: String, - /// [Output Only] Type of the operation. Examples include "insert", or "delete" + /// [Output Only] Type of the operation. Examples include "insert", or "delete" #[serde(alias="operationType")] pub operation_type: String, - /// [Output Only] If errors occurred during processing of this operation, this field will be populated. + /// [Output Only] If errors occurred during processing of this operation, this field will be populated. pub error: OperationError, - /// [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses. + /// [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses. pub progress: i32, - /// [Output Only] The time that this operation was completed. This is in RFC3339 format. + /// [Output Only] The time that this operation was completed. This is in RFC3339 format. #[serde(alias="endTime")] pub end_time: String, - /// [Output Only] If operation fails, the HTTP error status code returned, e.g. 404. + /// [Output Only] If operation fails, the HTTP error status code returned, e.g. 404. #[serde(alias="httpErrorStatusCode")] pub http_error_status_code: i32, - /// [Output Only] An optional textual description of the current status of the operation. + /// [Output Only] An optional textual description of the current status of the operation. #[serde(alias="statusMessage")] pub status_message: String, - /// [Output Only] User who requested the operation, for example "user@example.com" + /// [Output Only] User who requested the operation, for example "user@example.com" pub user: String, } @@ -670,7 +679,7 @@ impl ResponseResult for Operation {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Type { - /// Name of the type. + /// Name of the type. pub name: Option, } @@ -688,10 +697,10 @@ impl Resource for Type {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ManifestsListResponse { - /// A token used to continue a truncated list request. + /// A token used to continue a truncated list request. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Manifests contained in this list response. + /// Manifests contained in this list response. pub manifests: Vec, } @@ -737,13 +746,18 @@ pub struct OperationMethods<'a, C, NC, A> hub: &'a Deploymentmanager, } -impl<'a, C, NC, A> ResourceMethodsBuilder for OperationMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for OperationMethods<'a, C, NC, A> {} impl<'a, C, NC, A> OperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets information about a specific Operation. + /// Gets information about a specific Operation. + /// + /// # Arguments + /// + /// * `project` - The project ID for this request. + /// * `operation` - The name of the operation for this request. pub fn get(&self, project: &str, operation: &str) -> OperationGetCall<'a, C, NC, A> { OperationGetCall { hub: self.hub, @@ -757,7 +771,11 @@ impl<'a, C, NC, A> OperationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all Operations for a project. + /// Lists all Operations for a project. + /// + /// # Arguments + /// + /// * `project` - The project ID for this request. pub fn list(&self, project: &str) -> OperationListCall<'a, C, NC, A> { OperationListCall { hub: self.hub, @@ -807,13 +825,18 @@ pub struct DeploymentMethods<'a, C, NC, A> hub: &'a Deploymentmanager, } -impl<'a, C, NC, A> ResourceMethodsBuilder for DeploymentMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for DeploymentMethods<'a, C, NC, A> {} impl<'a, C, NC, A> DeploymentMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a deployment and all of the resources described by the deployment manifest. + /// Creates a deployment and all of the resources described by the deployment manifest. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - The project ID for this request. pub fn insert(&self, request: &Deployment, project: &str) -> DeploymentInsertCall<'a, C, NC, A> { DeploymentInsertCall { hub: self.hub, @@ -827,7 +850,12 @@ impl<'a, C, NC, A> DeploymentMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets information about a specific deployment. + /// Gets information about a specific deployment. + /// + /// # Arguments + /// + /// * `project` - The project ID for this request. + /// * `deployment` - The name of the deployment for this request. pub fn get(&self, project: &str, deployment: &str) -> DeploymentGetCall<'a, C, NC, A> { DeploymentGetCall { hub: self.hub, @@ -841,7 +869,11 @@ impl<'a, C, NC, A> DeploymentMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all deployments for a given project. + /// Lists all deployments for a given project. + /// + /// # Arguments + /// + /// * `project` - The project ID for this request. pub fn list(&self, project: &str) -> DeploymentListCall<'a, C, NC, A> { DeploymentListCall { hub: self.hub, @@ -856,7 +888,12 @@ impl<'a, C, NC, A> DeploymentMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a deployment and all of the resources in the deployment. + /// Deletes a deployment and all of the resources in the deployment. + /// + /// # Arguments + /// + /// * `project` - The project ID for this request. + /// * `deployment` - The name of the deployment for this request. pub fn delete(&self, project: &str, deployment: &str) -> DeploymentDeleteCall<'a, C, NC, A> { DeploymentDeleteCall { hub: self.hub, @@ -905,13 +942,17 @@ pub struct TypeMethods<'a, C, NC, A> hub: &'a Deploymentmanager, } -impl<'a, C, NC, A> ResourceMethodsBuilder for TypeMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for TypeMethods<'a, C, NC, A> {} impl<'a, C, NC, A> TypeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all Types for Deployment Manager. + /// Lists all Types for Deployment Manager. + /// + /// # Arguments + /// + /// * `project` - The project ID for this request. pub fn list(&self, project: &str) -> TypeListCall<'a, C, NC, A> { TypeListCall { hub: self.hub, @@ -961,13 +1002,19 @@ pub struct ResourceMethods<'a, C, NC, A> hub: &'a Deploymentmanager, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ResourceMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ResourceMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ResourceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets information about a single resource. + /// Gets information about a single resource. + /// + /// # Arguments + /// + /// * `project` - The project ID for this request. + /// * `deployment` - The name of the deployment for this request. + /// * `resource` - The name of the resource for this request. pub fn get(&self, project: &str, deployment: &str, resource: &str) -> ResourceGetCall<'a, C, NC, A> { ResourceGetCall { hub: self.hub, @@ -982,7 +1029,12 @@ impl<'a, C, NC, A> ResourceMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all resources in a given deployment. + /// Lists all resources in a given deployment. + /// + /// # Arguments + /// + /// * `project` - The project ID for this request. + /// * `deployment` - The name of the deployment for this request. pub fn list(&self, project: &str, deployment: &str) -> ResourceListCall<'a, C, NC, A> { ResourceListCall { hub: self.hub, @@ -1033,13 +1085,18 @@ pub struct ManifestMethods<'a, C, NC, A> hub: &'a Deploymentmanager, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ManifestMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ManifestMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ManifestMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all manifests for a given deployment. + /// Lists all manifests for a given deployment. + /// + /// # Arguments + /// + /// * `project` - The project ID for this request. + /// * `deployment` - The name of the deployment for this request. pub fn list(&self, project: &str, deployment: &str) -> ManifestListCall<'a, C, NC, A> { ManifestListCall { hub: self.hub, @@ -1055,7 +1112,13 @@ impl<'a, C, NC, A> ManifestMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets information about a specific manifest. + /// Gets information about a specific manifest. + /// + /// # Arguments + /// + /// * `project` - The project ID for this request. + /// * `deployment` - The name of the deployment for this request. + /// * `manifest` - The name of the manifest for this request. pub fn get(&self, project: &str, deployment: &str, manifest: &str) -> ManifestGetCall<'a, C, NC, A> { ManifestGetCall { hub: self.hub, @@ -1080,7 +1143,7 @@ impl<'a, C, NC, A> ManifestMethods<'a, C, NC, A> { /// Gets information about a specific Operation. /// /// A builder for the *get* method supported by a *operation* resource. -/// It is not used directly, but through a `OperationMethods`. +/// It is not used directly, but through a `OperationMethods` instance. /// /// # Example /// @@ -1140,7 +1203,7 @@ impl<'a, C, NC, A> OperationGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "project", "operation"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1193,7 +1256,7 @@ impl<'a, C, NC, A> OperationGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1205,7 +1268,6 @@ impl<'a, C, NC, A> OperationGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -1215,7 +1277,7 @@ impl<'a, C, NC, A> OperationGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1226,7 +1288,7 @@ impl<'a, C, NC, A> OperationGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1235,13 +1297,13 @@ impl<'a, C, NC, A> OperationGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1253,7 +1315,7 @@ impl<'a, C, NC, A> OperationGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID for this request. + /// The project ID for this request. pub fn project(mut self, new_value: &str) -> OperationGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -1263,7 +1325,7 @@ impl<'a, C, NC, A> OperationGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the operation for this request. + /// The name of the operation for this request. pub fn operation(mut self, new_value: &str) -> OperationGetCall<'a, C, NC, A> { self._operation = new_value.to_string(); self @@ -1324,7 +1386,7 @@ impl<'a, C, NC, A> OperationGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Lists all Operations for a project. /// /// A builder for the *list* method supported by a *operation* resource. -/// It is not used directly, but through a `OperationMethods`. +/// It is not used directly, but through a `OperationMethods` instance. /// /// # Example /// @@ -1392,7 +1454,7 @@ impl<'a, C, NC, A> OperationListCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "project", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1445,7 +1507,7 @@ impl<'a, C, NC, A> OperationListCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1457,7 +1519,6 @@ impl<'a, C, NC, A> OperationListCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -1467,7 +1528,7 @@ impl<'a, C, NC, A> OperationListCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1478,7 +1539,7 @@ impl<'a, C, NC, A> OperationListCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1487,13 +1548,13 @@ impl<'a, C, NC, A> OperationListCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1505,7 +1566,7 @@ impl<'a, C, NC, A> OperationListCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID for this request. + /// The project ID for this request. pub fn project(mut self, new_value: &str) -> OperationListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -1513,7 +1574,7 @@ impl<'a, C, NC, A> OperationListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *page token* query property to the given value. /// /// - /// Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request. + /// Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request. pub fn page_token(mut self, new_value: &str) -> OperationListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -1521,7 +1582,7 @@ impl<'a, C, NC, A> OperationListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *max results* query property to the given value. /// /// - /// Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default: 50) + /// Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default: 50) pub fn max_results(mut self, new_value: i32) -> OperationListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -1582,7 +1643,7 @@ impl<'a, C, NC, A> OperationListCall<'a, C, NC, A> where NC: hyper::net::Network /// Creates a deployment and all of the resources described by the deployment manifest. /// /// A builder for the *insert* method supported by a *deployment* resource. -/// It is not used directly, but through a `DeploymentMethods`. +/// It is not used directly, but through a `DeploymentMethods` instance. /// /// # Example /// @@ -1647,7 +1708,7 @@ impl<'a, C, NC, A> DeploymentInsertCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1704,7 +1765,7 @@ impl<'a, C, NC, A> DeploymentInsertCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1720,7 +1781,6 @@ impl<'a, C, NC, A> DeploymentInsertCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -1730,7 +1790,7 @@ impl<'a, C, NC, A> DeploymentInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1741,7 +1801,7 @@ impl<'a, C, NC, A> DeploymentInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1750,13 +1810,13 @@ impl<'a, C, NC, A> DeploymentInsertCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1777,7 +1837,7 @@ impl<'a, C, NC, A> DeploymentInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID for this request. + /// The project ID for this request. pub fn project(mut self, new_value: &str) -> DeploymentInsertCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -1838,7 +1898,7 @@ impl<'a, C, NC, A> DeploymentInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Gets information about a specific deployment. /// /// A builder for the *get* method supported by a *deployment* resource. -/// It is not used directly, but through a `DeploymentMethods`. +/// It is not used directly, but through a `DeploymentMethods` instance. /// /// # Example /// @@ -1898,7 +1958,7 @@ impl<'a, C, NC, A> DeploymentGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "project", "deployment"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1951,7 +2011,7 @@ impl<'a, C, NC, A> DeploymentGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1963,7 +2023,6 @@ impl<'a, C, NC, A> DeploymentGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -1973,7 +2032,7 @@ impl<'a, C, NC, A> DeploymentGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1984,7 +2043,7 @@ impl<'a, C, NC, A> DeploymentGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1993,13 +2052,13 @@ impl<'a, C, NC, A> DeploymentGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2011,7 +2070,7 @@ impl<'a, C, NC, A> DeploymentGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID for this request. + /// The project ID for this request. pub fn project(mut self, new_value: &str) -> DeploymentGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -2021,7 +2080,7 @@ impl<'a, C, NC, A> DeploymentGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the deployment for this request. + /// The name of the deployment for this request. pub fn deployment(mut self, new_value: &str) -> DeploymentGetCall<'a, C, NC, A> { self._deployment = new_value.to_string(); self @@ -2082,7 +2141,7 @@ impl<'a, C, NC, A> DeploymentGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Lists all deployments for a given project. /// /// A builder for the *list* method supported by a *deployment* resource. -/// It is not used directly, but through a `DeploymentMethods`. +/// It is not used directly, but through a `DeploymentMethods` instance. /// /// # Example /// @@ -2150,7 +2209,7 @@ impl<'a, C, NC, A> DeploymentListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2203,7 +2262,7 @@ impl<'a, C, NC, A> DeploymentListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2215,7 +2274,6 @@ impl<'a, C, NC, A> DeploymentListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -2225,7 +2283,7 @@ impl<'a, C, NC, A> DeploymentListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2236,7 +2294,7 @@ impl<'a, C, NC, A> DeploymentListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2245,13 +2303,13 @@ impl<'a, C, NC, A> DeploymentListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2263,7 +2321,7 @@ impl<'a, C, NC, A> DeploymentListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID for this request. + /// The project ID for this request. pub fn project(mut self, new_value: &str) -> DeploymentListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -2271,7 +2329,7 @@ impl<'a, C, NC, A> DeploymentListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *page token* query property to the given value. /// /// - /// Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request. + /// Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request. pub fn page_token(mut self, new_value: &str) -> DeploymentListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2279,7 +2337,7 @@ impl<'a, C, NC, A> DeploymentListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *max results* query property to the given value. /// /// - /// Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default: 50) + /// Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default: 50) pub fn max_results(mut self, new_value: i32) -> DeploymentListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2340,7 +2398,7 @@ impl<'a, C, NC, A> DeploymentListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Deletes a deployment and all of the resources in the deployment. /// /// A builder for the *delete* method supported by a *deployment* resource. -/// It is not used directly, but through a `DeploymentMethods`. +/// It is not used directly, but through a `DeploymentMethods` instance. /// /// # Example /// @@ -2400,7 +2458,7 @@ impl<'a, C, NC, A> DeploymentDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "project", "deployment"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2453,7 +2511,7 @@ impl<'a, C, NC, A> DeploymentDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2465,7 +2523,6 @@ impl<'a, C, NC, A> DeploymentDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -2475,7 +2532,7 @@ impl<'a, C, NC, A> DeploymentDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2486,7 +2543,7 @@ impl<'a, C, NC, A> DeploymentDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2495,13 +2552,13 @@ impl<'a, C, NC, A> DeploymentDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2513,7 +2570,7 @@ impl<'a, C, NC, A> DeploymentDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID for this request. + /// The project ID for this request. pub fn project(mut self, new_value: &str) -> DeploymentDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -2523,7 +2580,7 @@ impl<'a, C, NC, A> DeploymentDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the deployment for this request. + /// The name of the deployment for this request. pub fn deployment(mut self, new_value: &str) -> DeploymentDeleteCall<'a, C, NC, A> { self._deployment = new_value.to_string(); self @@ -2584,7 +2641,7 @@ impl<'a, C, NC, A> DeploymentDeleteCall<'a, C, NC, A> where NC: hyper::net::Netw /// Lists all Types for Deployment Manager. /// /// A builder for the *list* method supported by a *type* resource. -/// It is not used directly, but through a `TypeMethods`. +/// It is not used directly, but through a `TypeMethods` instance. /// /// # Example /// @@ -2652,7 +2709,7 @@ impl<'a, C, NC, A> TypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "project", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2705,7 +2762,7 @@ impl<'a, C, NC, A> TypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2717,7 +2774,6 @@ impl<'a, C, NC, A> TypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -2727,7 +2783,7 @@ impl<'a, C, NC, A> TypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2738,7 +2794,7 @@ impl<'a, C, NC, A> TypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2747,13 +2803,13 @@ impl<'a, C, NC, A> TypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2765,7 +2821,7 @@ impl<'a, C, NC, A> TypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID for this request. + /// The project ID for this request. pub fn project(mut self, new_value: &str) -> TypeListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -2773,7 +2829,7 @@ impl<'a, C, NC, A> TypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *page token* query property to the given value. /// /// - /// Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request. + /// Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request. pub fn page_token(mut self, new_value: &str) -> TypeListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2781,7 +2837,7 @@ impl<'a, C, NC, A> TypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *max results* query property to the given value. /// /// - /// Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default: 50) + /// Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default: 50) pub fn max_results(mut self, new_value: i32) -> TypeListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2842,7 +2898,7 @@ impl<'a, C, NC, A> TypeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Gets information about a single resource. /// /// A builder for the *get* method supported by a *resource* resource. -/// It is not used directly, but through a `ResourceMethods`. +/// It is not used directly, but through a `ResourceMethods` instance. /// /// # Example /// @@ -2904,7 +2960,7 @@ impl<'a, C, NC, A> ResourceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "project", "deployment", "resource"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2957,7 +3013,7 @@ impl<'a, C, NC, A> ResourceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2969,7 +3025,6 @@ impl<'a, C, NC, A> ResourceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -2979,7 +3034,7 @@ impl<'a, C, NC, A> ResourceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2990,7 +3045,7 @@ impl<'a, C, NC, A> ResourceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2999,13 +3054,13 @@ impl<'a, C, NC, A> ResourceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3017,7 +3072,7 @@ impl<'a, C, NC, A> ResourceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID for this request. + /// The project ID for this request. pub fn project(mut self, new_value: &str) -> ResourceGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -3027,7 +3082,7 @@ impl<'a, C, NC, A> ResourceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the deployment for this request. + /// The name of the deployment for this request. pub fn deployment(mut self, new_value: &str) -> ResourceGetCall<'a, C, NC, A> { self._deployment = new_value.to_string(); self @@ -3037,7 +3092,7 @@ impl<'a, C, NC, A> ResourceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the resource for this request. + /// The name of the resource for this request. pub fn resource(mut self, new_value: &str) -> ResourceGetCall<'a, C, NC, A> { self._resource = new_value.to_string(); self @@ -3098,7 +3153,7 @@ impl<'a, C, NC, A> ResourceGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Lists all resources in a given deployment. /// /// A builder for the *list* method supported by a *resource* resource. -/// It is not used directly, but through a `ResourceMethods`. +/// It is not used directly, but through a `ResourceMethods` instance. /// /// # Example /// @@ -3168,7 +3223,7 @@ impl<'a, C, NC, A> ResourceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "project", "deployment", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3221,7 +3276,7 @@ impl<'a, C, NC, A> ResourceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3233,7 +3288,6 @@ impl<'a, C, NC, A> ResourceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -3243,7 +3297,7 @@ impl<'a, C, NC, A> ResourceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3254,7 +3308,7 @@ impl<'a, C, NC, A> ResourceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3263,13 +3317,13 @@ impl<'a, C, NC, A> ResourceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3281,7 +3335,7 @@ impl<'a, C, NC, A> ResourceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID for this request. + /// The project ID for this request. pub fn project(mut self, new_value: &str) -> ResourceListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -3291,7 +3345,7 @@ impl<'a, C, NC, A> ResourceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the deployment for this request. + /// The name of the deployment for this request. pub fn deployment(mut self, new_value: &str) -> ResourceListCall<'a, C, NC, A> { self._deployment = new_value.to_string(); self @@ -3299,7 +3353,7 @@ impl<'a, C, NC, A> ResourceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request. + /// Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request. pub fn page_token(mut self, new_value: &str) -> ResourceListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -3307,7 +3361,7 @@ impl<'a, C, NC, A> ResourceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default: 50) + /// Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default: 50) pub fn max_results(mut self, new_value: i32) -> ResourceListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -3368,7 +3422,7 @@ impl<'a, C, NC, A> ResourceListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Lists all manifests for a given deployment. /// /// A builder for the *list* method supported by a *manifest* resource. -/// It is not used directly, but through a `ManifestMethods`. +/// It is not used directly, but through a `ManifestMethods` instance. /// /// # Example /// @@ -3438,7 +3492,7 @@ impl<'a, C, NC, A> ManifestListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "project", "deployment", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3491,7 +3545,7 @@ impl<'a, C, NC, A> ManifestListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3503,7 +3557,6 @@ impl<'a, C, NC, A> ManifestListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -3513,7 +3566,7 @@ impl<'a, C, NC, A> ManifestListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3524,7 +3577,7 @@ impl<'a, C, NC, A> ManifestListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3533,13 +3586,13 @@ impl<'a, C, NC, A> ManifestListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3551,7 +3604,7 @@ impl<'a, C, NC, A> ManifestListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID for this request. + /// The project ID for this request. pub fn project(mut self, new_value: &str) -> ManifestListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -3561,7 +3614,7 @@ impl<'a, C, NC, A> ManifestListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the deployment for this request. + /// The name of the deployment for this request. pub fn deployment(mut self, new_value: &str) -> ManifestListCall<'a, C, NC, A> { self._deployment = new_value.to_string(); self @@ -3569,7 +3622,7 @@ impl<'a, C, NC, A> ManifestListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request. + /// Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request. pub fn page_token(mut self, new_value: &str) -> ManifestListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -3577,7 +3630,7 @@ impl<'a, C, NC, A> ManifestListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default: 50) + /// Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default: 50) pub fn max_results(mut self, new_value: i32) -> ManifestListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -3638,7 +3691,7 @@ impl<'a, C, NC, A> ManifestListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Gets information about a specific manifest. /// /// A builder for the *get* method supported by a *manifest* resource. -/// It is not used directly, but through a `ManifestMethods`. +/// It is not used directly, but through a `ManifestMethods` instance. /// /// # Example /// @@ -3700,7 +3753,7 @@ impl<'a, C, NC, A> ManifestGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "project", "deployment", "manifest"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3753,7 +3806,7 @@ impl<'a, C, NC, A> ManifestGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3765,7 +3818,6 @@ impl<'a, C, NC, A> ManifestGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -3775,7 +3827,7 @@ impl<'a, C, NC, A> ManifestGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3786,7 +3838,7 @@ impl<'a, C, NC, A> ManifestGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3795,13 +3847,13 @@ impl<'a, C, NC, A> ManifestGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3813,7 +3865,7 @@ impl<'a, C, NC, A> ManifestGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The project ID for this request. + /// The project ID for this request. pub fn project(mut self, new_value: &str) -> ManifestGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -3823,7 +3875,7 @@ impl<'a, C, NC, A> ManifestGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the deployment for this request. + /// The name of the deployment for this request. pub fn deployment(mut self, new_value: &str) -> ManifestGetCall<'a, C, NC, A> { self._deployment = new_value.to_string(); self @@ -3833,7 +3885,7 @@ impl<'a, C, NC, A> ManifestGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The name of the manifest for this request. + /// The name of the manifest for this request. pub fn manifest(mut self, new_value: &str) -> ManifestGetCall<'a, C, NC, A> { self._manifest = new_value.to_string(); self diff --git a/gen/dfareporting2/Cargo.toml b/gen/dfareporting2/Cargo.toml index 86d5b5fab9..86fe31f67b 100644 --- a/gen/dfareporting2/Cargo.toml +++ b/gen/dfareporting2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dfareporting2" -version = "0.1.1+20150223" +version = "0.1.2+20150223" authors = ["Sebastian Thiel "] description = "A complete library to interact with dfareporting (protocol v2.0)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2" @@ -16,7 +16,7 @@ keywords = ["dfareporting", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/dfareporting2/README.md b/gen/dfareporting2/README.md index 024ffc518c..ab2dad6360 100644 --- a/gen/dfareporting2/README.md +++ b/gen/dfareporting2/README.md @@ -1,11 +1,11 @@ The `google-dfareporting2` library allows access to all features of the *Google dfareporting* service. -This documentation was generated from *dfareporting* crate version *0.1.1+20150223*, where *20150223* is the exact revision of the *dfareporting:v2.0* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *dfareporting* crate version *0.1.2+20150223*, where *20150223* is the exact revision of the *dfareporting:v2.0* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *dfareporting* *v2* API can be found at the [official documentation site](https://developers.google.com/doubleclick-advertisers/reporting/). @@ -128,6 +128,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-dfareporting2/struct.Dfareporting.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-dfareporting2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-dfareporting2/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-dfareporting2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -137,6 +139,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-dfareporting2/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -180,7 +184,7 @@ google-dfareporting2 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-dfareporting2" as dfareporting2; -use dfareporting2::Result; +use dfareporting2::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use dfareporting2::Dfareporting; @@ -209,15 +213,17 @@ let result = hub.reports().list("profileId") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -230,7 +236,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-dfareporting2/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-dfareporting2/trait.ResponseResult.html), it will return that by default. @@ -253,8 +259,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-dfareporting2/ ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-dfareporting2/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-dfareporting2/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-dfareporting2/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-dfareporting2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-dfareporting2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/dfareporting2/src/cmn.rs b/gen/dfareporting2/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/dfareporting2/src/cmn.rs +++ b/gen/dfareporting2/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/dfareporting2/src/lib.rs b/gen/dfareporting2/src/lib.rs index cb5c347eff..25679a7b8f 100644 --- a/gen/dfareporting2/src/lib.rs +++ b/gen/dfareporting2/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *dfareporting* crate version *0.1.1+20150223*, where *20150223* is the exact revision of the *dfareporting:v2.0* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *dfareporting* crate version *0.1.2+20150223*, where *20150223* is the exact revision of the *dfareporting:v2.0* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *dfareporting* *v2* API can be found at the //! [official documentation site](https://developers.google.com/doubleclick-advertisers/reporting/). @@ -128,6 +128,8 @@ //! //! * **[Hub](struct.Dfareporting.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -137,6 +139,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -180,7 +184,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-dfareporting2" as dfareporting2; -//! use dfareporting2::Result; +//! use dfareporting2::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -210,15 +214,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -231,7 +237,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -254,8 +260,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -304,7 +311,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -354,7 +361,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-dfareporting2" as dfareporting2; -/// use dfareporting2::Result; +/// use dfareporting2::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -384,15 +391,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -413,7 +422,7 @@ impl<'a, C, NC, A> Dfareporting Dfareporting { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -564,7 +573,7 @@ impl<'a, C, NC, A> Dfareporting } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -589,9 +598,9 @@ impl<'a, C, NC, A> Dfareporting /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperatingSystemsListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#operatingSystemsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#operatingSystemsListResponse". pub kind: String, - /// Operating system collection + /// Operating system collection #[serde(alias="operatingSystems")] pub operating_systems: Vec, } @@ -605,24 +614,24 @@ impl ResponseResult for OperatingSystemsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DirectorySiteSettings { - /// Whether this site accepts interstitial ads. + /// Whether this site accepts interstitial ads. #[serde(alias="interstitialPlacementAccepted")] pub interstitial_placement_accepted: bool, - /// Whether this directory site has disabled Nielsen OCR reach ratings. + /// Whether this directory site has disabled Nielsen OCR reach ratings. #[serde(alias="nielsenOcrOptOut")] pub nielsen_ocr_opt_out: bool, - /// Whether this directory site has disabled active view creatives. + /// Whether this directory site has disabled active view creatives. #[serde(alias="activeViewOptOut")] pub active_view_opt_out: bool, - /// Whether this directory site has disabled active view for in-stream video creatives. + /// Whether this directory site has disabled active view for in-stream video creatives. #[serde(alias="videoActiveViewOptOut")] pub video_active_view_opt_out: bool, - /// Directory site DFP settings. + /// Directory site DFP settings. pub dfp_settings: DfpSettings, - /// Whether this directory site has disabled generation of Verification tags. + /// Whether this directory site has disabled generation of Verification tags. #[serde(alias="verificationTagOptOut")] pub verification_tag_opt_out: bool, - /// Whether this site accepts in-stream video ads. + /// Whether this site accepts in-stream video ads. pub instream_video_placement_accepted: bool, } @@ -640,17 +649,17 @@ impl Part for DirectorySiteSettings {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct MobileCarrier { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#mobileCarrier". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#mobileCarrier". pub kind: Option, - /// DART ID of the country to which this mobile carrier belongs. + /// DART ID of the country to which this mobile carrier belongs. #[serde(alias="countryDartId")] pub country_dart_id: Option, - /// ID of this mobile carrier. + /// ID of this mobile carrier. pub id: Option, - /// Country code of the country to which this mobile carrier belongs. + /// Country code of the country to which this mobile carrier belongs. #[serde(alias="countryCode")] pub country_code: Option, - /// Name of this mobile carrier. + /// Name of this mobile carrier. pub name: Option, } @@ -672,17 +681,17 @@ impl Resource for MobileCarrier {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Subaccount { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#subaccount". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#subaccount". pub kind: Option, - /// ID of the account that contains this subaccount. This is a read-only field that can be left blank. + /// ID of the account that contains this subaccount. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, - /// IDs of the available user role permissions for this subaccount. + /// IDs of the available user role permissions for this subaccount. #[serde(alias="availablePermissionIds")] pub available_permission_ids: Option>, - /// ID of this subaccount. This is a read-only, auto-generated field. + /// ID of this subaccount. This is a read-only, auto-generated field. pub id: Option, - /// Name of this subaccount. This is a required field. Must be less than 128 characters long and be unique among subaccounts of the same account. + /// Name of this subaccount. This is a required field. Must be less than 128 characters long and be unique among subaccounts of the same account. pub name: Option, } @@ -703,11 +712,11 @@ impl ResponseResult for Subaccount {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountPermissionGroup { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountPermissionGroup". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountPermissionGroup". pub kind: String, - /// ID of this account permission group. + /// ID of this account permission group. pub id: String, - /// Name of this account permission group. + /// Name of this account permission group. pub name: String, } @@ -726,14 +735,14 @@ impl ResponseResult for AccountPermissionGroup {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DimensionValueList { - /// Continuation token used to page through dimension values. To retrieve the next page of results, set the next request's "pageToken" to the value of this field. The page token is only valid for a limited amount of time and should not be persisted. + /// Continuation token used to page through dimension values. To retrieve the next page of results, set the next request's "pageToken" to the value of this field. The page token is only valid for a limited amount of time and should not be persisted. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The dimension values returned in this response. + /// The dimension values returned in this response. pub items: Vec, - /// The kind of list this is, in this case dfareporting#dimensionValueList. + /// The kind of list this is, in this case dfareporting#dimensionValueList. pub kind: String, - /// The eTag of this response for caching purposes. + /// The eTag of this response for caching purposes. pub etag: String, } @@ -751,13 +760,13 @@ impl ResponseResult for DimensionValueList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CampaignCreativeAssociationsListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Campaign creative association collection + /// Campaign creative association collection #[serde(alias="campaignCreativeAssociations")] pub campaign_creative_associations: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#campaignCreativeAssociationsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#campaignCreativeAssociationsListResponse". pub kind: String, } @@ -775,12 +784,12 @@ impl ResponseResult for CampaignCreativeAssociationsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct FloodlightActivitiesListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivitiesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivitiesListResponse". pub kind: String, - /// Floodlight activity collection + /// Floodlight activity collection #[serde(alias="floodlightActivities")] pub floodlight_activities: Vec, } @@ -799,10 +808,10 @@ impl ResponseResult for FloodlightActivitiesListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UserRolePermissionGroupsListResponse { - /// User role permission group collection + /// User role permission group collection #[serde(alias="userRolePermissionGroups")] pub user_role_permission_groups: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolePermissionGroupsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolePermissionGroupsListResponse". pub kind: String, } @@ -821,14 +830,14 @@ impl ResponseResult for UserRolePermissionGroupsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct FileList { - /// Continuation token used to page through files. To retrieve the next page of results, set the next request's "pageToken" to the value of this field. The page token is only valid for a limited amount of time and should not be persisted. + /// Continuation token used to page through files. To retrieve the next page of results, set the next request's "pageToken" to the value of this field. The page token is only valid for a limited amount of time and should not be persisted. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The files returned in this response. + /// The files returned in this response. pub items: Vec, - /// The kind of list this is, in this case dfareporting#fileList. + /// The kind of list this is, in this case dfareporting#fileList. pub kind: String, - /// The eTag of this response for caching purposes. + /// The eTag of this response for caching purposes. pub etag: String, } @@ -841,9 +850,9 @@ impl ResponseResult for FileList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomRichMediaEvents { - /// The kind of resource this is, in this case dfareporting#customRichMediaEvents. + /// The kind of resource this is, in this case dfareporting#customRichMediaEvents. pub kind: String, - /// List of custom rich media event IDs. Dimension values must be all of type dfa:richMediaEventTypeIdAndName. + /// List of custom rich media event IDs. Dimension values must be all of type dfa:richMediaEventTypeIdAndName. #[serde(alias="filteredEventIds")] pub filtered_event_ids: Vec, } @@ -857,9 +866,9 @@ impl Part for CustomRichMediaEvents {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventTagOverride { - /// Whether this override is enabled. + /// Whether this override is enabled. pub enabled: bool, - /// ID of this event tag override. This is a read-only, auto-generated field. + /// ID of this event tag override. This is a read-only, auto-generated field. pub id: String, } @@ -877,18 +886,18 @@ impl Part for EventTagOverride {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountActiveAdSummary { - /// Ads that can be activated for the account. + /// Ads that can be activated for the account. #[serde(alias="availableAds")] pub available_ads: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountActiveAdSummary". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountActiveAdSummary". pub kind: String, - /// ID of the account. + /// ID of the account. #[serde(alias="accountId")] pub account_id: String, - /// Ads that have been activated for the account + /// Ads that have been activated for the account #[serde(alias="activeAds")] pub active_ads: String, - /// Maximum number of active ads allowed for the account. + /// Maximum number of active ads allowed for the account. #[serde(alias="activeAdsLimitTier")] pub active_ads_limit_tier: String, } @@ -902,10 +911,10 @@ impl ResponseResult for AccountActiveAdSummary {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LookbackConfiguration { - /// Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. + /// Lookback window, in days, from the last time a given user clicked on one of your ads. If you enter 0, clicks will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. #[serde(alias="clickDuration")] pub click_duration: i32, - /// Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. + /// Lookback window, in days, from the last time a given user viewed one of your ads. If you enter 0, impressions will not be considered as triggering events for floodlight tracking. If you leave this field blank, the default value for your account will be used. #[serde(alias="postImpressionActivitiesDuration")] pub post_impression_activities_duration: i32, } @@ -924,9 +933,9 @@ impl Part for LookbackConfiguration {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct FloodlightActivitiesGenerateTagResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivitiesGenerateTagResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivitiesGenerateTagResponse". pub kind: String, - /// Generated tag for this floodlight activity. + /// Generated tag for this floodlight activity. #[serde(alias="floodlightActivityTag")] pub floodlight_activity_tag: String, } @@ -940,22 +949,22 @@ impl ResponseResult for FloodlightActivitiesGenerateTagResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SiteSettings { - /// Whether brand safe ads are disabled for this site. + /// Whether brand safe ads are disabled for this site. #[serde(alias="disableBrandSafeAds")] pub disable_brand_safe_ads: bool, - /// Site-wide creative settings. + /// Site-wide creative settings. #[serde(alias="creativeSettings")] pub creative_settings: CreativeSettings, - /// Whether active view creatives are disabled for this site. + /// Whether active view creatives are disabled for this site. #[serde(alias="activeViewOptOut")] pub active_view_opt_out: bool, - /// Lookback window settings for this site. + /// Lookback window settings for this site. #[serde(alias="lookbackConfiguration")] pub lookback_configuration: LookbackConfiguration, - /// Whether new cookies are disabled for this site. + /// Whether new cookies are disabled for this site. #[serde(alias="disableNewCookie")] pub disable_new_cookie: bool, - /// Configuration settings for dynamic and image floodlight tags. + /// Configuration settings for dynamic and image floodlight tags. #[serde(alias="tagSetting")] pub tag_setting: TagSetting, } @@ -996,44 +1005,44 @@ pub struct AccountUserProfile { /// - "zh-CN" (Chinese Simplified) /// - "zh-TW" (Chinese Traditional) pub locale: Option, - /// Filter that describes which sites are visible to the user profile. + /// Filter that describes which sites are visible to the user profile. #[serde(alias="siteFilter")] pub site_filter: Option, - /// Filter that describes which campaigns are visible to the user profile. + /// Filter that describes which campaigns are visible to the user profile. #[serde(alias="campaignFilter")] pub campaign_filter: Option, - /// User role ID of the user profile. This is a required field. + /// User role ID of the user profile. This is a required field. #[serde(alias="userRoleId")] pub user_role_id: Option, - /// User type of the user profile. This is a read-only field that can be left blank. + /// User type of the user profile. This is a read-only field that can be left blank. #[serde(alias="userAccessType")] pub user_access_type: Option, - /// Whether this user profile is active. This defaults to false, and must be set true on insert for the user profile to be usable. + /// Whether this user profile is active. This defaults to false, and must be set true on insert for the user profile to be usable. pub active: Option, - /// ID of the user profile. This is a read-only, auto-generated field. + /// ID of the user profile. This is a read-only, auto-generated field. pub id: Option, - /// Account ID of the user profile. This is a read-only field that can be left blank. + /// Account ID of the user profile. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountUserProfile". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountUserProfile". pub kind: Option, - /// Subaccount ID of the user profile. This is a read-only field that can be left blank. + /// Subaccount ID of the user profile. This is a read-only field that can be left blank. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Filter that describes which user roles are visible to the user profile. + /// Filter that describes which user roles are visible to the user profile. #[serde(alias="userRoleFilter")] pub user_role_filter: Option, - /// Trafficker type of this user profile. + /// Trafficker type of this user profile. #[serde(alias="traffickerType")] pub trafficker_type: Option, - /// Comments for this user profile. + /// Comments for this user profile. pub comments: Option, - /// Name of the user profile. This is a required field. Must be less than 64 characters long, must be globally unique, and cannot contain whitespace or any of the following characters: "&;"#%,". + /// Name of the user profile. This is a required field. Must be less than 64 characters long, must be globally unique, and cannot contain whitespace or any of the following characters: "&;"#%,". pub name: Option, - /// Filter that describes which advertisers are visible to the user profile. + /// Filter that describes which advertisers are visible to the user profile. #[serde(alias="advertiserFilter")] pub advertiser_filter: Option, - /// Email of the user profile. The email addresss must be linked to a Google Account. This field is required on insertion and is read-only after insertion. + /// Email of the user profile. The email addresss must be linked to a Google Account. This field is required on insertion and is read-only after insertion. pub email: Option, } @@ -1048,10 +1057,10 @@ impl ResponseResult for AccountUserProfile {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TagSettings { - /// Whether dynamic floodlight tags are enabled. + /// Whether dynamic floodlight tags are enabled. #[serde(alias="dynamicTagEnabled")] pub dynamic_tag_enabled: bool, - /// Whether image tags are enabled. + /// Whether image tags are enabled. #[serde(alias="imageTagEnabled")] pub image_tag_enabled: bool, } @@ -1070,20 +1079,20 @@ impl Part for TagSettings {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperatingSystemVersion { - /// Major version (leftmost number) of this operating system version. + /// Major version (leftmost number) of this operating system version. #[serde(alias="majorVersion")] pub major_version: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#operatingSystemVersion". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#operatingSystemVersion". pub kind: Option, - /// Minor version (number after first dot on the left) of this operating system version. + /// Minor version (number after first dot on the left) of this operating system version. #[serde(alias="minorVersion")] pub minor_version: Option, - /// Name of this operating system version. + /// Name of this operating system version. pub name: Option, - /// Operating system of this operating system version. + /// Operating system of this operating system version. #[serde(alias="operatingSystem")] pub operating_system: Option, - /// ID of this operating system version. + /// ID of this operating system version. pub id: Option, } @@ -1096,13 +1105,13 @@ impl Resource for OperatingSystemVersion {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportFloodlightCriteriaReportProperties { - /// Include conversions that have no associated cookies and no exposures. It’s therefore impossible to know how the user was exposed to your ads during the lookback window prior to a conversion. + /// Include conversions that have no associated cookies and no exposures. It’s therefore impossible to know how the user was exposed to your ads during the lookback window prior to a conversion. #[serde(alias="includeUnattributedIPConversions")] pub include_unattributed_ip_conversions: bool, - /// Include conversions of users with a DoubleClick cookie but without an exposure. That means the user did not click or see an ad from the advertiser within the Floodlight group, or that the interaction happened outside the lookback window. + /// Include conversions of users with a DoubleClick cookie but without an exposure. That means the user did not click or see an ad from the advertiser within the Floodlight group, or that the interaction happened outside the lookback window. #[serde(alias="includeUnattributedCookieConversions")] pub include_unattributed_cookie_conversions: bool, - /// Include conversions that have no cookie, but do have an exposure path. + /// Include conversions that have no cookie, but do have an exposure path. #[serde(alias="includeAttributedIPConversions")] pub include_attributed_ip_conversions: bool, } @@ -1117,10 +1126,10 @@ impl Part for ReportFloodlightCriteriaReportProperties {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeFieldAssignment { - /// ID of the creative field. + /// ID of the creative field. #[serde(alias="creativeFieldId")] pub creative_field_id: String, - /// ID of the creative field value. + /// ID of the creative field value. #[serde(alias="creativeFieldValueId")] pub creative_field_value_id: String, } @@ -1142,13 +1151,13 @@ impl Part for CreativeFieldAssignment {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Account { - /// File size limit in kilobytes of Rich Media teaser creatives. Must be between 1 and 10240. + /// File size limit in kilobytes of Rich Media teaser creatives. Must be between 1 and 10240. #[serde(alias="teaserSizeLimit")] pub teaser_size_limit: Option, - /// Whether to serve creatives with Active View tags. If disabled, viewability data will not be available for any impressions. + /// Whether to serve creatives with Active View tags. If disabled, viewability data will not be available for any impressions. #[serde(alias="activeViewOptOut")] pub active_view_opt_out: Option, - /// Description of this account. + /// Description of this account. pub description: Option, /// Locale of this account. /// Acceptable values are: @@ -1169,36 +1178,36 @@ pub struct Account { /// - "zh-CN" (Chinese Simplified) /// - "zh-TW" (Chinese Traditional) pub locale: Option, - /// Profile for this account. This is a read-only field that can be left blank. + /// Profile for this account. This is a read-only field that can be left blank. #[serde(alias="accountProfile")] pub account_profile: Option, - /// Whether this account is active. + /// Whether this account is active. pub active: Option, - /// Whether campaigns created in this account will be enabled for comScore vCE by default. + /// Whether campaigns created in this account will be enabled for comScore vCE by default. #[serde(alias="comscoreVceEnabled")] pub comscore_vce_enabled: Option, - /// ID of this account. This is a read-only, auto-generated field. + /// ID of this account. This is a read-only, auto-generated field. pub id: Option, - /// User role permissions available to the user roles of this account. + /// User role permissions available to the user roles of this account. #[serde(alias="availablePermissionIds")] pub available_permission_ids: Option>, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#account". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#account". pub kind: Option, - /// ID of the country associated with this account. + /// ID of the country associated with this account. #[serde(alias="countryId")] pub country_id: Option, - /// Name of this account. This is a required field, and must be less than 128 characters long and be globally unique. + /// Name of this account. This is a required field, and must be less than 128 characters long and be globally unique. pub name: Option, - /// Maximum image size allowed for this account. + /// Maximum image size allowed for this account. #[serde(alias="maximumImageSize")] pub maximum_image_size: Option, - /// Whether campaigns created in this account will be enabled for Nielsen OCR reach ratings by default. + /// Whether campaigns created in this account will be enabled for Nielsen OCR reach ratings by default. #[serde(alias="nielsenOcrEnabled")] pub nielsen_ocr_enabled: Option, - /// Default placement dimensions for this account. + /// Default placement dimensions for this account. #[serde(alias="defaultCreativeSizeId")] pub default_creative_size_id: Option, - /// Account permissions assigned to this account. + /// Account permissions assigned to this account. #[serde(alias="accountPermissionIds")] pub account_permission_ids: Option>, /// ID of currency associated with this account. This is a required field. @@ -1241,10 +1250,10 @@ pub struct Account { /// - "36" for GTQ #[serde(alias="currencyId")] pub currency_id: Option, - /// Reporting configuration of this account. + /// Reporting configuration of this account. #[serde(alias="reportsConfiguration")] pub reports_configuration: Option, - /// Maximum number of active ads allowed for this account. + /// Maximum number of active ads allowed for this account. #[serde(alias="activeAdsLimitTier")] pub active_ads_limit_tier: Option, } @@ -1272,10 +1281,10 @@ pub struct DayPartTargeting { /// - "SATURDAY" #[serde(alias="daysOfWeek")] pub days_of_week: Vec, - /// Hours of the day when the ad will serve. Must be an integer between 0 and 23 (inclusive), where 0 is midnight to 1 AM, and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example, if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm. + /// Hours of the day when the ad will serve. Must be an integer between 0 and 23 (inclusive), where 0 is midnight to 1 AM, and 23 is 11 PM to midnight. Can be specified with days of week, in which case the ad would serve during these hours on the specified days. For example, if Monday, Wednesday, Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at 9-10am and 3-5pm. #[serde(alias="hoursOfDay")] pub hours_of_day: Vec, - /// Whether or not to use the user's local time. If false, the America/New York time zone applies. + /// Whether or not to use the user's local time. If false, the America/New York time zone applies. #[serde(alias="userLocalTime")] pub user_local_time: bool, } @@ -1294,21 +1303,21 @@ impl Part for DayPartTargeting {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CompatibleFields { - /// The kind of resource this is, in this case dfareporting#compatibleFields. + /// The kind of resource this is, in this case dfareporting#compatibleFields. pub kind: String, - /// Contains items that are compatible to be selected for a report of type "CROSS_DIMENSION_REACH". + /// Contains items that are compatible to be selected for a report of type "CROSS_DIMENSION_REACH". #[serde(alias="crossDimensionReachReportCompatibleFields")] pub cross_dimension_reach_report_compatible_fields: CrossDimensionReachReportCompatibleFields, - /// Contains items that are compatible to be selected for a report of type "REACH". + /// Contains items that are compatible to be selected for a report of type "REACH". #[serde(alias="reachReportCompatibleFields")] pub reach_report_compatible_fields: ReachReportCompatibleFields, - /// Contains items that are compatible to be selected for a report of type "PATH_TO_CONVERSION". + /// Contains items that are compatible to be selected for a report of type "PATH_TO_CONVERSION". #[serde(alias="pathToConversionReportCompatibleFields")] pub path_to_conversion_report_compatible_fields: PathToConversionReportCompatibleFields, - /// Contains items that are compatible to be selected for a report of type "FLOODLIGHT". + /// Contains items that are compatible to be selected for a report of type "FLOODLIGHT". #[serde(alias="floodlightReportCompatibleFields")] pub floodlight_report_compatible_fields: FloodlightReportCompatibleFields, - /// Contains items that are compatible to be selected for a report of type "STANDARD". + /// Contains items that are compatible to be selected for a report of type "STANDARD". #[serde(alias="reportCompatibleFields")] pub report_compatible_fields: ReportCompatibleFields, } @@ -1327,20 +1336,20 @@ impl ResponseResult for CompatibleFields {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Region { - /// Region code. + /// Region code. #[serde(alias="regionCode")] pub region_code: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#region". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#region". pub kind: Option, - /// DART ID of the country to which this region belongs. + /// DART ID of the country to which this region belongs. #[serde(alias="countryDartId")] pub country_dart_id: Option, - /// Name of this region. + /// Name of this region. pub name: Option, - /// Country code of the country to which this region belongs. + /// Country code of the country to which this region belongs. #[serde(alias="countryCode")] pub country_code: Option, - /// DART ID of this region. + /// DART ID of this region. #[serde(alias="dartId")] pub dart_id: Option, } @@ -1354,17 +1363,17 @@ impl Resource for Region {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportCriteria { - /// Activity group. + /// Activity group. pub activities: Activities, - /// The list of standard dimensions the report should include. + /// The list of standard dimensions the report should include. pub dimensions: Vec, - /// The list of names of metrics the report should include. + /// The list of names of metrics the report should include. #[serde(alias="metricNames")] pub metric_names: Vec, - /// The date range for which this report should be run. + /// The date range for which this report should be run. #[serde(alias="dateRange")] pub date_range: DateRange, - /// Custom Rich Media Events group. + /// Custom Rich Media Events group. #[serde(alias="customRichMediaEvents")] pub custom_rich_media_events: CustomRichMediaEvents, /// The list of filters on which dimensions are filtered. @@ -1383,16 +1392,16 @@ impl Part for ReportCriteria {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CrossDimensionReachReportCompatibleFields { - /// Dimensions which are compatible to be selected in the "breakdown" section of the report. + /// Dimensions which are compatible to be selected in the "breakdown" section of the report. pub breakdown: Vec, - /// Metrics which are compatible to be selected in the "metricNames" section of the report. + /// Metrics which are compatible to be selected in the "metricNames" section of the report. pub metrics: Vec, - /// The kind of resource this is, in this case dfareporting#crossDimensionReachReportCompatibleFields. + /// The kind of resource this is, in this case dfareporting#crossDimensionReachReportCompatibleFields. pub kind: String, - /// Metrics which are compatible to be selected in the "overlapMetricNames" section of the report. + /// Metrics which are compatible to be selected in the "overlapMetricNames" section of the report. #[serde(alias="overlapMetrics")] pub overlap_metrics: Vec, - /// Dimensions which are compatible to be selected in the "dimensionFilters" section of the report. + /// Dimensions which are compatible to be selected in the "dimensionFilters" section of the report. #[serde(alias="dimensionFilters")] pub dimension_filters: Vec, } @@ -1416,25 +1425,25 @@ impl Part for CrossDimensionReachReportCompatibleFields {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserRole { - /// Whether this is a default user role. Default user roles are created by the system for the account/subaccount and cannot be modified or deleted. Each default user role comes with a basic set of preassigned permissions. + /// Whether this is a default user role. Default user roles are created by the system for the account/subaccount and cannot be modified or deleted. Each default user role comes with a basic set of preassigned permissions. #[serde(alias="defaultUserRole")] pub default_user_role: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRole". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRole". pub kind: Option, - /// Subaccount ID of this user role. This is a read-only field that can be left blank. + /// Subaccount ID of this user role. This is a read-only field that can be left blank. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Name of this user role. This is a required field. Must be less than 256 characters long. If this user role is under a subaccount, the name must be unique among sites of the same subaccount. Otherwise, this user role is a top-level user role, and the name must be unique among top-level user roles of the same account. + /// Name of this user role. This is a required field. Must be less than 256 characters long. If this user role is under a subaccount, the name must be unique among sites of the same subaccount. Otherwise, this user role is a top-level user role, and the name must be unique among top-level user roles of the same account. pub name: Option, - /// ID of the user role that this user role is based on or copied from. This is a required field. + /// ID of the user role that this user role is based on or copied from. This is a required field. #[serde(alias="parentUserRoleId")] pub parent_user_role_id: Option, - /// Account ID of this user role. This is a read-only field that can be left blank. + /// Account ID of this user role. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, - /// ID of this user role. This is a read-only, auto-generated field. + /// ID of this user role. This is a read-only, auto-generated field. pub id: Option, - /// List of permissions associated with this user role. + /// List of permissions associated with this user role. pub permissions: Option>, } @@ -1454,10 +1463,10 @@ impl ResponseResult for UserRole {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct EventTagsListResponse { - /// Event tag collection + /// Event tag collection #[serde(alias="eventTags")] pub event_tags: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#eventTagsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#eventTagsListResponse". pub kind: String, } @@ -1480,37 +1489,37 @@ impl ResponseResult for EventTagsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FloodlightActivityGroup { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivityGroup". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivityGroup". pub kind: Option, - /// Subaccount ID of this floodlight activity group. This is a read-only field that can be left blank. + /// Subaccount ID of this floodlight activity group. This is a read-only field that can be left blank. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Name of this floodlight activity group. This is a required field. Must be less than 65 characters long and cannot contain quotes. + /// Name of this floodlight activity group. This is a required field. Must be less than 65 characters long and cannot contain quotes. pub name: Option, - /// Floodlight configuration ID of this floodlight activity group. This is a required field. + /// Floodlight configuration ID of this floodlight activity group. This is a required field. #[serde(alias="floodlightConfigurationId")] pub floodlight_configuration_id: Option, - /// Advertiser ID of this floodlight activity group. If this field is left blank, the value will be copied over either from the floodlight configuration's advertiser or from the existing activity group's advertiser. + /// Advertiser ID of this floodlight activity group. If this field is left blank, the value will be copied over either from the floodlight configuration's advertiser or from the existing activity group's advertiser. #[serde(alias="advertiserId")] pub advertiser_id: Option, - /// Dimension value for the ID of the floodlight configuration. This is a read-only, auto-generated field. + /// Dimension value for the ID of the floodlight configuration. This is a read-only, auto-generated field. #[serde(alias="floodlightConfigurationIdDimensionValue")] pub floodlight_configuration_id_dimension_value: Option, - /// Dimension value for the ID of this floodlight activity group. This is a read-only, auto-generated field. + /// Dimension value for the ID of this floodlight activity group. This is a read-only, auto-generated field. #[serde(alias="idDimensionValue")] pub id_dimension_value: Option, - /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. + /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. #[serde(alias="advertiserIdDimensionValue")] pub advertiser_id_dimension_value: Option, - /// Value of the type= parameter in the floodlight tag, which the ad servers use to identify the activity group that the activity belongs to. This is optional: if empty, a new tag string will be generated for you. This string must be 1 to 8 characters long, with valid characters being [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique among activity groups of the same floodlight configuration. This field is read-only after insertion. + /// Value of the type= parameter in the floodlight tag, which the ad servers use to identify the activity group that the activity belongs to. This is optional: if empty, a new tag string will be generated for you. This string must be 1 to 8 characters long, with valid characters being [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique among activity groups of the same floodlight configuration. This field is read-only after insertion. #[serde(alias="tagString")] pub tag_string: Option, - /// Type of the floodlight activity group. This is a required field that is read-only after insertion. + /// Type of the floodlight activity group. This is a required field that is read-only after insertion. #[serde(alias="type")] pub type_: Option, - /// ID of this floodlight activity group. This is a read-only, auto-generated field. + /// ID of this floodlight activity group. This is a read-only, auto-generated field. pub id: Option, - /// Account ID of this floodlight activity group. This is a read-only field that can be left blank. + /// Account ID of this floodlight activity group. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, } @@ -1526,11 +1535,11 @@ impl ResponseResult for FloodlightActivityGroup {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AudienceSegment { - /// Weight allocated to this segment. Must be between 1 and 1000. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group. + /// Weight allocated to this segment. Must be between 1 and 1000. The weight assigned will be understood in proportion to the weights assigned to other segments in the same segment group. pub allocation: i32, - /// ID of this audience segment. This is a read-only, auto-generated field. + /// ID of this audience segment. This is a read-only, auto-generated field. pub id: String, - /// Name of this audience segment. This is a required field and must be less than 65 characters long. + /// Name of this audience segment. This is a required field and must be less than 65 characters long. pub name: String, } @@ -1552,83 +1561,83 @@ impl Part for AudienceSegment {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Campaign { - /// Arbitrary comments about this campaign. Must be less than 256 characters long. + /// Arbitrary comments about this campaign. Must be less than 256 characters long. pub comment: Option, - /// Date on which the campaign starts running. The start date can be any date. The hours, minutes, and seconds of the start date should not be set, as doing so will result in an error. This is a required field. + /// Date on which the campaign starts running. The start date can be any date. The hours, minutes, and seconds of the start date should not be set, as doing so will result in an error. This is a required field. #[serde(alias="startDate")] pub start_date: Option, - /// Date on which the campaign will stop running. On insert, the end date must be today or a future date. The end date must be later than or be the same as the start date. If, for example, you set 6/25/2015 as both the start and end dates, the effective campaign run date is just that day only, 6/25/2015. The hours, minutes, and seconds of the end date should not be set, as doing so will result in an error. This is a required field. + /// Date on which the campaign will stop running. On insert, the end date must be today or a future date. The end date must be later than or be the same as the start date. If, for example, you set 6/25/2015 as both the start and end dates, the effective campaign run date is just that day only, 6/25/2015. The hours, minutes, and seconds of the end date should not be set, as doing so will result in an error. This is a required field. #[serde(alias="endDate")] pub end_date: Option, - /// Click-through URL suffix override properties for this campaign. + /// Click-through URL suffix override properties for this campaign. #[serde(alias="clickThroughUrlSuffixProperties")] pub click_through_url_suffix_properties: Option, - /// Whether this campaign has been archived. + /// Whether this campaign has been archived. pub archived: Option, - /// Additional creative optimization configurations for the campaign. + /// Additional creative optimization configurations for the campaign. #[serde(alias="additionalCreativeOptimizationConfigurations")] pub additional_creative_optimization_configurations: Option>, - /// Advertiser ID of this campaign. This is a required field. + /// Advertiser ID of this campaign. This is a required field. #[serde(alias="advertiserId")] pub advertiser_id: Option, - /// Audience segment groups assigned to this campaign. Cannot have more than 300 segment groups. + /// Audience segment groups assigned to this campaign. Cannot have more than 300 segment groups. #[serde(alias="audienceSegmentGroups")] pub audience_segment_groups: Option>, - /// Information about the creation of this campaign. This is a read-only field. + /// Information about the creation of this campaign. This is a read-only field. #[serde(alias="createInfo")] pub create_info: Option, - /// Click-through event tag ID override properties for this campaign. + /// Click-through event tag ID override properties for this campaign. #[serde(alias="defaultClickThroughEventTagProperties")] pub default_click_through_event_tag_properties: Option, - /// Dimension value for the advertiser ID of this campaign. This is a read-only, auto-generated field. + /// Dimension value for the advertiser ID of this campaign. This is a read-only, auto-generated field. #[serde(alias="advertiserIdDimensionValue")] pub advertiser_id_dimension_value: Option, - /// Overrides that can be used to activate or deactivate advertiser event tags. + /// Overrides that can be used to activate or deactivate advertiser event tags. #[serde(alias="eventTagOverrides")] pub event_tag_overrides: Option>, - /// Creative optimization configuration for the campaign. + /// Creative optimization configuration for the campaign. #[serde(alias="creativeOptimizationConfiguration")] pub creative_optimization_configuration: Option, - /// ID of this campaign. This is a read-only auto-generated field. + /// ID of this campaign. This is a read-only auto-generated field. pub id: Option, - /// Account ID of this campaign. This is a read-only field that can be left blank. + /// Account ID of this campaign. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, - /// Campaign trafficker contact emails. + /// Campaign trafficker contact emails. #[serde(alias="traffickerEmails")] pub trafficker_emails: Option>, - /// List of creative group IDs that are assigned to the campaign. + /// List of creative group IDs that are assigned to the campaign. #[serde(alias="creativeGroupIds")] pub creative_group_ids: Option>, - /// Subaccount ID of this campaign. This is a read-only field that can be left blank. + /// Subaccount ID of this campaign. This is a read-only field that can be left blank. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Name of this campaign. This is a required field and must be less than 256 characters long and unique among campaigns of the same advertiser. + /// Name of this campaign. This is a required field and must be less than 256 characters long and unique among campaigns of the same advertiser. pub name: Option, - /// Lookback window settings for the campaign. + /// Lookback window settings for the campaign. #[serde(alias="lookbackConfiguration")] pub lookback_configuration: Option, - /// Whether Nielsen reports are enabled for this campaign. + /// Whether Nielsen reports are enabled for this campaign. #[serde(alias="nielsenOcrEnabled")] pub nielsen_ocr_enabled: Option, - /// Information about the most recent modification of this campaign. This is a read-only field. + /// Information about the most recent modification of this campaign. This is a read-only field. #[serde(alias="lastModifiedInfo")] pub last_modified_info: Option, - /// Whether comScore vCE reports are enabled for this campaign. + /// Whether comScore vCE reports are enabled for this campaign. #[serde(alias="comscoreVceEnabled")] pub comscore_vce_enabled: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#campaign". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#campaign". pub kind: Option, - /// External ID for this campaign. + /// External ID for this campaign. #[serde(alias="externalId")] pub external_id: Option, - /// Advertiser group ID of the associated advertiser. + /// Advertiser group ID of the associated advertiser. #[serde(alias="advertiserGroupId")] pub advertiser_group_id: Option, - /// Dimension value for the ID of this campaign. This is a read-only, auto-generated field. + /// Dimension value for the ID of this campaign. This is a read-only, auto-generated field. #[serde(alias="idDimensionValue")] pub id_dimension_value: Option, - /// Billing invoice code included in the DCM client billing invoices associated with the campaign. + /// Billing invoice code included in the DCM client billing invoices associated with the campaign. #[serde(alias="billingInvoiceCode")] pub billing_invoice_code: Option, } @@ -1650,43 +1659,43 @@ impl ResponseResult for Campaign {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ChangeLog { - /// Time when the object was modified. + /// Time when the object was modified. #[serde(alias="changeTime")] pub change_time: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#changeLog". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#changeLog". pub kind: String, - /// Subaccount ID of the modified object. + /// Subaccount ID of the modified object. #[serde(alias="subaccountId")] pub subaccount_id: String, - /// Old value of the object field. + /// Old value of the object field. #[serde(alias="oldValue")] pub old_value: String, - /// ID of the object of this change log. The object could be a campaign, placement, ad, or other type. + /// ID of the object of this change log. The object could be a campaign, placement, ad, or other type. #[serde(alias="objectId")] pub object_id: String, - /// ID of this change log. + /// ID of this change log. pub id: String, - /// User profile name of the user who modified the object. + /// User profile name of the user who modified the object. #[serde(alias="userProfileName")] pub user_profile_name: String, - /// Field name of the object which changed. + /// Field name of the object which changed. #[serde(alias="fieldName")] pub field_name: String, - /// ID of the user who modified the object. + /// ID of the user who modified the object. #[serde(alias="userProfileId")] pub user_profile_id: String, - /// Action which caused the change. + /// Action which caused the change. pub action: String, - /// Transaction ID of this change log. When a single API call results in many changes, each change will have a separate ID in the change log but will share the same transactionId. + /// Transaction ID of this change log. When a single API call results in many changes, each change will have a separate ID in the change log but will share the same transactionId. #[serde(alias="transactionId")] pub transaction_id: String, - /// Account ID of the modified object. + /// Account ID of the modified object. #[serde(alias="accountId")] pub account_id: String, - /// New value of the object field. + /// New value of the object field. #[serde(alias="newValue")] pub new_value: String, - /// Object type of the change log. + /// Object type of the change log. #[serde(alias="objectType")] pub object_type: String, } @@ -1709,29 +1718,29 @@ impl ResponseResult for ChangeLog {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct File { - /// The status of the report file. + /// The status of the report file. pub status: String, - /// The kind of resource this is, in this case dfareporting#file. + /// The kind of resource this is, in this case dfareporting#file. pub kind: String, - /// The output format of the report. Only available once the file is available. + /// The output format of the report. Only available once the file is available. pub format: String, - /// The date range for which the file has report data. The date range will always be the absolute date range for which the report is run. + /// The date range for which the file has report data. The date range will always be the absolute date range for which the report is run. #[serde(alias="dateRange")] pub date_range: DateRange, - /// The filename of the file. + /// The filename of the file. #[serde(alias="fileName")] pub file_name: String, - /// The eTag of this response for caching purposes. + /// The eTag of this response for caching purposes. pub etag: String, - /// The ID of the report this file was generated from. + /// The ID of the report this file was generated from. #[serde(alias="reportId")] pub report_id: String, - /// The URLs where the completed report file can be downloaded. + /// The URLs where the completed report file can be downloaded. pub urls: FileUrls, - /// The timestamp in milliseconds since epoch when this file was last modified. + /// The timestamp in milliseconds since epoch when this file was last modified. #[serde(alias="lastModifiedTime")] pub last_modified_time: String, - /// The unique ID of this report file. + /// The unique ID of this report file. pub id: String, } @@ -1745,7 +1754,7 @@ impl ResponseResult for File {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct KeyValueTargetingExpression { - /// Keyword expression being targeted by the ad. + /// Keyword expression being targeted by the ad. pub expression: String, } @@ -1758,23 +1767,23 @@ impl Part for KeyValueTargetingExpression {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportCrossDimensionReachCriteria { - /// The list of dimensions the report should include. + /// The list of dimensions the report should include. pub breakdown: Vec, - /// Whether the report is pivoted or not. Defaults to true. + /// Whether the report is pivoted or not. Defaults to true. pub pivoted: bool, - /// The list of names of overlap metrics the report should include. + /// The list of names of overlap metrics the report should include. #[serde(alias="overlapMetricNames")] pub overlap_metric_names: Vec, - /// The list of names of metrics the report should include. + /// The list of names of metrics the report should include. #[serde(alias="metricNames")] pub metric_names: Vec, - /// The date range this report should be run for. + /// The date range this report should be run for. #[serde(alias="dateRange")] pub date_range: DateRange, - /// The list of filters on which dimensions are filtered. + /// The list of filters on which dimensions are filtered. #[serde(alias="dimensionFilters")] pub dimension_filters: Vec, - /// The dimension option. + /// The dimension option. pub dimension: String, } @@ -1788,12 +1797,12 @@ impl Part for ReportCrossDimensionReachCriteria {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AudienceSegmentGroup { - /// Audience segments assigned to this group. The number of segments must be between 2 and 100. + /// Audience segments assigned to this group. The number of segments must be between 2 and 100. #[serde(alias="audienceSegments")] pub audience_segments: Vec, - /// ID of this audience segment group. This is a read-only, auto-generated field. + /// ID of this audience segment group. This is a read-only, auto-generated field. pub id: String, - /// Name of this audience segment group. This is a required field and must be less than 65 characters long. + /// Name of this audience segment group. This is a required field and must be less than 65 characters long. pub name: String, } @@ -1814,14 +1823,14 @@ impl Part for AudienceSegmentGroup {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlacementStrategy { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementStrategy". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementStrategy". pub kind: Option, - /// Account ID of this placement strategy.This is a read-only field that can be left blank. + /// Account ID of this placement strategy.This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, - /// ID of this placement strategy. This is a read-only, auto-generated field. + /// ID of this placement strategy. This is a read-only, auto-generated field. pub id: Option, - /// Name of this placement strategy. This is a required field. Must be less than 256 characters long and unique among placement strategies of the same account. + /// Name of this placement strategy. This is a required field. Must be less than 256 characters long and unique among placement strategies of the same account. pub name: Option, } @@ -1835,10 +1844,10 @@ impl ResponseResult for PlacementStrategy {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PlacementTag { - /// Tags generated for this placement. + /// Tags generated for this placement. #[serde(alias="tagDatas")] pub tag_datas: Vec, - /// Placement ID + /// Placement ID #[serde(alias="placementId")] pub placement_id: String, } @@ -1857,9 +1866,9 @@ impl Part for PlacementTag {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CountriesListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#countriesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#countriesListResponse". pub kind: String, - /// Country collection + /// Country collection pub countries: Vec, } @@ -1872,13 +1881,13 @@ impl ResponseResult for CountriesListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ClickThroughUrl { - /// ID of the landing page for the click-through URL. Applicable if the defaultLandingPage field is set to false. + /// ID of the landing page for the click-through URL. Applicable if the defaultLandingPage field is set to false. #[serde(alias="landingPageId")] pub landing_page_id: String, - /// Custom click-through URL. Applicable if the defaultLandingPage field is set to false and the landingPageId field is left unset. + /// Custom click-through URL. Applicable if the defaultLandingPage field is set to false and the landingPageId field is left unset. #[serde(alias="customClickThroughUrl")] pub custom_click_through_url: String, - /// Whether the campaign default landing page is used. + /// Whether the campaign default landing page is used. #[serde(alias="defaultLandingPage")] pub default_landing_page: bool, } @@ -1892,10 +1901,10 @@ impl Part for ClickThroughUrl {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CompanionClickThroughOverride { - /// Click-through URL of this companion click-through override. + /// Click-through URL of this companion click-through override. #[serde(alias="clickThroughUrl")] pub click_through_url: ClickThroughUrl, - /// ID of the creative for this companion click-through override. + /// ID of the creative for this companion click-through override. #[serde(alias="creativeId")] pub creative_id: String, } @@ -1909,9 +1918,9 @@ impl Part for CompanionClickThroughOverride {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FrequencyCap { - /// Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days in seconds, or 7,776,000. + /// Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days in seconds, or 7,776,000. pub duration: String, - /// Number of times an individual user can be served the ad within the specified duration. The maximum allowed is 15. + /// Number of times an individual user can be served the ad within the specified duration. The maximum allowed is 15. pub impressions: String, } @@ -1930,10 +1939,10 @@ impl Part for FrequencyCap {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CampaignCreativeAssociation { - /// ID of the creative associated with the campaign. This is a required field. + /// ID of the creative associated with the campaign. This is a required field. #[serde(alias="creativeId")] pub creative_id: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#campaignCreativeAssociation". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#campaignCreativeAssociation". pub kind: Option, } @@ -1953,9 +1962,9 @@ impl ResponseResult for CampaignCreativeAssociation {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct OperatingSystemVersionsListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#operatingSystemVersionsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#operatingSystemVersionsListResponse". pub kind: String, - /// Operating system version collection + /// Operating system version collection #[serde(alias="operatingSystemVersions")] pub operating_system_versions: Vec, } @@ -1977,16 +1986,16 @@ impl ResponseResult for OperatingSystemVersionsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ContentCategory { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#contentCategory". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#contentCategory". pub kind: Option, - /// Account ID of this content category. This is a read-only field that can be left blank. + /// Account ID of this content category. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, - /// Description of this content category. + /// Description of this content category. pub description: Option, - /// Name of this content category. This is a required field and must be less than 256 characters long and unique among content categories of the same account. + /// Name of this content category. This is a required field and must be less than 256 characters long and unique among content categories of the same account. pub name: Option, - /// ID of this content category. This is a read-only, auto-generated field. + /// ID of this content category. This is a read-only, auto-generated field. pub id: Option, } @@ -2010,37 +2019,37 @@ impl ResponseResult for ContentCategory {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Placement { - /// Comments for this placement. + /// Comments for this placement. pub comment: Option, - /// Campaign ID of this placement. This field is a required field on insertion. + /// Campaign ID of this placement. This field is a required field on insertion. #[serde(alias="campaignId")] pub campaign_id: Option, - /// Payment source for this placement. This is a required field that is read-only after insertion. + /// Payment source for this placement. This is a required field that is read-only after insertion. #[serde(alias="paymentSource")] pub payment_source: Option, - /// Dimension value for the ID of the directory site. This is a read-only, auto-generated field. + /// Dimension value for the ID of the directory site. This is a read-only, auto-generated field. #[serde(alias="directorySiteIdDimensionValue")] pub directory_site_id_dimension_value: Option, - /// Advertiser ID of this placement. This field can be left blank. + /// Advertiser ID of this placement. This field can be left blank. #[serde(alias="advertiserId")] pub advertiser_id: Option, - /// Key name of this placement. This is a read-only, auto-generated field. + /// Key name of this placement. This is a read-only, auto-generated field. #[serde(alias="keyName")] pub key_name: Option, - /// Directory site ID of this placement. On insert, you must set either this field or the siteId field to specify the site associated with this placement. This is a required field that is read-only after insertion. + /// Directory site ID of this placement. On insert, you must set either this field or the siteId field to specify the site associated with this placement. This is a required field that is read-only after insertion. #[serde(alias="directorySiteId")] pub directory_site_id: Option, - /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. + /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. #[serde(alias="advertiserIdDimensionValue")] pub advertiser_id_dimension_value: Option, - /// ID of the content category assigned to this placement. + /// ID of the content category assigned to this placement. #[serde(alias="contentCategoryId")] pub content_category_id: Option, - /// Size associated with this placement. When inserting or updating a placement, only the size ID field is used. This field is required on insertion. + /// Size associated with this placement. When inserting or updating a placement, only the size ID field is used. This field is required on insertion. pub size: Option, - /// Whether this placement is archived. + /// Whether this placement is archived. pub archived: Option, - /// Information about the last publisher update. This is a read-only field. + /// Information about the last publisher update. This is a read-only field. #[serde(alias="publisherUpdateInfo")] pub publisher_update_info: Option, /// Tag formats to generate for this placement. This field is required on insertion. @@ -2060,67 +2069,67 @@ pub struct Placement { /// - "PLACEMENT_TAG_TRACKING_JAVASCRIPT" #[serde(alias="tagFormats")] pub tag_formats: Option>, - /// Whether payment was approved for this placement. This is a read-only field relevant only to publisher-paid placements. + /// Whether payment was approved for this placement. This is a read-only field relevant only to publisher-paid placements. #[serde(alias="paymentApproved")] pub payment_approved: Option, - /// Tag settings for this placement. + /// Tag settings for this placement. #[serde(alias="tagSetting")] pub tag_setting: Option, - /// ID of this placement. This is a read-only, auto-generated field. + /// ID of this placement. This is a read-only, auto-generated field. pub id: Option, - /// External ID for this placement. + /// External ID for this placement. #[serde(alias="externalId")] pub external_id: Option, - /// Dimension value for the ID of this placement. This is a read-only, auto-generated field. + /// Dimension value for the ID of this placement. This is a read-only, auto-generated field. #[serde(alias="idDimensionValue")] pub id_dimension_value: Option, - /// Account ID of this placement. This field can be left blank. + /// Account ID of this placement. This field can be left blank. #[serde(alias="accountId")] pub account_id: Option, - /// Whether creatives assigned to this placement must be SSL-compliant. + /// Whether creatives assigned to this placement must be SSL-compliant. #[serde(alias="sslRequired")] pub ssl_required: Option, - /// Third-party placement status. + /// Third-party placement status. pub status: Option, - /// Dimension value for the ID of the campaign. This is a read-only, auto-generated field. + /// Dimension value for the ID of the campaign. This is a read-only, auto-generated field. #[serde(alias="campaignIdDimensionValue")] pub campaign_id_dimension_value: Option, - /// Whether this placement is the primary placement of a roadblock (placement group). You cannot change this field from true to false. Setting this field to true will automatically set the primary field on the original primary placement of the roadblock to false, and it will automatically set the roadblock's primaryPlacementId field to the ID of this placement. + /// Whether this placement is the primary placement of a roadblock (placement group). You cannot change this field from true to false. Setting this field to true will automatically set the primary field on the original primary placement of the roadblock to false, and it will automatically set the roadblock's primaryPlacementId field to the ID of this placement. pub primary: Option, - /// ID of this placement's group, if applicable. + /// ID of this placement's group, if applicable. #[serde(alias="placementGroupId")] pub placement_group_id: Option, - /// Information about the creation of this placement. This is a read-only field. + /// Information about the creation of this placement. This is a read-only field. #[serde(alias="createInfo")] pub create_info: Option, - /// Site ID associated with this placement. On insert, you must set either this field or the directorySiteId field to specify the site associated with this placement. This is a required field that is read-only after insertion. + /// Site ID associated with this placement. On insert, you must set either this field or the directorySiteId field to specify the site associated with this placement. This is a required field that is read-only after insertion. #[serde(alias="siteId")] pub site_id: Option, - /// Dimension value for the ID of the site. This is a read-only, auto-generated field. + /// Dimension value for the ID of the site. This is a read-only, auto-generated field. #[serde(alias="siteIdDimensionValue")] pub site_id_dimension_value: Option, - /// Placement compatibility. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. This field is required on insertion. + /// Placement compatibility. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. This field is required on insertion. pub compatibility: Option, - /// ID of the placement strategy assigned to this placement. + /// ID of the placement strategy assigned to this placement. #[serde(alias="placementStrategyId")] pub placement_strategy_id: Option, - /// Dimension value for the ID of the placement group. This is a read-only, auto-generated field. + /// Dimension value for the ID of the placement group. This is a read-only, auto-generated field. #[serde(alias="placementGroupIdDimensionValue")] pub placement_group_id_dimension_value: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placement". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placement". pub kind: Option, - /// Subaccount ID of this placement. This field can be left blank. + /// Subaccount ID of this placement. This field can be left blank. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Name of this placement.This is a required field and must be less than 256 characters long. + /// Name of this placement.This is a required field and must be less than 256 characters long. pub name: Option, - /// Lookback window settings for this placement. + /// Lookback window settings for this placement. #[serde(alias="lookbackConfiguration")] pub lookback_configuration: Option, - /// Information about the most recent modification of this placement. This is a read-only field. + /// Information about the most recent modification of this placement. This is a read-only field. #[serde(alias="lastModifiedInfo")] pub last_modified_info: Option, - /// Pricing schedule of this placement. This field is required on insertion, specifically subfields startDate, endDate and pricingType. + /// Pricing schedule of this placement. This field is required on insertion, specifically subfields startDate, endDate and pricingType. #[serde(alias="pricingSchedule")] pub pricing_schedule: Option, } @@ -2136,14 +2145,14 @@ impl ResponseResult for Placement {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct FloodlightReportCompatibleFields { - /// Metrics which are compatible to be selected in the "metricNames" section of the report. + /// Metrics which are compatible to be selected in the "metricNames" section of the report. pub metrics: Vec, - /// The kind of resource this is, in this case dfareporting#floodlightReportCompatibleFields. + /// The kind of resource this is, in this case dfareporting#floodlightReportCompatibleFields. pub kind: String, - /// Dimensions which are compatible to be selected in the "dimensionFilters" section of the report. + /// Dimensions which are compatible to be selected in the "dimensionFilters" section of the report. #[serde(alias="dimensionFilters")] pub dimension_filters: Vec, - /// Dimensions which are compatible to be selected in the "dimensions" section of the report. + /// Dimensions which are compatible to be selected in the "dimensions" section of the report. pub dimensions: Vec, } @@ -2156,10 +2165,10 @@ impl Part for FloodlightReportCompatibleFields {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeAssetId { - /// Type of asset to upload. This is a required field. IMAGE is solely used for IMAGE creatives. Other image assets should use HTML_IMAGE. + /// Type of asset to upload. This is a required field. IMAGE is solely used for IMAGE creatives. Other image assets should use HTML_IMAGE. #[serde(alias="type")] pub type_: String, - /// Name of the creative asset. This is a required field while inserting an asset. After insertion, this assetIdentifier is used to identify the uploaded asset. Characters in the name must be alphanumeric or one of the following: ".-_ ". Spaces are allowed. + /// Name of the creative asset. This is a required field while inserting an asset. After insertion, this assetIdentifier is used to identify the uploaded asset. Characters in the name must be alphanumeric or one of the following: ".-_ ". Spaces are allowed. pub name: String, } @@ -2172,10 +2181,10 @@ impl Part for CreativeAssetId {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DirectorySiteContactAssignment { - /// ID of this directory site contact. This is a read-only, auto-generated field. + /// ID of this directory site contact. This is a read-only, auto-generated field. #[serde(alias="contactId")] pub contact_id: String, - /// Visibility of this directory site contact assignment. When set to PUBLIC this contact assignment is visible to all account and agency users; when set to PRIVATE it is visible only to the site. + /// Visibility of this directory site contact assignment. When set to PUBLIC this contact assignment is visible to all account and agency users; when set to PRIVATE it is visible only to the site. pub visibility: String, } @@ -2188,11 +2197,11 @@ impl Part for DirectorySiteContactAssignment {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeAssignment { - /// Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM. + /// Weight of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_RANDOM. pub weight: i32, - /// Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. + /// Sequence number of the creative assignment, applicable when the rotation type is CREATIVE_ROTATION_TYPE_SEQUENTIAL. pub sequence: i32, - /// Click-through URL of the creative assignment. + /// Click-through URL of the creative assignment. #[serde(alias="clickThroughUrl")] pub click_through_url: ClickThroughUrl, /// Rich media exit overrides for this creative assignment. @@ -2210,30 +2219,30 @@ pub struct CreativeAssignment { /// - VPAID_NON_LINEAR #[serde(alias="richMediaExitOverrides")] pub rich_media_exit_overrides: Vec, - /// Whether applicable event tags should fire when this creative assignment is rendered. If this value is unset when the ad is inserted or updated, it will default to true for all creative types EXCEPT for INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO. + /// Whether applicable event tags should fire when this creative assignment is rendered. If this value is unset when the ad is inserted or updated, it will default to true for all creative types EXCEPT for INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO. #[serde(alias="applyEventTags")] pub apply_event_tags: bool, - /// Creative group assignments for this creative assignment. Only one assignment per creative group number is allowed for a maximum of two assignments. + /// Creative group assignments for this creative assignment. Only one assignment per creative group number is allowed for a maximum of two assignments. #[serde(alias="creativeGroupAssignments")] pub creative_group_assignments: Vec, - /// Companion creative overrides for this creative assignment. Applicable to video ads. + /// Companion creative overrides for this creative assignment. Applicable to video ads. #[serde(alias="companionCreativeOverrides")] pub companion_creative_overrides: Vec, - /// Date and time that the assigned creative should start serving. + /// Date and time that the assigned creative should start serving. #[serde(alias="startTime")] pub start_time: String, - /// Whether the creative to be assigned is SSL-compliant. This is a read-only field that is auto-generated when the ad is inserted or updated. + /// Whether the creative to be assigned is SSL-compliant. This is a read-only field that is auto-generated when the ad is inserted or updated. #[serde(alias="sslCompliant")] pub ssl_compliant: bool, - /// Whether this creative assignment is active. When true, the creative will be included in the ad's rotation. + /// Whether this creative assignment is active. When true, the creative will be included in the ad's rotation. pub active: bool, - /// ID of the creative to be assigned. This is a required field. + /// ID of the creative to be assigned. This is a required field. #[serde(alias="creativeId")] pub creative_id: String, - /// Date and time that the assigned creative should stop serving. Must be later than the start time. + /// Date and time that the assigned creative should stop serving. Must be later than the start time. #[serde(alias="endTime")] pub end_time: String, - /// Dimension value for the ID of the creative. This is a read-only, auto-generated field. + /// Dimension value for the ID of the creative. This is a read-only, auto-generated field. #[serde(alias="creativeIdDimensionValue")] pub creative_id_dimension_value: DimensionValue, } @@ -2252,18 +2261,18 @@ impl Part for CreativeAssignment {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct DimensionValueRequest { - /// The name of the dimension for which values should be requested. + /// The name of the dimension for which values should be requested. #[serde(alias="dimensionName")] pub dimension_name: Option, - /// The start date of the date range for which to retrieve dimension values. A string of the format "yyyy-MM-dd". + /// The start date of the date range for which to retrieve dimension values. A string of the format "yyyy-MM-dd". #[serde(alias="startDate")] pub start_date: Option, - /// The kind of request this is, in this case dfareporting#dimensionValueRequest. + /// The kind of request this is, in this case dfareporting#dimensionValueRequest. pub kind: Option, - /// The end date of the date range for which to retrieve dimension values. A string of the format "yyyy-MM-dd". + /// The end date of the date range for which to retrieve dimension values. A string of the format "yyyy-MM-dd". #[serde(alias="endDate")] pub end_date: Option, - /// The list of filters by which to filter values. The filters are ANDed. + /// The list of filters by which to filter values. The filters are ANDed. pub filters: Option>, } @@ -2276,10 +2285,10 @@ impl RequestValue for DimensionValueRequest {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DefaultClickThroughEventTagProperties { - /// Whether this entity should override the inherited default click-through event tag with its own defined value. + /// Whether this entity should override the inherited default click-through event tag with its own defined value. #[serde(alias="overrideInheritedEventTag")] pub override_inherited_event_tag: bool, - /// ID of the click-through event tag to apply to all ads in this entity's scope. + /// ID of the click-through event tag to apply to all ads in this entity's scope. #[serde(alias="defaultClickThroughEventTagId")] pub default_click_through_event_tag_id: String, } @@ -2298,11 +2307,11 @@ impl Part for DefaultClickThroughEventTagProperties {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UserProfileList { - /// The user profiles returned in this response. + /// The user profiles returned in this response. pub items: Vec, - /// The kind of list this is, in this case dfareporting#userProfileList. + /// The kind of list this is, in this case dfareporting#userProfileList. pub kind: String, - /// The eTag of this response for caching purposes. + /// The eTag of this response for caching purposes. pub etag: String, } @@ -2320,12 +2329,12 @@ impl ResponseResult for UserProfileList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SubaccountsListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#subaccountsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#subaccountsListResponse". pub kind: String, - /// Subaccount collection + /// Subaccount collection pub subaccounts: Vec, } @@ -2352,50 +2361,50 @@ impl ResponseResult for SubaccountsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Report { - /// The user profile id of the owner of this report. + /// The user profile id of the owner of this report. #[serde(alias="ownerProfileId")] pub owner_profile_id: Option, - /// The subaccount ID to which this report belongs if applicable. + /// The subaccount ID to which this report belongs if applicable. #[serde(alias="subAccountId")] pub sub_account_id: Option, - /// The report's schedule. Can only be set if the report's 'dateRange' is a relative date range and the relative date range is not "TODAY". + /// The report's schedule. Can only be set if the report's 'dateRange' is a relative date range and the relative date range is not "TODAY". pub schedule: Option, - /// The report criteria for a report of type "PATH_TO_CONVERSION". + /// The report criteria for a report of type "PATH_TO_CONVERSION". #[serde(alias="pathToConversionCriteria")] pub path_to_conversion_criteria: Option, - /// The report criteria for a report of type "REACH". + /// The report criteria for a report of type "REACH". #[serde(alias="reachCriteria")] pub reach_criteria: Option, - /// The report criteria for a report of type "FLOODLIGHT". + /// The report criteria for a report of type "FLOODLIGHT". #[serde(alias="floodlightCriteria")] pub floodlight_criteria: Option, - /// The filename used when generating report files for this report. + /// The filename used when generating report files for this report. #[serde(alias="fileName")] pub file_name: Option, - /// The report's email delivery settings. + /// The report's email delivery settings. pub delivery: Option, - /// The timestamp (in milliseconds since epoch) of when this report was last modified. + /// The timestamp (in milliseconds since epoch) of when this report was last modified. #[serde(alias="lastModifiedTime")] pub last_modified_time: Option, - /// The report criteria for a report of type "CROSS_DIMENSION_REACH". + /// The report criteria for a report of type "CROSS_DIMENSION_REACH". #[serde(alias="crossDimensionReachCriteria")] pub cross_dimension_reach_criteria: Option, - /// The account ID to which this report belongs. + /// The account ID to which this report belongs. #[serde(alias="accountId")] pub account_id: Option, - /// The kind of resource this is, in this case dfareporting#report. + /// The kind of resource this is, in this case dfareporting#report. pub kind: Option, - /// The name of the report. + /// The name of the report. pub name: Option, - /// The output format of the report. If not specified, default format is "CSV". Note that the actual format in the completed report file might differ if for instance the report's size exceeds the format's capabilities. "CSV" will then be the fallback format. + /// The output format of the report. If not specified, default format is "CSV". Note that the actual format in the completed report file might differ if for instance the report's size exceeds the format's capabilities. "CSV" will then be the fallback format. pub format: Option, - /// The unique ID identifying this report resource. + /// The unique ID identifying this report resource. pub id: Option, - /// The eTag of this response for caching purposes. + /// The eTag of this response for caching purposes. pub etag: Option, - /// The report criteria for a report of type "STANDARD". + /// The report criteria for a report of type "STANDARD". pub criteria: Option, - /// The type of the report. + /// The type of the report. #[serde(alias="type")] pub type_: Option, } @@ -2416,11 +2425,11 @@ impl ResponseResult for Report {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlatformType { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#platformType". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#platformType". pub kind: Option, - /// ID of this platform type. + /// ID of this platform type. pub id: Option, - /// Name of this platform type. + /// Name of this platform type. pub name: Option, } @@ -2438,12 +2447,12 @@ impl Resource for PlatformType {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdvertisersListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Advertiser collection + /// Advertiser collection pub advertisers: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#advertisersListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#advertisersListResponse". pub kind: String, } @@ -2461,53 +2470,53 @@ impl ResponseResult for AdvertisersListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeAsset { - /// Detected MIME type for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. + /// Detected MIME type for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. #[serde(alias="mimeType")] pub mime_type: Option, - /// Artwork type of rich media creative. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. + /// Artwork type of rich media creative. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. #[serde(alias="artworkType")] pub artwork_type: Option, - /// Offset left unit for an asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. + /// Offset left unit for an asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. #[serde(alias="positionLeftUnit")] pub position_left_unit: Option, - /// Size of an asset when collapsed. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA and all VPAID. Additionally, applicable to assets whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN. + /// Size of an asset when collapsed. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA and all VPAID. Additionally, applicable to assets whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN. #[serde(alias="collapsedSize")] pub collapsed_size: Option, - /// Flash version of the asset. This is a read-only field. Applicable to the following creative types: FLASH_INPAGE, ENHANCED_BANNER, all RICH_MEDIA, and all VPAID. + /// Flash version of the asset. This is a read-only field. Applicable to the following creative types: FLASH_INPAGE, ENHANCED_BANNER, all RICH_MEDIA, and all VPAID. #[serde(alias="flashVersion")] pub flash_version: Option, - /// Whether the asset pushes down other content. Applicable to the following creative types: all RICH_MEDIA. Additionally, only applicable when the asset offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. + /// Whether the asset pushes down other content. Applicable to the following creative types: all RICH_MEDIA. Additionally, only applicable when the asset offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. pub pushdown: Option, - /// Whether to hide Flash objects flag for an asset. Applicable to the following creative types: all RICH_MEDIA. + /// Whether to hide Flash objects flag for an asset. Applicable to the following creative types: all RICH_MEDIA. #[serde(alias="hideFlashObjects")] pub hide_flash_objects: Option, - /// List of feature dependencies for the creative asset that are detected by DCM. Feature dependencies are features that a browser must be able to support in order to render your HTML5 creative correctly. This is a read-only, auto-generated field. Applicable to the following creative types: ENHANCED_BANNER and HTML5_BANNER. + /// List of feature dependencies for the creative asset that are detected by DCM. Feature dependencies are features that a browser must be able to support in order to render your HTML5 creative correctly. This is a read-only, auto-generated field. Applicable to the following creative types: ENHANCED_BANNER and HTML5_BANNER. #[serde(alias="detectedFeatures")] pub detected_features: Option>, - /// Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR. + /// Duration in seconds for which an asset will be displayed. Applicable to the following creative types: INSTREAM_VIDEO and VPAID_LINEAR. pub duration: Option, - /// Offset top unit for an asset. This is a read-only field if the asset displayType is ASSET_DISPLAY_TYPE_OVERLAY. Applicable to the following creative types: all RICH_MEDIA. + /// Offset top unit for an asset. This is a read-only field if the asset displayType is ASSET_DISPLAY_TYPE_OVERLAY. Applicable to the following creative types: all RICH_MEDIA. #[serde(alias="positionTopUnit")] pub position_top_unit: Option, - /// Numeric ID of this creative asset. This is a required field and should not be modified. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. + /// Numeric ID of this creative asset. This is a required field and should not be modified. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. pub id: Option, - /// Possible alignments for an asset. This is a read-only field. Applicable to the following creative types: RICH_MEDIA_MULTI_FLOATING. + /// Possible alignments for an asset. This is a read-only field. Applicable to the following creative types: RICH_MEDIA_MULTI_FLOATING. pub alignment: Option, - /// Size associated with this creative asset. This is a required field when applicable; however for IMAGE and FLASH_INPAGE creatives, if left blank, this field will be automatically set using the actual size of the associated image asset. Applicable to the following creative types: ENHANCED_BANNER, ENHANCED_IMAGE, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all RICH_MEDIA. + /// Size associated with this creative asset. This is a required field when applicable; however for IMAGE and FLASH_INPAGE creatives, if left blank, this field will be automatically set using the actual size of the associated image asset. Applicable to the following creative types: ENHANCED_BANNER, ENHANCED_IMAGE, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all RICH_MEDIA. pub size: Option, - /// Whether the asset is horizontally locked. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. + /// Whether the asset is horizontally locked. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. #[serde(alias="horizontallyLocked")] pub horizontally_locked: Option, - /// Initial wait time type before making the asset visible. Applicable to the following creative types: all RICH_MEDIA. + /// Initial wait time type before making the asset visible. Applicable to the following creative types: all RICH_MEDIA. #[serde(alias="startTimeType")] pub start_time_type: Option, - /// Type of rich media asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. + /// Type of rich media asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. #[serde(alias="displayType")] pub display_type: Option, - /// Detected expanded dimension for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. + /// Detected expanded dimension for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. #[serde(alias="expandedDimension")] pub expanded_dimension: Option, - /// Whether the asset is vertically locked. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. + /// Whether the asset is vertically locked. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA. #[serde(alias="verticallyLocked")] pub vertically_locked: Option, /// Role of the asset in relation to creative. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. This is a required field. @@ -2520,69 +2529,69 @@ pub struct CreativeAsset { /// ALTERNATE_VIDEO refers to the DCM representation of child asset videos from Studio, and is applicable to VPAID_LINEAR creatives. These cannot be added or removed within DCM. /// For VPAID_LINEAR creatives, PARENT_VIDEO, TRANSCODED_VIDEO and ALTERNATE_VIDEO assets that are marked active serve as backup in case the VPAID creative cannot be served. Only PARENT_VIDEO assets can be added or removed for an INSTREAM_VIDEO or VPAID_LINEAR creative. pub role: Option, - /// Size of zip file. This is a read-only field. Applicable to the following creative types: HTML5_BANNER. + /// Size of zip file. This is a read-only field. Applicable to the following creative types: HTML5_BANNER. #[serde(alias="zipFilesize")] pub zip_filesize: Option, - /// Detected bit-rate for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. + /// Detected bit-rate for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. #[serde(alias="bitRate")] pub bit_rate: Option, - /// Window mode options for flash assets. Applicable to the following creative types: FLASH_INPAGE, RICH_MEDIA_EXPANDING, RICH_MEDIA_IM_EXPAND, RICH_MEDIA_INPAGE, and RICH_MEDIA_INPAGE_FLOATING. + /// Window mode options for flash assets. Applicable to the following creative types: FLASH_INPAGE, RICH_MEDIA_EXPANDING, RICH_MEDIA_IM_EXPAND, RICH_MEDIA_INPAGE, and RICH_MEDIA_INPAGE_FLOATING. #[serde(alias="windowMode")] pub window_mode: Option, - /// Progressive URL for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. + /// Progressive URL for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. #[serde(alias="progressiveServingUrl")] pub progressive_serving_url: Option, - /// Duration type for which an asset will be displayed. Applicable to the following creative types: all RICH_MEDIA. + /// Duration type for which an asset will be displayed. Applicable to the following creative types: all RICH_MEDIA. #[serde(alias="durationType")] pub duration_type: Option, - /// Detected video duration for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. + /// Detected video duration for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. #[serde(alias="videoDuration")] pub video_duration: Option, - /// File size associated with this creative asset. This is a read-only field. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. + /// File size associated with this creative asset. This is a read-only field. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. #[serde(alias="fileSize")] pub file_size: Option, - /// Offset position for an asset in collapsed mode. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA and all VPAID. Additionally, only applicable to assets whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN. + /// Offset position for an asset in collapsed mode. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA and all VPAID. Additionally, only applicable to assets whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN. pub offset: Option, - /// Whether the video asset is active. This is a read-only field for VPAID_NON_LINEAR assets. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. + /// Whether the video asset is active. This is a read-only field for VPAID_NON_LINEAR assets. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. pub active: Option, - /// Whether the backup asset is original or changed by the user in DCM. Applicable to the following creative types: all RICH_MEDIA. + /// Whether the backup asset is original or changed by the user in DCM. Applicable to the following creative types: all RICH_MEDIA. #[serde(alias="originalBackup")] pub original_backup: Option, - /// Whether to hide selection boxes flag for an asset. Applicable to the following creative types: all RICH_MEDIA. + /// Whether to hide selection boxes flag for an asset. Applicable to the following creative types: all RICH_MEDIA. #[serde(alias="hideSelectionBoxes")] pub hide_selection_boxes: Option, - /// Streaming URL for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. + /// Streaming URL for video asset. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. #[serde(alias="streamingServingUrl")] pub streaming_serving_url: Option, - /// zIndex value of an asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. + /// zIndex value of an asset. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable to assets whose displayType is NOT one of the following types: ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY. #[serde(alias="zIndex")] pub z_index: Option, - /// Rich media child asset type. This is a read-only field. Applicable to the following creative types: all VPAID. + /// Rich media child asset type. This is a read-only field. Applicable to the following creative types: all VPAID. #[serde(alias="childAssetType")] pub child_asset_type: Option, - /// Exit event configured for the backup image. Applicable to the following creative types: all RICH_MEDIA. + /// Exit event configured for the backup image. Applicable to the following creative types: all RICH_MEDIA. #[serde(alias="backupImageExit")] pub backup_image_exit: Option, - /// Whether ActionScript3 is enabled for the flash asset. This is a read-only field. Applicable to the following creative types: FLASH_INPAGE and ENHANCED_BANNER. + /// Whether ActionScript3 is enabled for the flash asset. This is a read-only field. Applicable to the following creative types: FLASH_INPAGE and ENHANCED_BANNER. #[serde(alias="actionScript3")] pub action_script3: Option, - /// Pushdown duration in seconds for an asset. Must be between 0 and 9.99. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. + /// Pushdown duration in seconds for an asset. Must be between 0 and 9.99. Applicable to the following creative types: all RICH_MEDIA.Additionally, only applicable when the asset pushdown field is true, the offsets are 0, the collapsedSize.width matches size.width, and the collapsedSize.height is less than size.height. #[serde(alias="pushdownDuration")] pub pushdown_duration: Option, - /// Identifier of this asset. This is the same identifier returned during creative asset insert operation. This is a required field. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. + /// Identifier of this asset. This is the same identifier returned during creative asset insert operation. This is a required field. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. #[serde(alias="assetIdentifier")] pub asset_identifier: Option, - /// Whether the asset is transparent. Applicable to the following creative types: all RICH_MEDIA. Additionally, only applicable to HTML5 assets. + /// Whether the asset is transparent. Applicable to the following creative types: all RICH_MEDIA. Additionally, only applicable to HTML5 assets. pub transparency: Option, - /// Whether the asset is SSL-compliant. This is a read-only field. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. + /// Whether the asset is SSL-compliant. This is a read-only field. Applicable to all but the following creative types: all REDIRECT and TRACKING_TEXT. #[serde(alias="sslCompliant")] pub ssl_compliant: Option, - /// Offset position for an asset. Applicable to the following creative types: all RICH_MEDIA. + /// Offset position for an asset. Applicable to the following creative types: all RICH_MEDIA. pub position: Option, - /// Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA. + /// Custom start time in seconds for making the asset visible. Applicable to the following creative types: all RICH_MEDIA. #[serde(alias="customStartTimeValue")] pub custom_start_time_value: Option, - /// File name of zip file. This is a read-only field. Applicable to the following creative types: HTML5_BANNER. + /// File name of zip file. This is a read-only field. Applicable to the following creative types: HTML5_BANNER. #[serde(alias="zipFilename")] pub zip_filename: Option, } @@ -2601,12 +2610,12 @@ impl Resource for CreativeAsset {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DirectorySitesListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySitesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySitesListResponse". pub kind: String, - /// Directory site collection + /// Directory site collection #[serde(alias="directorySites")] pub directory_sites: Vec, } @@ -2620,7 +2629,7 @@ impl ResponseResult for DirectorySitesListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LastModifiedInfo { - /// Timestamp of the last change in milliseconds since epoch. + /// Timestamp of the last change in milliseconds since epoch. pub time: String, } @@ -2638,9 +2647,9 @@ impl Part for LastModifiedInfo {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct RegionsListResponse { - /// Region Collection. + /// Region Collection. pub regions: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#regionsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#regionsListResponse". pub kind: String, } @@ -2659,11 +2668,11 @@ impl ResponseResult for RegionsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UserRolePermissionGroup { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolePermissionGroup". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolePermissionGroup". pub kind: String, - /// ID of this user role permission. + /// ID of this user role permission. pub id: String, - /// Name of this user role permission group. + /// Name of this user role permission group. pub name: String, } @@ -2677,12 +2686,12 @@ impl ResponseResult for UserRolePermissionGroup {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ClickTag { - /// Advertiser event name associated with the click tag. This field is used by ENHANCED_BANNER, ENHANCED_IMAGE, and HTML5_BANNER creatives. + /// Advertiser event name associated with the click tag. This field is used by ENHANCED_BANNER, ENHANCED_IMAGE, and HTML5_BANNER creatives. #[serde(alias="eventName")] pub event_name: String, - /// Parameter name for the specified click tag. For ENHANCED_IMAGE creative assets, this field must match the value of the creative asset's creativeAssetId.name field. + /// Parameter name for the specified click tag. For ENHANCED_IMAGE creative assets, this field must match the value of the creative asset's creativeAssetId.name field. pub name: String, - /// Parameter value for the specified click tag. This field contains a click-through url. + /// Parameter value for the specified click tag. This field contains a click-through url. pub value: String, } @@ -2700,11 +2709,11 @@ impl Part for ClickTag {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ConnectionType { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#connectionType". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#connectionType". pub kind: Option, - /// ID of this connection type. + /// ID of this connection type. pub id: Option, - /// Name of this connection type. + /// Name of this connection type. pub name: Option, } @@ -2722,9 +2731,9 @@ impl Resource for ConnectionType {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct BrowsersListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#browsersListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#browsersListResponse". pub kind: String, - /// Browser collection + /// Browser collection pub browsers: Vec, } @@ -2737,12 +2746,12 @@ impl ResponseResult for BrowsersListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ObjectFilter { - /// Applicable when status is ASSIGNED. The user has access to objects with these object IDs. + /// Applicable when status is ASSIGNED. The user has access to objects with these object IDs. #[serde(alias="objectIds")] pub object_ids: Vec, - /// Status of the filter. NONE means the user has access to none of the objects. ALL means the user has access to all objects. ASSIGNED means the user has access to the objects with IDs in the objectIds list. + /// Status of the filter. NONE means the user has access to none of the objects. ALL means the user has access to all objects. ASSIGNED means the user has access to the objects with IDs in the objectIds list. pub status: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#objectFilter". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#objectFilter". pub kind: String, } @@ -2755,10 +2764,10 @@ impl Part for ObjectFilter {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeSettings { - /// Header text for iFrames for this site. Must be less than or equal to 2000 characters long. + /// Header text for iFrames for this site. Must be less than or equal to 2000 characters long. #[serde(alias="iFrameHeader")] pub i_frame_header: String, - /// Header text for iFrames for this site. Must be less than or equal to 2000 characters long. + /// Header text for iFrames for this site. Must be less than or equal to 2000 characters long. #[serde(alias="iFrameFooter")] pub i_frame_footer: String, } @@ -2772,9 +2781,9 @@ impl Part for CreativeSettings {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Dimension { - /// The kind of resource this is, in this case dfareporting#dimension. + /// The kind of resource this is, in this case dfareporting#dimension. pub kind: String, - /// The dimension name, e.g. dfa:advertiser + /// The dimension name, e.g. dfa:advertiser pub name: String, } @@ -2797,22 +2806,22 @@ impl Part for Dimension {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeField { - /// Advertiser ID of this creative field. This is a required field on insertion. + /// Advertiser ID of this creative field. This is a required field on insertion. #[serde(alias="advertiserId")] pub advertiser_id: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeField". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeField". pub kind: Option, - /// Subaccount ID of this creative field. This is a read-only field that can be left blank. + /// Subaccount ID of this creative field. This is a read-only field that can be left blank. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Name of this creative field. This is a required field and must be less than 256 characters long and unique among creative fields of the same advertiser. + /// Name of this creative field. This is a required field and must be less than 256 characters long and unique among creative fields of the same advertiser. pub name: Option, - /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. + /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. #[serde(alias="advertiserIdDimensionValue")] pub advertiser_id_dimension_value: Option, - /// ID of this creative field. This is a read-only, auto-generated field. + /// ID of this creative field. This is a read-only, auto-generated field. pub id: Option, - /// Account ID of this creative field. This is a read-only field that can be left blank. + /// Account ID of this creative field. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, } @@ -2834,14 +2843,14 @@ impl ResponseResult for CreativeField {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DirectorySite { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySite". pub kind: String, - /// Country ID of this directory site. + /// Country ID of this directory site. #[serde(alias="countryId")] pub country_id: String, - /// Description of this directory site. + /// Description of this directory site. pub description: String, - /// Directory site settings. + /// Directory site settings. pub settings: DirectorySiteSettings, /// Currency ID of this directory site. /// Possible values are: @@ -2892,12 +2901,12 @@ pub struct DirectorySite { /// - "JAVASCRIPT_INPAGE" #[serde(alias="inpageTagFormats")] pub inpage_tag_formats: Vec, - /// URL of this directory site. + /// URL of this directory site. pub url: String, - /// Directory site contacts. + /// Directory site contacts. #[serde(alias="contactAssignments")] pub contact_assignments: Vec, - /// Parent directory site ID. + /// Parent directory site ID. #[serde(alias="parentId")] pub parent_id: String, /// Tag types for interstitial placements. @@ -2908,14 +2917,14 @@ pub struct DirectorySite { /// - "JAVASCRIPT_INTERSTITIAL" #[serde(alias="interstitialTagFormats")] pub interstitial_tag_formats: Vec, - /// Dimension value for the ID of this directory site. This is a read-only, auto-generated field. + /// Dimension value for the ID of this directory site. This is a read-only, auto-generated field. #[serde(alias="idDimensionValue")] pub id_dimension_value: DimensionValue, - /// Whether this directory site is active. + /// Whether this directory site is active. pub active: bool, - /// ID of this directory site. This is a read-only, auto-generated field. + /// ID of this directory site. This is a read-only, auto-generated field. pub id: String, - /// Name of this directory site. + /// Name of this directory site. pub name: String, } @@ -2934,9 +2943,9 @@ impl ResponseResult for DirectorySite {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CitiesListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#citiesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#citiesListResponse". pub kind: String, - /// City collection + /// City collection pub cities: Vec, } @@ -2958,12 +2967,12 @@ impl ResponseResult for CitiesListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeGroup { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeGroup". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeGroup". pub kind: Option, - /// Subaccount ID of this creative group. This is a read-only field that can be left blank. + /// Subaccount ID of this creative group. This is a read-only field that can be left blank. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Name of this creative group. This is a required field and must be less than 256 characters long and unique among creative groups of the same advertiser. + /// Name of this creative group. This is a required field and must be less than 256 characters long and unique among creative groups of the same advertiser. pub name: Option, /// Subgroup of the creative group. Assign your creative groups to one of the following subgroups in order to filter or manage them more easily. This field is required on insertion and is read-only after insertion. /// Acceptable values are: @@ -2971,15 +2980,15 @@ pub struct CreativeGroup { /// - 2 #[serde(alias="groupNumber")] pub group_number: Option, - /// Advertiser ID of this creative group. This is a required field on insertion. + /// Advertiser ID of this creative group. This is a required field on insertion. #[serde(alias="advertiserId")] pub advertiser_id: Option, - /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. + /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. #[serde(alias="advertiserIdDimensionValue")] pub advertiser_id_dimension_value: Option, - /// ID of this creative group. This is a read-only, auto-generated field. + /// ID of this creative group. This is a read-only, auto-generated field. pub id: Option, - /// Account ID of this creative group. This is a read-only field that can be left blank. + /// Account ID of this creative group. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, } @@ -2995,9 +3004,9 @@ impl ResponseResult for CreativeGroup {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Metric { - /// The kind of resource this is, in this case dfareporting#metric. + /// The kind of resource this is, in this case dfareporting#metric. pub kind: String, - /// The metric name, e.g. dfa:impressions + /// The metric name, e.g. dfa:impressions pub name: String, } @@ -3010,13 +3019,13 @@ impl Part for Metric {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct RichMediaExitOverride { - /// Click-through URL to override the default exit URL. Applicable if the useCustomExitUrl field is set to true. + /// Click-through URL to override the default exit URL. Applicable if the useCustomExitUrl field is set to true. #[serde(alias="customExitUrl")] pub custom_exit_url: String, - /// Whether to use the custom exit URL. + /// Whether to use the custom exit URL. #[serde(alias="useCustomExitUrl")] pub use_custom_exit_url: bool, - /// ID for the override to refer to a specific exit in the creative. + /// ID for the override to refer to a specific exit in the creative. #[serde(alias="exitId")] pub exit_id: String, } @@ -3035,10 +3044,10 @@ impl Part for RichMediaExitOverride {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountPermissionsListResponse { - /// Account permission collection + /// Account permission collection #[serde(alias="accountPermissions")] pub account_permissions: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountPermissionsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountPermissionsListResponse". pub kind: String, } @@ -3056,9 +3065,9 @@ impl ResponseResult for AccountPermissionsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PlacementsGenerateTagsResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementsGenerateTagsResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementsGenerateTagsResponse". pub kind: String, - /// Set of generated tags for the specified placements. + /// Set of generated tags for the specified placements. #[serde(alias="placementTags")] pub placement_tags: Vec, } @@ -3082,11 +3091,11 @@ impl ResponseResult for PlacementsGenerateTagsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeFieldValue { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeFieldValue". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeFieldValue". pub kind: Option, - /// ID of this creative field value. This is a read-only, auto-generated field. + /// ID of this creative field value. This is a read-only, auto-generated field. pub id: Option, - /// Value of this creative field value. It needs to be less than 256 characters in length and unique per creative field. + /// Value of this creative field value. It needs to be less than 256 characters in length and unique per creative field. pub value: Option, } @@ -3106,12 +3115,12 @@ impl ResponseResult for CreativeFieldValue {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct FloodlightActivityGroupsListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivityGroupsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivityGroupsListResponse". pub kind: String, - /// Floodlight activity group collection + /// Floodlight activity group collection #[serde(alias="floodlightActivityGroups")] pub floodlight_activity_groups: Vec, } @@ -3130,13 +3139,13 @@ impl ResponseResult for FloodlightActivityGroupsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DirectorySiteContactsListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Directory site contact collection + /// Directory site contact collection #[serde(alias="directorySiteContacts")] pub directory_site_contacts: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySiteContactsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySiteContactsListResponse". pub kind: String, } @@ -3149,32 +3158,32 @@ impl ResponseResult for DirectorySiteContactsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeCustomEvent { - /// Target type used by the event. + /// Target type used by the event. #[serde(alias="targetType")] pub target_type: String, - /// Artwork type used by the creative.This is a read-only field. + /// Artwork type used by the creative.This is a read-only field. #[serde(alias="artworkType")] pub artwork_type: String, - /// Reporting ID, used to differentiate multiple videos in a single creative. + /// Reporting ID, used to differentiate multiple videos in a single creative. #[serde(alias="videoReportingId")] pub video_reporting_id: String, - /// Properties for rich media popup windows. This field is used only for exit events. + /// Properties for rich media popup windows. This field is used only for exit events. #[serde(alias="popupWindowProperties")] pub popup_window_properties: PopupWindowProperties, - /// Artwork label column, used to link events in DCM back to events in Studio. This is a required field and should not be modified after insertion. + /// Artwork label column, used to link events in DCM back to events in Studio. This is a required field and should not be modified after insertion. #[serde(alias="artworkLabel")] pub artwork_label: String, - /// Whether the event is active. + /// Whether the event is active. pub active: bool, - /// Type of the event. This is a read-only field. + /// Type of the event. This is a read-only field. #[serde(alias="advertiserCustomEventType")] pub advertiser_custom_event_type: String, - /// Exit URL of the event. This field is used only for exit events. + /// Exit URL of the event. This field is used only for exit events. #[serde(alias="exitUrl")] pub exit_url: String, - /// ID of this event. This is a required field and should not be modified after insertion. + /// ID of this event. This is a required field and should not be modified after insertion. pub id: String, - /// User-entered name for the event. + /// User-entered name for the event. #[serde(alias="advertiserCustomEventName")] pub advertiser_custom_event_name: String, } @@ -3193,12 +3202,12 @@ impl Part for CreativeCustomEvent {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CreativesListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativesListResponse". pub kind: String, - /// Creative collection + /// Creative collection pub creatives: Vec, } @@ -3211,10 +3220,10 @@ impl ResponseResult for CreativesListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OmnitureSettings { - /// Whether placement cost data will be sent to Omniture. This property can be enabled only if omnitureIntegrationEnabled is true. + /// Whether placement cost data will be sent to Omniture. This property can be enabled only if omnitureIntegrationEnabled is true. #[serde(alias="omnitureCostDataEnabled")] pub omniture_cost_data_enabled: bool, - /// Whether Omniture integration is enabled. This property can be enabled only when the "Advanced Ad Serving" account setting is enabled. + /// Whether Omniture integration is enabled. This property can be enabled only when the "Advanced Ad Serving" account setting is enabled. #[serde(alias="omnitureIntegrationEnabled")] pub omniture_integration_enabled: bool, } @@ -3228,17 +3237,17 @@ impl Part for OmnitureSettings {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PathToConversionReportCompatibleFields { - /// Metrics which are compatible to be selected in the "metricNames" section of the report. + /// Metrics which are compatible to be selected in the "metricNames" section of the report. pub metrics: Vec, - /// Per-interaction dimensions which are compatible to be selected in the "perInteractionDimensions" section of the report. + /// Per-interaction dimensions which are compatible to be selected in the "perInteractionDimensions" section of the report. #[serde(alias="perInteractionDimensions")] pub per_interaction_dimensions: Vec, - /// The kind of resource this is, in this case dfareporting#pathToConversionReportCompatibleFields. + /// The kind of resource this is, in this case dfareporting#pathToConversionReportCompatibleFields. pub kind: String, - /// Conversion dimensions which are compatible to be selected in the "conversionDimensions" section of the report. + /// Conversion dimensions which are compatible to be selected in the "conversionDimensions" section of the report. #[serde(alias="conversionDimensions")] pub conversion_dimensions: Vec, - /// Custom floodlight variables which are compatible to be selected in the "customFloodlightVariables" section of the report. + /// Custom floodlight variables which are compatible to be selected in the "customFloodlightVariables" section of the report. #[serde(alias="customFloodlightVariables")] pub custom_floodlight_variables: Vec, } @@ -3257,9 +3266,9 @@ impl Part for PathToConversionReportCompatibleFields {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct MobileCarriersListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#mobileCarriersListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#mobileCarriersListResponse". pub kind: String, - /// Mobile carrier collection + /// Mobile carrier collection #[serde(alias="mobileCarriers")] pub mobile_carriers: Vec, } @@ -3273,11 +3282,11 @@ impl ResponseResult for MobileCarriersListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FloodlightActivityDynamicTag { - /// Tag code. + /// Tag code. pub tag: String, - /// ID of this dynamic tag. This is a read-only, auto-generated field. + /// ID of this dynamic tag. This is a read-only, auto-generated field. pub id: String, - /// Name of this tag. + /// Name of this tag. pub name: String, } @@ -3299,112 +3308,112 @@ impl Part for FloodlightActivityDynamicTag {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Creative { - /// Type of artwork used for the creative. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. + /// Type of artwork used for the creative. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. #[serde(alias="artworkType")] pub artwork_type: Option, - /// Latest Studio trafficked creative ID associated with rich media and VPAID creatives. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. + /// Latest Studio trafficked creative ID associated with rich media and VPAID creatives. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. #[serde(alias="latestTraffickedCreativeId")] pub latest_trafficked_creative_id: Option, - /// List of counter events configured for the creative. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. + /// List of counter events configured for the creative. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. #[serde(alias="counterCustomEvents")] pub counter_custom_events: Option>, - /// Advertiser ID of this creative. This is a required field. Applicable to all creative types. + /// Advertiser ID of this creative. This is a required field. Applicable to all creative types. #[serde(alias="advertiserId")] pub advertiser_id: Option, - /// Whether the creative is active. Applicable to all creative types. + /// Whether the creative is active. Applicable to all creative types. pub active: Option, - /// List of timer events configured for the creative. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. + /// List of timer events configured for the creative. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. #[serde(alias="timerCustomEvents")] pub timer_custom_events: Option>, - /// Dimension value for the rendering ID of this creative. This is a read-only field. Applicable to all creative types. + /// Dimension value for the rendering ID of this creative. This is a read-only field. Applicable to all creative types. #[serde(alias="renderingIdDimensionValue")] pub rendering_id_dimension_value: Option, - /// OpenWindow FSCommand of this creative. This lets the SWF file communicate with either Flash Player or the program hosting Flash Player, such as a web browser. This is only triggered if allowScriptAccess field is true. Applicable to the following creative types: FLASH_INPAGE. + /// OpenWindow FSCommand of this creative. This lets the SWF file communicate with either Flash Player or the program hosting Flash Player, such as a web browser. This is only triggered if allowScriptAccess field is true. Applicable to the following creative types: FLASH_INPAGE. #[serde(alias="fsCommand")] pub fs_command: Option, - /// ID of this creative. This is a read-only, auto-generated field. Applicable to all creative types. + /// ID of this creative. This is a read-only, auto-generated field. Applicable to all creative types. pub id: Option, - /// Account ID of this creative. This field, if left unset, will be auto-generated for both insert and update operations. Applicable to all creative types. + /// Account ID of this creative. This field, if left unset, will be auto-generated for both insert and update operations. Applicable to all creative types. #[serde(alias="accountId")] pub account_id: Option, - /// Studio trafficked creative ID associated with rich media and VPAID creatives. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. + /// Studio trafficked creative ID associated with rich media and VPAID creatives. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. #[serde(alias="studioTraffickedCreativeId")] pub studio_trafficked_creative_id: Option, - /// Whether the creative is archived. Applicable to all creative types. + /// Whether the creative is archived. Applicable to all creative types. pub archived: Option, - /// Override CSS value for rich media creatives. Applicable to the following creative types: all RICH_MEDIA. + /// Override CSS value for rich media creatives. Applicable to the following creative types: all RICH_MEDIA. #[serde(alias="overrideCss")] pub override_css: Option, - /// Whether script access is allowed for this creative. This is a read-only and deprecated field which will automatically be set to true on update. Applicable to the following creative types: FLASH_INPAGE. + /// Whether script access is allowed for this creative. This is a read-only and deprecated field which will automatically be set to true on update. Applicable to the following creative types: FLASH_INPAGE. #[serde(alias="allowScriptAccess")] pub allow_script_access: Option, - /// The internal Flash version for this creative as calculated by DoubleClick Studio. This is a read-only field. Applicable to the following creative types: FLASH_INPAGE, ENHANCED_BANNER, all RICH_MEDIA, and all VPAID. + /// The internal Flash version for this creative as calculated by DoubleClick Studio. This is a read-only field. Applicable to the following creative types: FLASH_INPAGE, ENHANCED_BANNER, all RICH_MEDIA, and all VPAID. #[serde(alias="requiredFlashVersion")] pub required_flash_version: Option, - /// List of exit events configured for the creative. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. + /// List of exit events configured for the creative. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. #[serde(alias="exitCustomEvents")] pub exit_custom_events: Option>, - /// ID of current rendering version. This is a read-only field. Applicable to all creative types. + /// ID of current rendering version. This is a read-only field. Applicable to all creative types. #[serde(alias="renderingId")] pub rendering_id: Option, - /// Description of the video ad. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. + /// Description of the video ad. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. #[serde(alias="videoDescription")] pub video_description: Option, - /// Third-party URL used to record backup image impressions. Applicable to the following creative types: all RICH_MEDIA + /// Third-party URL used to record backup image impressions. Applicable to the following creative types: all RICH_MEDIA #[serde(alias="thirdPartyBackupImageImpressionsUrl")] pub third_party_backup_image_impressions_url: Option, - /// The version number helps you keep track of multiple versions of your creative in your reports. The version number will always be auto-generated during insert operations to start at 1. For tracking creatives the version cannot be incremented and will always remain at 1. For all other creative types the version can be incremented only by 1 during update operations. In addition, the version will be automatically incremented by 1 when undergoing Rich Media creative merging. Applicable to all creative types. + /// The version number helps you keep track of multiple versions of your creative in your reports. The version number will always be auto-generated during insert operations to start at 1. For tracking creatives the version cannot be incremented and will always remain at 1. For all other creative types the version can be incremented only by 1 during update operations. In addition, the version will be automatically incremented by 1 when undergoing Rich Media creative merging. Applicable to all creative types. pub version: Option, - /// Creative field assignments for this creative. Applicable to all creative types. + /// Creative field assignments for this creative. Applicable to all creative types. #[serde(alias="creativeFieldAssignments")] pub creative_field_assignments: Option>, - /// The 6-character HTML color code, beginning with #, for the background of the window area where the Flash file is displayed. Default is white. Applicable to the following creative types: FLASH_INPAGE. + /// The 6-character HTML color code, beginning with #, for the background of the window area where the Flash file is displayed. Default is white. Applicable to the following creative types: FLASH_INPAGE. #[serde(alias="backgroundColor")] pub background_color: Option, - /// Custom key-values for a Rich Media creative. Key-values let you customize the creative settings of a Rich Media ad running on your site without having to contact the advertiser. You can use key-values to dynamically change the look or functionality of a creative. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. + /// Custom key-values for a Rich Media creative. Key-values let you customize the creative settings of a Rich Media ad running on your site without having to contact the advertiser. You can use key-values to dynamically change the look or functionality of a creative. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. #[serde(alias="customKeyValues")] pub custom_key_values: Option>, - /// Dimension value for the ID of this creative. This is a read-only field. Applicable to all creative types. + /// Dimension value for the ID of this creative. This is a read-only field. Applicable to all creative types. #[serde(alias="idDimensionValue")] pub id_dimension_value: Option, - /// Whether images are automatically advanced for enhanced image creatives. Applicable to the following creative types: ENHANCED_IMAGE. + /// Whether images are automatically advanced for enhanced image creatives. Applicable to the following creative types: ENHANCED_IMAGE. pub auto_advance_images: Option, - /// Size associated with this creative. When inserting or updating a creative either the size ID field or size width and height fields can be used. This is a required field when applicable; however for IMAGE and FLASH_INPAGE creatives, if left blank, this field will be automatically set using the actual size of the associated image assets. Applicable to the following creative types: ENHANCED_BANNER, ENHANCED_IMAGE, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all RICH_MEDIA. + /// Size associated with this creative. When inserting or updating a creative either the size ID field or size width and height fields can be used. This is a required field when applicable; however for IMAGE and FLASH_INPAGE creatives, if left blank, this field will be automatically set using the actual size of the associated image assets. Applicable to the following creative types: ENHANCED_BANNER, ENHANCED_IMAGE, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all RICH_MEDIA. pub size: Option, - /// Type of this creative.This is a required field. Applicable to all creative types. + /// Type of this creative.This is a required field. Applicable to all creative types. #[serde(alias="type")] pub type_: Option, - /// Combined size of all creative assets. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. + /// Combined size of all creative assets. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. #[serde(alias="totalFileSize")] pub total_file_size: Option, - /// Third-party URL used to record rich media impressions. Applicable to the following creative types: all RICH_MEDIA + /// Third-party URL used to record rich media impressions. Applicable to the following creative types: all RICH_MEDIA #[serde(alias="thirdPartyRichMediaImpressionsUrl")] pub third_party_rich_media_impressions_url: Option, - /// Studio advertiser ID associated with rich media and VPAID creatives. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. + /// Studio advertiser ID associated with rich media and VPAID creatives. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. #[serde(alias="studioAdvertiserId")] pub studio_advertiser_id: Option, - /// Assets associated with a creative. Applicable to all but the following creative types: INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT + /// Assets associated with a creative. Applicable to all but the following creative types: INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT #[serde(alias="creativeAssets")] pub creative_assets: Option>, - /// List of feature dependencies that will cause a backup image to be served if the browser that serves the ad does not support them. Feature dependencies are features that a browser must be able to support in order to render your HTML5 creative asset correctly. This field is initially auto-generated to contain all features detected by DCM for all the assets of this creative and can then be modified by the client. To reset this field, copy over all the creativeAssets' detected features. Applicable to the following creative types: ENHANCED_BANNER and HTML5_BANNER. + /// List of feature dependencies that will cause a backup image to be served if the browser that serves the ad does not support them. Feature dependencies are features that a browser must be able to support in order to render your HTML5 creative asset correctly. This field is initially auto-generated to contain all features detected by DCM for all the assets of this creative and can then be modified by the client. To reset this field, copy over all the creativeAssets' detected features. Applicable to the following creative types: ENHANCED_BANNER and HTML5_BANNER. #[serde(alias="backupImageFeatures")] pub backup_image_features: Option>, - /// Whether HTML code is DCM-generated or manually entered. Set to true to ignore changes to htmlCode. Applicable to the following creative types: FLASH_INPAGE and HTML5_BANNER. + /// Whether HTML code is DCM-generated or manually entered. Set to true to ignore changes to htmlCode. Applicable to the following creative types: FLASH_INPAGE and HTML5_BANNER. #[serde(alias="htmlCodeLocked")] pub html_code_locked: Option, - /// URL of hosted image or another ad tag. This is a required field when applicable. Applicable to the following creative types: INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT + /// URL of hosted image or another ad tag. This is a required field when applicable. Applicable to the following creative types: INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT #[serde(alias="redirectUrl")] pub redirect_url: Option, - /// Click tags of the creative. For ENHANCED_BANNER, FLASH_INPAGE, and HTML5_BANNER creatives, this is a subset of detected click tags for the assets associated with this creative. After creating a flash asset, detected click tags will be returned in the creativeAssetMetadata. When inserting the creative, populate the creative clickTags field using the creativeAssetMetadata.clickTags field. For ENHANCED_IMAGE creatives, there should be exactly one entry in this list for each image creative asset. A click tag is matched with a corresponding creative asset by matching the clickTag.name field with the creativeAsset.assetIdentifier.name field. Applicable to the following creative types: ENHANCED_BANNER, ENHANCED_IMAGE, FLASH_INPAGE, HTML5_BANNER. + /// Click tags of the creative. For ENHANCED_BANNER, FLASH_INPAGE, and HTML5_BANNER creatives, this is a subset of detected click tags for the assets associated with this creative. After creating a flash asset, detected click tags will be returned in the creativeAssetMetadata. When inserting the creative, populate the creative clickTags field using the creativeAssetMetadata.clickTags field. For ENHANCED_IMAGE creatives, there should be exactly one entry in this list for each image creative asset. A click tag is matched with a corresponding creative asset by matching the clickTag.name field with the creativeAsset.assetIdentifier.name field. Applicable to the following creative types: ENHANCED_BANNER, ENHANCED_IMAGE, FLASH_INPAGE, HTML5_BANNER. #[serde(alias="clickTags")] pub click_tags: Option>, - /// Target window for backup image. Applicable to the following creative types: ENHANCED_BANNER, FLASH_INPAGE, and HTML5_BANNER. + /// Target window for backup image. Applicable to the following creative types: ENHANCED_BANNER, FLASH_INPAGE, and HTML5_BANNER. #[serde(alias="backupImageTargetWindow")] pub backup_image_target_window: Option, - /// The minimum required Flash plugin version for this creative. For example, 11.2.202.235. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. + /// The minimum required Flash plugin version for this creative. For example, 11.2.202.235. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. #[serde(alias="requiredFlashPluginVersion")] pub required_flash_plugin_version: Option, - /// Reporting label used for HTML5 banner backup image. Applicable to the following creative types: ENHANCED_BANNER. + /// Reporting label used for HTML5 banner backup image. Applicable to the following creative types: ENHANCED_BANNER. #[serde(alias="backupImageReportingLabel")] pub backup_image_reporting_label: Option, /// Compatibilities associated with this creative. This is a read-only field. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. Applicable to all creative types. @@ -3416,50 +3425,50 @@ pub struct Creative { /// - "WEB" /// - "WEB_INTERSTITIAL" pub compatibility: Option>, - /// Ad parameters user for VPAID creative. This is a read-only field. Applicable to the following creative types: all VPAID. + /// Ad parameters user for VPAID creative. This is a read-only field. Applicable to the following creative types: all VPAID. #[serde(alias="adParameters")] pub ad_parameters: Option, - /// Keywords for a Rich Media creative. Keywords let you customize the creative settings of a Rich Media ad running on your site without having to contact the advertiser. You can use keywords to dynamically change the look or functionality of a creative. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. + /// Keywords for a Rich Media creative. Keywords let you customize the creative settings of a Rich Media ad running on your site without having to contact the advertiser. You can use keywords to dynamically change the look or functionality of a creative. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. #[serde(alias="adTagKeys")] pub ad_tag_keys: Option>, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creative". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creative". pub kind: Option, - /// Subaccount ID of this creative. This field, if left unset, will be auto-generated for both insert and update operations. Applicable to all creative types. + /// Subaccount ID of this creative. This field, if left unset, will be auto-generated for both insert and update operations. Applicable to all creative types. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Name of the creative. This is a required field and must be less than 256 characters long. Applicable to all creative types. + /// Name of the creative. This is a required field and must be less than 256 characters long. Applicable to all creative types. pub name: Option, - /// Creative video duration in seconds. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO, all RICH_MEDIA, and all VPAID. + /// Creative video duration in seconds. This is a read-only field. Applicable to the following creative types: INSTREAM_VIDEO, all RICH_MEDIA, and all VPAID. #[serde(alias="videoDuration")] pub video_duration: Option, - /// Creative last modification information. This is a read-only field. Applicable to all creative types. + /// Creative last modification information. This is a read-only field. Applicable to all creative types. #[serde(alias="lastModifiedInfo")] pub last_modified_info: Option, - /// Click-through URL for backup image. Applicable to the following creative types: ENHANCED_BANNER, FLASH_INPAGE, and HTML5_BANNER. + /// Click-through URL for backup image. Applicable to the following creative types: ENHANCED_BANNER, FLASH_INPAGE, and HTML5_BANNER. #[serde(alias="backupImageClickThroughUrl")] pub backup_image_click_through_url: Option, - /// Studio creative ID associated with rich media and VPAID creatives. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. + /// Studio creative ID associated with rich media and VPAID creatives. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID. #[serde(alias="studioCreativeId")] pub studio_creative_id: Option, - /// Authoring tool for HTML5 banner creatives. This is a read-only field. Applicable to the following creative types: HTML5_BANNER. + /// Authoring tool for HTML5 banner creatives. This is a read-only field. Applicable to the following creative types: HTML5_BANNER. #[serde(alias="authoringTool")] pub authoring_tool: Option, - /// Third-party URLs for tracking in-stream video creative events. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. + /// Third-party URLs for tracking in-stream video creative events. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. #[serde(alias="thirdPartyUrls")] pub third_party_urls: Option>, - /// List of companion creatives assigned to an in-Stream videocreative. Acceptable values include IDs of existing flash and image creatives. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. + /// List of companion creatives assigned to an in-Stream videocreative. Acceptable values include IDs of existing flash and image creatives. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. #[serde(alias="companionCreatives")] pub companion_creatives: Option>, - /// HTML code for the creative. This is a required field when applicable. This field is ignored if htmlCodeLocked is false. Applicable to the following creative types: all CUSTOM, FLASH_INPAGE, and HTML5_BANNER, and all RICH_MEDIA. + /// HTML code for the creative. This is a required field when applicable. This field is ignored if htmlCodeLocked is false. Applicable to the following creative types: all CUSTOM, FLASH_INPAGE, and HTML5_BANNER, and all RICH_MEDIA. #[serde(alias="htmlCode")] pub html_code: Option, - /// Whether the creative is SSL-compliant. This is a read-only field. Applicable to all creative types. + /// Whether the creative is SSL-compliant. This is a read-only field. Applicable to all creative types. #[serde(alias="sslCompliant")] pub ssl_compliant: Option, - /// Industry standard ID assigned to creative for reach and frequency. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. + /// Industry standard ID assigned to creative for reach and frequency. Applicable to the following creative types: INSTREAM_VIDEO and all VPAID. #[serde(alias="commercialId")] pub commercial_id: Option, - /// Whether the user can choose to skip the creative. Applicable to the following creative types: INSTREAM_VIDEO. + /// Whether the user can choose to skip the creative. Applicable to the following creative types: INSTREAM_VIDEO. pub skippable: Option, } @@ -3474,7 +3483,7 @@ impl ResponseResult for Creative {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportsConfiguration { - /// Whether the exposure to conversion report is enabled. This report shows detailed pathway information on up to 10 of the most recent ad exposures seen by a user before converting. + /// Whether the exposure to conversion report is enabled. This report shows detailed pathway information on up to 10 of the most recent ad exposures seen by a user before converting. #[serde(alias="exposureToConversionEnabled")] pub exposure_to_conversion_enabled: bool, /// Report generation time zone ID of this account. This is a required field that can only be changed by a superuser. @@ -3495,7 +3504,7 @@ pub struct ReportsConfiguration { /// - "13" for "America/Sao_Paulo" #[serde(alias="reportGenerationTimeZoneId")] pub report_generation_time_zone_id: String, - /// Default lookback windows for new advertisers in this account. + /// Default lookback windows for new advertisers in this account. #[serde(alias="lookbackConfiguration")] pub lookback_configuration: LookbackConfiguration, } @@ -3514,12 +3523,12 @@ impl Part for ReportsConfiguration {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CampaignsListResponse { - /// Campaign collection + /// Campaign collection pub campaigns: Vec, - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#campaignsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#campaignsListResponse". pub kind: String, } @@ -3537,10 +3546,10 @@ impl ResponseResult for CampaignsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UserRolePermissionsListResponse { - /// User role permission collection + /// User role permission collection #[serde(alias="userRolePermissions")] pub user_role_permissions: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolePermissionsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolePermissionsListResponse". pub kind: String, } @@ -3559,26 +3568,26 @@ impl ResponseResult for UserRolePermissionsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UserProfile { - /// The user name. + /// The user name. #[serde(alias="userName")] pub user_name: String, - /// The kind of resource this is, in this case dfareporting#userProfile. + /// The kind of resource this is, in this case dfareporting#userProfile. pub kind: String, - /// The sub account ID this profile belongs to if applicable. + /// The sub account ID this profile belongs to if applicable. #[serde(alias="subAccountId")] pub sub_account_id: String, - /// The account name this profile belongs to. + /// The account name this profile belongs to. #[serde(alias="accountName")] pub account_name: String, - /// The eTag of this response for caching purposes. + /// The eTag of this response for caching purposes. pub etag: String, - /// The sub account name this profile belongs to if applicable. + /// The sub account name this profile belongs to if applicable. #[serde(alias="subAccountName")] pub sub_account_name: String, - /// The unique ID of the user profile. + /// The unique ID of the user profile. #[serde(alias="profileId")] pub profile_id: String, - /// The account ID to which this profile belongs. + /// The account ID to which this profile belongs. #[serde(alias="accountId")] pub account_id: String, } @@ -3593,10 +3602,10 @@ impl ResponseResult for UserProfile {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeGroupAssignment { - /// ID of the creative group to be assigned. + /// ID of the creative group to be assigned. #[serde(alias="creativeGroupId")] pub creative_group_id: String, - /// Creative group number of the creative group assignment. + /// Creative group number of the creative group assignment. #[serde(alias="creativeGroupNumber")] pub creative_group_number: String, } @@ -3610,31 +3619,31 @@ impl Part for CreativeGroupAssignment {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportPathToConversionCriteria { - /// The list of conversion dimensions the report should include. + /// The list of conversion dimensions the report should include. #[serde(alias="conversionDimensions")] pub conversion_dimensions: Vec, - /// The list of names of metrics the report should include. + /// The list of names of metrics the report should include. #[serde(alias="metricNames")] pub metric_names: Vec, - /// The date range this report should be run for. + /// The date range this report should be run for. #[serde(alias="dateRange")] pub date_range: DateRange, - /// The list of custom floodlight variables the report should include. + /// The list of custom floodlight variables the report should include. #[serde(alias="customFloodlightVariables")] pub custom_floodlight_variables: Vec, - /// The list of 'dfa:activity' values to filter on. + /// The list of 'dfa:activity' values to filter on. #[serde(alias="activityFilters")] pub activity_filters: Vec, - /// The list of custom rich media events to include. + /// The list of custom rich media events to include. #[serde(alias="customRichMediaEvents")] pub custom_rich_media_events: Vec, - /// The list of per interaction dimensions the report should include. + /// The list of per interaction dimensions the report should include. #[serde(alias="perInteractionDimensions")] pub per_interaction_dimensions: Vec, - /// The properties of the report. + /// The properties of the report. #[serde(alias="reportProperties")] pub report_properties: ReportPathToConversionCriteriaReportProperties, - /// The floodlight ID for which to show data in this report. All advertisers associated with that ID will automatically be added. The dimension of the value needs to be 'dfa:floodlightConfigId'. + /// The floodlight ID for which to show data in this report. All advertisers associated with that ID will automatically be added. The dimension of the value needs to be 'dfa:floodlightConfigId'. #[serde(alias="floodlightConfigId")] pub floodlight_config_id: DimensionValue, } @@ -3654,13 +3663,13 @@ impl Part for ReportPathToConversionCriteria {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CreativeFieldsListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Creative field collection + /// Creative field collection #[serde(alias="creativeFields")] pub creative_fields: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeFieldsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeFieldsListResponse". pub kind: String, } @@ -3673,14 +3682,14 @@ impl ResponseResult for CreativeFieldsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportDelivery { - /// The message to be sent with each email. + /// The message to be sent with each email. pub message: String, - /// The type of delivery for the owner to receive, if enabled. + /// The type of delivery for the owner to receive, if enabled. #[serde(alias="emailOwnerDeliveryType")] pub email_owner_delivery_type: String, - /// The list of recipients to which to email the report. + /// The list of recipients to which to email the report. pub recipients: Vec, - /// Whether the report should be emailed to the report owner. + /// Whether the report should be emailed to the report owner. #[serde(alias="emailOwner")] pub email_owner: bool, } @@ -3695,18 +3704,18 @@ impl Part for ReportDelivery {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct GeoTargeting { - /// Regions to be targeted. For each region only dartId is required. The other fields are populated automatically when the ad is inserted or updated. If targeting a region, do not target or exclude the country of the region. + /// Regions to be targeted. For each region only dartId is required. The other fields are populated automatically when the ad is inserted or updated. If targeting a region, do not target or exclude the country of the region. pub regions: Vec, - /// Countries to be targeted or excluded from targeting, depending on the setting of the excludeCountries field. For each country only dartId is required. The other fields are populated automatically when the ad is inserted or updated. If targeting or excluding a country, do not target regions, cities, metros, or postal codes in the same country. + /// Countries to be targeted or excluded from targeting, depending on the setting of the excludeCountries field. For each country only dartId is required. The other fields are populated automatically when the ad is inserted or updated. If targeting or excluding a country, do not target regions, cities, metros, or postal codes in the same country. pub countries: Vec, - /// Metros to be targeted. For each metro only dmaId is required. The other fields are populated automatically when the ad is inserted or updated. If targeting a metro, do not target or exclude the country of the metro. + /// Metros to be targeted. For each metro only dmaId is required. The other fields are populated automatically when the ad is inserted or updated. If targeting a metro, do not target or exclude the country of the metro. pub metros: Vec, - /// Cities to be targeted. For each city only dartId is required. The other fields are populated automatically when the ad is inserted or updated. If targeting a city, do not target or exclude the country of the city, and do not target the metro or region of the city. + /// Cities to be targeted. For each city only dartId is required. The other fields are populated automatically when the ad is inserted or updated. If targeting a city, do not target or exclude the country of the city, and do not target the metro or region of the city. pub cities: Vec, - /// Whether or not to exclude the countries in the countries field from targeting. If false, the countries field refers to countries which will be targeted by the ad. + /// Whether or not to exclude the countries in the countries field from targeting. If false, the countries field refers to countries which will be targeted by the ad. #[serde(alias="excludeCountries")] pub exclude_countries: bool, - /// Postal codes to be targeted. For each postal code only id is required. The other fields are populated automatically when the ad is inserted or updated. If targeting a postal code, do not target or exclude the country of the postal code. + /// Postal codes to be targeted. For each postal code only id is required. The other fields are populated automatically when the ad is inserted or updated. If targeting a postal code, do not target or exclude the country of the postal code. #[serde(alias="postalCodes")] pub postal_codes: Vec, } @@ -3720,15 +3729,15 @@ impl Part for GeoTargeting {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DeliverySchedule { - /// Serving priority of an ad, with respect to other ads. The lower the priority number, the greater the priority with which it is served. + /// Serving priority of an ad, with respect to other ads. The lower the priority number, the greater the priority with which it is served. pub priority: String, - /// Whether or not hard cutoff is enabled. If true, the ad will not serve after the end date and time. Otherwise the ad will continue to be served until it has reached its delivery goals. + /// Whether or not hard cutoff is enabled. If true, the ad will not serve after the end date and time. Otherwise the ad will continue to be served until it has reached its delivery goals. #[serde(alias="hardCutoff")] pub hard_cutoff: bool, - /// Limit on the number of times an individual user can be served the ad within a specified period of time. + /// Limit on the number of times an individual user can be served the ad within a specified period of time. #[serde(alias="frequencyCap")] pub frequency_cap: FrequencyCap, - /// Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Must be between 1 and 10. + /// Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three times as often as ad A. Must be between 1 and 10. #[serde(alias="impressionRatio")] pub impression_ratio: String, } @@ -3742,26 +3751,26 @@ impl Part for DeliverySchedule {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportSchedule { - /// Start date of date range for which scheduled reports should be run. + /// Start date of date range for which scheduled reports should be run. #[serde(alias="startDate")] pub start_date: String, /// Enum to define for "MONTHLY" scheduled reports whether reports should be repeated on the same day of the month as "startDate" or the same day of the week of the month. /// Example: If 'startDate' is Monday, April 2nd 2012 (2012-04-02), "DAY_OF_MONTH" would run subsequent reports on the 2nd of every Month, and "WEEK_OF_MONTH" would run subsequent reports on the first Monday of the month. #[serde(alias="runsOnDayOfMonth")] pub runs_on_day_of_month: String, - /// The expiration date when the scheduled report stops running. + /// The expiration date when the scheduled report stops running. #[serde(alias="expirationDate")] pub expiration_date: String, - /// Whether the schedule is active or not. Must be set to either true or false. + /// Whether the schedule is active or not. Must be set to either true or false. pub active: bool, - /// Defines every how many days, weeks or months the report should be run. Needs to be set when "repeats" is either "DAILY", "WEEKLY" or "MONTHLY". + /// Defines every how many days, weeks or months the report should be run. Needs to be set when "repeats" is either "DAILY", "WEEKLY" or "MONTHLY". pub every: i32, /// The interval for which the report is repeated. Note: /// - "DAILY" also requires field "every" to be set. /// - "WEEKLY" also requires fields "every" and "repeatsOnWeekDays" to be set. /// - "MONTHLY" also requires fields "every" and "runsOnDayOfMonth" to be set. pub repeats: String, - /// List of week days "WEEKLY" on which scheduled reports should run. + /// List of week days "WEEKLY" on which scheduled reports should run. #[serde(alias="repeatsOnWeekDays")] pub repeats_on_week_days: Vec, } @@ -3776,12 +3785,12 @@ impl Part for ReportSchedule {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Recipient { - /// The kind of resource this is, in this case dfareporting#recipient. + /// The kind of resource this is, in this case dfareporting#recipient. pub kind: String, - /// The delivery type for the recipient. + /// The delivery type for the recipient. #[serde(alias="deliveryType")] pub delivery_type: String, - /// The email address of the recipient. + /// The email address of the recipient. pub email: String, } @@ -3794,16 +3803,16 @@ impl Part for Recipient {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReportCompatibleFields { - /// Metrics which are compatible to be selected in the "metricNames" section of the report. + /// Metrics which are compatible to be selected in the "metricNames" section of the report. pub metrics: Vec, - /// The kind of resource this is, in this case dfareporting#reportCompatibleFields. + /// The kind of resource this is, in this case dfareporting#reportCompatibleFields. pub kind: String, - /// Metrics which are compatible to be selected as activity metrics to pivot on in the "activities" section of the report. + /// Metrics which are compatible to be selected as activity metrics to pivot on in the "activities" section of the report. #[serde(alias="pivotedActivityMetrics")] pub pivoted_activity_metrics: Vec, - /// Dimensions which are compatible to be selected in the "dimensions" section of the report. + /// Dimensions which are compatible to be selected in the "dimensions" section of the report. pub dimensions: Vec, - /// Dimensions which are compatible to be selected in the "dimensionFilters" section of the report. + /// Dimensions which are compatible to be selected in the "dimensionFilters" section of the report. #[serde(alias="dimensionFilters")] pub dimension_filters: Vec, } @@ -3822,12 +3831,12 @@ impl Part for ReportCompatibleFields {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdvertiserGroupsListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#advertiserGroupsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#advertiserGroupsListResponse". pub kind: String, - /// Advertiser group collection + /// Advertiser group collection #[serde(alias="advertiserGroups")] pub advertiser_groups: Vec, } @@ -3846,12 +3855,12 @@ impl ResponseResult for AdvertiserGroupsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PlacementGroupsListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementGroupsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementGroupsListResponse". pub kind: String, - /// Placement group collection + /// Placement group collection #[serde(alias="placementGroups")] pub placement_groups: Vec, } @@ -3865,31 +3874,31 @@ impl ResponseResult for PlacementGroupsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportPathToConversionCriteriaReportProperties { - /// DFA checks to see if a click interaction occurred within the specified period of time before a conversion. By default the value is pulled from Floodlight or you can manually enter a custom value. Valid values: 1-90. + /// DFA checks to see if a click interaction occurred within the specified period of time before a conversion. By default the value is pulled from Floodlight or you can manually enter a custom value. Valid values: 1-90. #[serde(alias="clicksLookbackWindow")] pub clicks_lookback_window: i32, - /// Enable pivoting on interaction path. + /// Enable pivoting on interaction path. #[serde(alias="pivotOnInteractionPath")] pub pivot_on_interaction_path: bool, - /// DFA checks to see if an impression interaction occurred within the specified period of time before a conversion. By default the value is pulled from Floodlight or you can manually enter a custom value. Valid values: 1-90. + /// DFA checks to see if an impression interaction occurred within the specified period of time before a conversion. By default the value is pulled from Floodlight or you can manually enter a custom value. Valid values: 1-90. #[serde(alias="impressionsLookbackWindow")] pub impressions_lookback_window: i32, - /// Include conversions that have no associated cookies and no exposures. It’s therefore impossible to know how the user was exposed to your ads during the lookback window prior to a conversion. + /// Include conversions that have no associated cookies and no exposures. It’s therefore impossible to know how the user was exposed to your ads during the lookback window prior to a conversion. #[serde(alias="includeUnattributedIPConversions")] pub include_unattributed_ip_conversions: bool, - /// Include conversions of users with a DoubleClick cookie but without an exposure. That means the user did not click or see an ad from the advertiser within the Floodlight group, or that the interaction happened outside the lookback window. + /// Include conversions of users with a DoubleClick cookie but without an exposure. That means the user did not click or see an ad from the advertiser within the Floodlight group, or that the interaction happened outside the lookback window. #[serde(alias="includeUnattributedCookieConversions")] pub include_unattributed_cookie_conversions: bool, - /// The maximum amount of time that can take place between interactions (clicks or impressions) by the same user. Valid values: 1-90. + /// The maximum amount of time that can take place between interactions (clicks or impressions) by the same user. Valid values: 1-90. #[serde(alias="maximumInteractionGap")] pub maximum_interaction_gap: i32, - /// Deprecated: has no effect. + /// Deprecated: has no effect. #[serde(alias="includeAttributedIPConversions")] pub include_attributed_ip_conversions: bool, - /// The maximum number of click interactions to include in the report. Advertisers currently paying for E2C reports get up to 200 (100 clicks, 100 impressions). If another advertiser in your network is paying for E2C, you can have up to 5 total exposures per report. + /// The maximum number of click interactions to include in the report. Advertisers currently paying for E2C reports get up to 200 (100 clicks, 100 impressions). If another advertiser in your network is paying for E2C, you can have up to 5 total exposures per report. #[serde(alias="maximumClickInteractions")] pub maximum_click_interactions: i32, - /// The maximum number of click interactions to include in the report. Advertisers currently paying for E2C reports get up to 200 (100 clicks, 100 impressions). If another advertiser in your network is paying for E2C, you can have up to 5 total exposures per report. + /// The maximum number of click interactions to include in the report. Advertisers currently paying for E2C reports get up to 200 (100 clicks, 100 impressions). If another advertiser in your network is paying for E2C, you can have up to 5 total exposures per report. #[serde(alias="maximumImpressionInteractions")] pub maximum_impression_interactions: i32, } @@ -3904,21 +3913,21 @@ impl Part for ReportPathToConversionCriteriaReportProperties {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TechnologyTargeting { - /// Browsers that this ad targets. For each browser either set browserVersionId or dartId along with the version numbers. If both are specified, only browserVersionId will be used.The other fields are populated automatically when the ad is inserted or updated. + /// Browsers that this ad targets. For each browser either set browserVersionId or dartId along with the version numbers. If both are specified, only browserVersionId will be used.The other fields are populated automatically when the ad is inserted or updated. pub browsers: Vec, - /// Operating systems that this ad targets. To target specific versions, use operatingSystemVersions. For each operating system only dartId is required. The other fields are populated automatically when the ad is inserted or updated. If targeting an operating system, do not set targeting for operating system versions for the same operating system. + /// Operating systems that this ad targets. To target specific versions, use operatingSystemVersions. For each operating system only dartId is required. The other fields are populated automatically when the ad is inserted or updated. If targeting an operating system, do not set targeting for operating system versions for the same operating system. #[serde(alias="operatingSystems")] pub operating_systems: Vec, - /// Mobile carriers that this ad targets. For each mobile carrier only id is required, and the other fields are populated automatically when the ad is inserted or updated. If targeting a mobile carrier, do not set targeting for any zip codes. + /// Mobile carriers that this ad targets. For each mobile carrier only id is required, and the other fields are populated automatically when the ad is inserted or updated. If targeting a mobile carrier, do not set targeting for any zip codes. #[serde(alias="mobileCarriers")] pub mobile_carriers: Vec, - /// Connection types that this ad targets. For each connection type only id is required.The other fields are populated automatically when the ad is inserted or updated. + /// Connection types that this ad targets. For each connection type only id is required.The other fields are populated automatically when the ad is inserted or updated. #[serde(alias="connectionTypes")] pub connection_types: Vec, - /// Platform types that this ad targets. For example, desktop, mobile, or tablet. For each platform type, only id is required, and the other fields are populated automatically when the ad is inserted or updated. + /// Platform types that this ad targets. For example, desktop, mobile, or tablet. For each platform type, only id is required, and the other fields are populated automatically when the ad is inserted or updated. #[serde(alias="platformTypes")] pub platform_types: Vec, - /// Operating system versions that this ad targets. To target all versions, use operatingSystems. For each operating system version, only id is required. The other fields are populated automatically when the ad is inserted or updated. If targeting an operating system version, do not set targeting for the corresponding operating system in operatingSystems. + /// Operating system versions that this ad targets. To target all versions, use operatingSystems. For each operating system version, only id is required. The other fields are populated automatically when the ad is inserted or updated. If targeting an operating system version, do not set targeting for the corresponding operating system in operatingSystems. #[serde(alias="operatingSystemVersions")] pub operating_system_versions: Vec, } @@ -3932,13 +3941,13 @@ impl Part for TechnologyTargeting {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OptimizationActivity { - /// Floodlight activity ID of this optimization activity. This is a required field. + /// Floodlight activity ID of this optimization activity. This is a required field. #[serde(alias="floodlightActivityId")] pub floodlight_activity_id: String, - /// Dimension value for the ID of the floodlight activity. This is a read-only, auto-generated field. + /// Dimension value for the ID of the floodlight activity. This is a read-only, auto-generated field. #[serde(alias="floodlightActivityIdDimensionValue")] pub floodlight_activity_id_dimension_value: DimensionValue, - /// Weight associated with this optimization. Must be greater than 1. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities. + /// Weight associated with this optimization. Must be greater than 1. The weight assigned will be understood in proportion to the weights assigned to the other optimization activities. pub weight: i32, } @@ -3951,7 +3960,7 @@ impl Part for OptimizationActivity {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ListTargetingExpression { - /// Expression describing which lists are being targeted by the ad. + /// Expression describing which lists are being targeted by the ad. pub expression: String, } @@ -3995,16 +4004,16 @@ pub struct CreativeAssetMetadata { /// - "HTML5_FEATURE_UNSUPPORTED' " #[serde(alias="warnedValidationRules")] pub warned_validation_rules: Option>, - /// List of feature dependencies for the creative asset that are detected by DCM. Feature dependencies are features that a browser must be able to support in order to render your HTML5 creative correctly. This is a read-only, auto-generated field. + /// List of feature dependencies for the creative asset that are detected by DCM. Feature dependencies are features that a browser must be able to support in order to render your HTML5 creative correctly. This is a read-only, auto-generated field. #[serde(alias="detectedFeatures")] pub detected_features: Option>, - /// List of detected click tags for assets. This is a read-only auto-generated field. + /// List of detected click tags for assets. This is a read-only auto-generated field. #[serde(alias="clickTags")] pub click_tags: Option>, - /// ID of the creative asset. This is a required field. + /// ID of the creative asset. This is a required field. #[serde(alias="assetIdentifier")] pub asset_identifier: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeAssetMetadata". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeAssetMetadata". pub kind: Option, } @@ -4018,19 +4027,19 @@ impl ResponseResult for CreativeAssetMetadata {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TagData { - /// Tag string to record a click. + /// Tag string to record a click. #[serde(alias="clickTag")] pub click_tag: String, - /// Tag string for serving an ad. + /// Tag string for serving an ad. #[serde(alias="impressionTag")] pub impression_tag: String, - /// Creative associated with this placement tag. + /// Creative associated with this placement tag. #[serde(alias="creativeId")] pub creative_id: String, - /// Ad associated with this placement tag. + /// Ad associated with this placement tag. #[serde(alias="adId")] pub ad_id: String, - /// TagData tag format of this tag. + /// TagData tag format of this tag. pub format: String, } @@ -4043,25 +4052,25 @@ impl Part for TagData {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportFloodlightCriteria { - /// The floodlight ID for which to show data in this report. All advertisers associated with that ID will automatically be added. The dimension of the value needs to be 'dfa:floodlightConfigId'. + /// The floodlight ID for which to show data in this report. All advertisers associated with that ID will automatically be added. The dimension of the value needs to be 'dfa:floodlightConfigId'. #[serde(alias="floodlightConfigId")] pub floodlight_config_id: DimensionValue, - /// The list of dimensions the report should include. + /// The list of dimensions the report should include. pub dimensions: Vec, - /// The list of names of metrics the report should include. + /// The list of names of metrics the report should include. #[serde(alias="metricNames")] pub metric_names: Vec, - /// The date range this report should be run for. + /// The date range this report should be run for. #[serde(alias="dateRange")] pub date_range: DateRange, - /// The list of custom rich media events to include. + /// The list of custom rich media events to include. #[serde(alias="customRichMediaEvents")] pub custom_rich_media_events: Vec, /// The list of filters on which dimensions are filtered. /// Filters for different dimensions are ANDed, filters for the same dimension are grouped together and ORed. #[serde(alias="dimensionFilters")] pub dimension_filters: Vec, - /// The properties of the report. + /// The properties of the report. #[serde(alias="reportProperties")] pub report_properties: ReportFloodlightCriteriaReportProperties, } @@ -4081,9 +4090,9 @@ impl Part for ReportFloodlightCriteria {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct LandingPagesListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#landingPagesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#landingPagesListResponse". pub kind: String, - /// Landing page collection + /// Landing page collection #[serde(alias="landingPages")] pub landing_pages: Vec, } @@ -4102,12 +4111,12 @@ impl ResponseResult for LandingPagesListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SitesListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#sitesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#sitesListResponse". pub kind: String, - /// Site collection + /// Site collection pub sites: Vec, } @@ -4120,12 +4129,12 @@ impl ResponseResult for SitesListResponse {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct DimensionFilter { - /// The name of the dimension to filter. + /// The name of the dimension to filter. #[serde(alias="dimensionName")] pub dimension_name: String, - /// The kind of resource this is, in this case dfareporting#dimensionFilter. + /// The kind of resource this is, in this case dfareporting#dimensionFilter. pub kind: String, - /// The value of the dimension to filter. + /// The value of the dimension to filter. pub value: String, } @@ -4143,14 +4152,14 @@ impl Part for DimensionFilter {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PostalCode { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#postalCode". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#postalCode". pub kind: Option, - /// DART ID of the country to which this postal code belongs. + /// DART ID of the country to which this postal code belongs. #[serde(alias="countryDartId")] pub country_dart_id: Option, - /// ID of this postal code. + /// ID of this postal code. pub id: Option, - /// Country code of the country to which this postal code belongs. + /// Country code of the country to which this postal code belongs. #[serde(alias="countryCode")] pub country_code: Option, } @@ -4172,27 +4181,27 @@ impl Resource for PostalCode {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FloodlightActivity { - /// Whether this tag should use SSL. + /// Whether this tag should use SSL. pub secure: Option, - /// Dimension value for the ID of this floodlight activity. This is a read-only, auto-generated field. + /// Dimension value for the ID of this floodlight activity. This is a read-only, auto-generated field. #[serde(alias="idDimensionValue")] pub id_dimension_value: Option, - /// Name of the associated floodlight activity group. This is a read-only field. + /// Name of the associated floodlight activity group. This is a read-only field. #[serde(alias="floodlightActivityGroupName")] pub floodlight_activity_group_name: Option, - /// Whether the image tag is enabled for this activity. + /// Whether the image tag is enabled for this activity. #[serde(alias="imageTagEnabled")] pub image_tag_enabled: Option, - /// Advertiser ID of this floodlight activity. If this field is left blank, the value will be copied over either from the activity group's advertiser or the existing activity's advertiser. + /// Advertiser ID of this floodlight activity. If this field is left blank, the value will be copied over either from the activity group's advertiser or the existing activity's advertiser. #[serde(alias="advertiserId")] pub advertiser_id: Option, - /// Code type used for cache busting in the generated tag. + /// Code type used for cache busting in the generated tag. #[serde(alias="cacheBustingType")] pub cache_busting_type: Option, - /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. + /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. #[serde(alias="advertiserIdDimensionValue")] pub advertiser_id_dimension_value: Option, - /// Floodlight activity group ID of this floodlight activity. This is a required field. + /// Floodlight activity group ID of this floodlight activity. This is a required field. #[serde(alias="floodlightActivityGroupId")] pub floodlight_activity_group_id: Option, /// List of the user-defined variables used by this conversion tag. These map to the "u[1-20]=" in the tags. Each of these can have a user defined type. @@ -4219,56 +4228,56 @@ pub struct FloodlightActivity { /// - "U20" #[serde(alias="userDefinedVariableTypes")] pub user_defined_variable_types: Option>, - /// Value of the cat= paramter in the floodlight tag, which the ad servers use to identify the activity. This is optional: if empty, a new tag string will be generated for you. This string must be 1 to 8 characters long, with valid characters being [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique among activities of the same activity group. This field is read-only after insertion. + /// Value of the cat= paramter in the floodlight tag, which the ad servers use to identify the activity. This is optional: if empty, a new tag string will be generated for you. This string must be 1 to 8 characters long, with valid characters being [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique among activities of the same activity group. This field is read-only after insertion. #[serde(alias="tagString")] pub tag_string: Option, - /// Tag string of the associated floodlight activity group. This is a read-only field. + /// Tag string of the associated floodlight activity group. This is a read-only field. #[serde(alias="floodlightActivityGroupTagString")] pub floodlight_activity_group_tag_string: Option, - /// URL where this tag will be deployed. If specified, must be less than 256 characters long. + /// URL where this tag will be deployed. If specified, must be less than 256 characters long. #[serde(alias="expectedUrl")] pub expected_url: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivity". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightActivity". pub kind: Option, - /// Subaccount ID of this floodlight activity. This is a read-only field that can be left blank. + /// Subaccount ID of this floodlight activity. This is a read-only field that can be left blank. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Name of this floodlight activity. This is a required field. Must be less than 129 characters long and cannot contain quotes. + /// Name of this floodlight activity. This is a required field. Must be less than 129 characters long and cannot contain quotes. pub name: Option, - /// Publisher dynamic floodlight tags. + /// Publisher dynamic floodlight tags. #[serde(alias="publisherTags")] pub publisher_tags: Option>, - /// Whether the floodlight activity is SSL-compliant. This is a read-only field, its value detected by the system from the floodlight tags. + /// Whether the floodlight activity is SSL-compliant. This is a read-only field, its value detected by the system from the floodlight tags. #[serde(alias="sslCompliant")] pub ssl_compliant: Option, - /// General notes or implementation instructions for the tag. + /// General notes or implementation instructions for the tag. pub notes: Option, - /// Floodlight configuration ID of this floodlight activity. If this field is left blank, the value will be copied over either from the activity group's floodlight configuration or from the existing activity's floodlight configuration. + /// Floodlight configuration ID of this floodlight activity. If this field is left blank, the value will be copied over either from the activity group's floodlight configuration or from the existing activity's floodlight configuration. #[serde(alias="floodlightConfigurationId")] pub floodlight_configuration_id: Option, - /// ID of this floodlight activity. This is a read-only, auto-generated field. + /// ID of this floodlight activity. This is a read-only, auto-generated field. pub id: Option, - /// Counting method for conversions for this floodlight activity. This is a required field. + /// Counting method for conversions for this floodlight activity. This is a required field. #[serde(alias="countingMethod")] pub counting_method: Option, - /// Dynamic floodlight tags. + /// Dynamic floodlight tags. #[serde(alias="defaultTags")] pub default_tags: Option>, - /// Dimension value for the ID of the floodlight configuration. This is a read-only, auto-generated field. + /// Dimension value for the ID of the floodlight configuration. This is a read-only, auto-generated field. #[serde(alias="floodlightConfigurationIdDimensionValue")] pub floodlight_configuration_id_dimension_value: Option, - /// Tag format type for the floodlight activity. If left blank, the tag format will default to HTML. + /// Tag format type for the floodlight activity. If left blank, the tag format will default to HTML. #[serde(alias="tagFormat")] pub tag_format: Option, - /// Whether this activity is archived. + /// Whether this activity is archived. pub hidden: Option, - /// Account ID of this floodlight activity. This is a read-only field that can be left blank. + /// Account ID of this floodlight activity. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, - /// Whether this floodlight activity must be SSL-compliant. + /// Whether this floodlight activity must be SSL-compliant. #[serde(alias="sslRequired")] pub ssl_required: Option, - /// Type of the associated floodlight activity group. This is a read-only field. + /// Type of the associated floodlight activity group. This is a read-only field. #[serde(alias="floodlightActivityGroupType")] pub floodlight_activity_group_type: Option, } @@ -4288,20 +4297,20 @@ impl ResponseResult for FloodlightActivity {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Browser { - /// Major version number (leftmost number) of this browser. For example, for Chrome 5.0.376.86 beta, this field should be set to 5. An asterisk (*) may be used to target any version number, and a question mark (?) may be used to target cases where the version number cannot be identified. For example, Chrome *.* targets any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad server knows the browser is Firefox but can't tell which version it is. + /// Major version number (leftmost number) of this browser. For example, for Chrome 5.0.376.86 beta, this field should be set to 5. An asterisk (*) may be used to target any version number, and a question mark (?) may be used to target cases where the version number cannot be identified. For example, Chrome *.* targets any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad server knows the browser is Firefox but can't tell which version it is. #[serde(alias="majorVersion")] pub major_version: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#browser". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#browser". pub kind: Option, - /// ID referring to this grouping of browser and version numbers. This is the ID used for targeting. + /// ID referring to this grouping of browser and version numbers. This is the ID used for targeting. #[serde(alias="browserVersionId")] pub browser_version_id: Option, - /// Name of this browser. + /// Name of this browser. pub name: Option, - /// DART ID of this browser. This is the ID used when generating reports. + /// DART ID of this browser. This is the ID used when generating reports. #[serde(alias="dartId")] pub dart_id: Option, - /// Minor version number (number after first dot on left) of this browser. For example, for Chrome 5.0.375.86 beta, this field should be set to 0. An asterisk (*) may be used to target any version number, and a question mark (?) may be used to target cases where the version number cannot be identified. For example, Chrome *.* targets any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad server knows the browser is Firefox but can't tell which version it is. + /// Minor version number (number after first dot on left) of this browser. For example, for Chrome 5.0.375.86 beta, this field should be set to 0. An asterisk (*) may be used to target any version number, and a question mark (?) may be used to target cases where the version number cannot be identified. For example, Chrome *.* targets any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome 3.* targets Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where the ad server knows the browser is Firefox but can't tell which version it is. #[serde(alias="minorVersion")] pub minor_version: Option, } @@ -4320,13 +4329,13 @@ impl Resource for Browser {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountUserProfilesListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Account user profile collection + /// Account user profile collection #[serde(alias="accountUserProfiles")] pub account_user_profiles: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountUserProfilesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountUserProfilesListResponse". pub kind: String, } @@ -4348,19 +4357,19 @@ impl ResponseResult for AccountUserProfilesListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Advertiser { - /// Status of this advertiser. + /// Status of this advertiser. pub status: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#advertiser". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#advertiser". pub kind: Option, - /// Subaccount ID of this advertiser.This is a read-only field that can be left blank. + /// Subaccount ID of this advertiser.This is a read-only field that can be left blank. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Name of this advertiser. This is a required field and must be less than 256 characters long and unique among advertisers of the same account. + /// Name of this advertiser. This is a required field and must be less than 256 characters long and unique among advertisers of the same account. pub name: Option, - /// ID of the click-through event tag to apply by default to the landing pages of this advertiser's campaigns. + /// ID of the click-through event tag to apply by default to the landing pages of this advertiser's campaigns. #[serde(alias="defaultClickThroughEventTagId")] pub default_click_through_event_tag_id: Option, - /// Suffix added to click-through URL of ad creative associations under this advertiser. Must be less than 129 characters long. + /// Suffix added to click-through URL of ad creative associations under this advertiser. Must be less than 129 characters long. #[serde(alias="clickThroughUrlSuffix")] pub click_through_url_suffix: Option, /// Floodlight configuration ID of this advertiser. The floodlight configuration ID will be created automatically, so on insert this field should be left blank. This field can be set to another advertiser's floodlight configuration ID in order to share that advertiser's floodlight configuration with this advertiser, so long as: @@ -4368,21 +4377,21 @@ pub struct Advertiser { /// - This advertiser's original floodlight configuration is not already shared with another advertiser. #[serde(alias="floodlightConfigurationId")] pub floodlight_configuration_id: Option, - /// Dimension value for the ID of the floodlight configuration. This is a read-only, auto-generated field. + /// Dimension value for the ID of the floodlight configuration. This is a read-only, auto-generated field. #[serde(alias="floodlightConfigurationIdDimensionValue")] pub floodlight_configuration_id_dimension_value: Option, - /// ID of the advertiser group this advertiser belongs to. You can group advertisers for reporting purposes, allowing you to see aggregated information for all advertisers in each group. + /// ID of the advertiser group this advertiser belongs to. You can group advertisers for reporting purposes, allowing you to see aggregated information for all advertisers in each group. #[serde(alias="advertiserGroupId")] pub advertiser_group_id: Option, - /// Dimension value for the ID of this advertiser. This is a read-only, auto-generated field. + /// Dimension value for the ID of this advertiser. This is a read-only, auto-generated field. #[serde(alias="idDimensionValue")] pub id_dimension_value: Option, - /// Default email address used in sender field for tag emails. + /// Default email address used in sender field for tag emails. #[serde(alias="defaultEmail")] pub default_email: Option, - /// ID of this advertiser. This is a read-only, auto-generated field. + /// ID of this advertiser. This is a read-only, auto-generated field. pub id: Option, - /// Account ID of this advertiser.This is a read-only field that can be left blank. + /// Account ID of this advertiser.This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, } @@ -4403,9 +4412,9 @@ impl ResponseResult for Advertiser {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PlatformTypesListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#platformTypesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#platformTypesListResponse". pub kind: String, - /// Platform type collection + /// Platform type collection #[serde(alias="platformTypes")] pub platform_types: Vec, } @@ -4424,12 +4433,12 @@ impl ResponseResult for PlatformTypesListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ChangeLogsListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#changeLogsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#changeLogsListResponse". pub kind: String, - /// Change log collection + /// Change log collection #[serde(alias="changeLogs")] pub change_logs: Vec, } @@ -4448,12 +4457,12 @@ impl ResponseResult for ChangeLogsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PlacementsListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementsListResponse". pub kind: String, - /// Placement collection + /// Placement collection pub placements: Vec, } @@ -4471,12 +4480,12 @@ impl ResponseResult for PlacementsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AdsListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#adsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#adsListResponse". pub kind: String, - /// Ad collection + /// Ad collection pub ads: Vec, } @@ -4489,27 +4498,27 @@ impl ResponseResult for AdsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportReachCriteria { - /// Activity group. + /// Activity group. pub activities: Activities, - /// The list of dimensions the report should include. + /// The list of dimensions the report should include. pub dimensions: Vec, - /// The list of names of metrics the report should include. + /// The list of names of metrics the report should include. #[serde(alias="metricNames")] pub metric_names: Vec, - /// The date range this report should be run for. + /// The date range this report should be run for. #[serde(alias="dateRange")] pub date_range: DateRange, /// The list of filters on which dimensions are filtered. /// Filters for different dimensions are ANDed, filters for the same dimension are grouped together and ORed. #[serde(alias="dimensionFilters")] pub dimension_filters: Vec, - /// The list of names of Reach By Frequency metrics the report should include. + /// The list of names of Reach By Frequency metrics the report should include. #[serde(alias="reachByFrequencyMetricNames")] pub reach_by_frequency_metric_names: Vec, - /// Custom Rich Media Events group. + /// Custom Rich Media Events group. #[serde(alias="customRichMediaEvents")] pub custom_rich_media_events: CustomRichMediaEvents, - /// Whether to enable all reach dimension combinations in the report. Defaults to false. If enabled, the date range of the report should be within the last three months. + /// Whether to enable all reach dimension combinations in the report. Defaults to false. If enabled, the date range of the report should be within the last three months. #[serde(alias="enableAllDimensionCombinations")] pub enable_all_dimension_combinations: bool, } @@ -4524,10 +4533,10 @@ impl Part for ReportReachCriteria {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct FileUrls { - /// The URL for downloading the report data through a browser. + /// The URL for downloading the report data through a browser. #[serde(alias="browserUrl")] pub browser_url: String, - /// The URL for downloading the report data through the API. + /// The URL for downloading the report data through the API. #[serde(alias="apiUrl")] pub api_url: String, } @@ -4542,13 +4551,13 @@ impl Part for FileUrls {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserDefinedVariableConfiguration { - /// Data type for the variable. This is a required field. + /// Data type for the variable. This is a required field. #[serde(alias="dataType")] pub data_type: String, - /// User-friendly name for the variable which will appear in reports. This is a required field, must be less than 64 characters long, and cannot contain the following characters: ""<>". + /// User-friendly name for the variable which will appear in reports. This is a required field, must be less than 64 characters long, and cannot contain the following characters: ""<>". #[serde(alias="reportName")] pub report_name: String, - /// Variable name in the tag. This is a required field. + /// Variable name in the tag. This is a required field. #[serde(alias="variableType")] pub variable_type: String, } @@ -4562,22 +4571,22 @@ impl Part for UserDefinedVariableConfiguration {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FloodlightActivityPublisherDynamicTag { - /// Whether this tag is applicable only for view-throughs. + /// Whether this tag is applicable only for view-throughs. #[serde(alias="viewThrough")] pub view_through: bool, - /// Site ID of this dynamic tag. + /// Site ID of this dynamic tag. #[serde(alias="siteId")] pub site_id: String, - /// Whether this tag is applicable only for click-throughs. + /// Whether this tag is applicable only for click-throughs. #[serde(alias="clickThrough")] pub click_through: bool, - /// Directory site ID of this dynamic tag. This is a write-only field that can be used as an alternative to the siteId field. When this resource is retrieved, only the siteId field will be populated. + /// Directory site ID of this dynamic tag. This is a write-only field that can be used as an alternative to the siteId field. When this resource is retrieved, only the siteId field will be populated. #[serde(alias="directorySiteId")] pub directory_site_id: String, - /// Dimension value for the ID of the site. This is a read-only, auto-generated field. + /// Dimension value for the ID of the site. This is a read-only, auto-generated field. #[serde(alias="siteIdDimensionValue")] pub site_id_dimension_value: DimensionValue, - /// Dynamic floodlight tag. + /// Dynamic floodlight tag. #[serde(alias="dynamicTag")] pub dynamic_tag: FloodlightActivityDynamicTag, } @@ -4601,15 +4610,15 @@ impl Part for FloodlightActivityPublisherDynamicTag {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LandingPage { - /// Whether or not this landing page will be assigned to any ads or creatives that do not have a landing page assigned explicitly. Only one default landing page is allowed per campaign. + /// Whether or not this landing page will be assigned to any ads or creatives that do not have a landing page assigned explicitly. Only one default landing page is allowed per campaign. pub default: Option, - /// URL of this landing page. This is a required field. + /// URL of this landing page. This is a required field. pub url: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#landingPage". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#landingPage". pub kind: Option, - /// ID of this landing page. This is a read-only, auto-generated field. + /// ID of this landing page. This is a read-only, auto-generated field. pub id: Option, - /// Name of this landing page. This is a required field. Must be less than 256 characters long, and must be unique among landing pages of the same campaign. + /// Name of this landing page. This is a required field. Must be less than 256 characters long, and must be unique among landing pages of the same campaign. pub name: Option, } @@ -4631,15 +4640,15 @@ impl ResponseResult for LandingPage {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Size { - /// Width of this size. + /// Width of this size. pub width: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#size". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#size". pub kind: Option, - /// Height of this size. + /// Height of this size. pub height: Option, - /// ID of this size. This is a read-only, auto-generated field. + /// ID of this size. This is a read-only, auto-generated field. pub id: Option, - /// IAB standard size. This is a read-only, auto-generated field. + /// IAB standard size. This is a read-only, auto-generated field. pub iab: Option, } @@ -4654,29 +4663,29 @@ impl ResponseResult for Size {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct City { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#city". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#city". pub kind: String, - /// DART ID of the country to which this city belongs. + /// DART ID of the country to which this city belongs. #[serde(alias="countryDartId")] pub country_dart_id: String, - /// Name of this city. + /// Name of this city. pub name: String, - /// Country code of the country to which this city belongs. + /// Country code of the country to which this city belongs. #[serde(alias="countryCode")] pub country_code: String, - /// Metro region code of the metro region (DMA) to which this city belongs. + /// Metro region code of the metro region (DMA) to which this city belongs. #[serde(alias="metroCode")] pub metro_code: String, - /// Region code of the region to which this city belongs. + /// Region code of the region to which this city belongs. #[serde(alias="regionCode")] pub region_code: String, - /// ID of the metro region (DMA) to which this city belongs. + /// ID of the metro region (DMA) to which this city belongs. #[serde(alias="metroDmaId")] pub metro_dma_id: String, - /// DART ID of this city. This is the ID used for targeting and generating reports. + /// DART ID of this city. This is the ID used for targeting and generating reports. #[serde(alias="dartId")] pub dart_id: String, - /// DART ID of the region to which this city belongs. + /// DART ID of the region to which this city belongs. #[serde(alias="regionDartId")] pub region_dart_id: String, } @@ -4690,10 +4699,10 @@ impl Part for City {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ClickThroughUrlSuffixProperties { - /// Click-through URL suffix to apply to all ads in this entity's scope. Must be less than 128 characters long. + /// Click-through URL suffix to apply to all ads in this entity's scope. Must be less than 128 characters long. #[serde(alias="clickThroughUrlSuffix")] pub click_through_url_suffix: String, - /// Whether this entity should override the inherited click-through URL suffix with its own defined value. + /// Whether this entity should override the inherited click-through URL suffix with its own defined value. #[serde(alias="overrideInheritedSuffix")] pub override_inherited_suffix: bool, } @@ -4716,80 +4725,80 @@ impl Part for ClickThroughUrlSuffixProperties {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlacementGroup { - /// Comments for this placement group. + /// Comments for this placement group. pub comment: Option, - /// ID of the primary placement, used to calculate the media cost of a roadblock (placement group). Modifying this field will automatically modify the primary field on all affected roadblock child placements. + /// ID of the primary placement, used to calculate the media cost of a roadblock (placement group). Modifying this field will automatically modify the primary field on all affected roadblock child placements. #[serde(alias="primaryPlacementId")] pub primary_placement_id: Option, - /// Campaign ID of this placement group. This field is required on insertion. + /// Campaign ID of this placement group. This field is required on insertion. #[serde(alias="campaignId")] pub campaign_id: Option, - /// Dimension value for the ID of the primary placement. This is a read-only, auto-generated field. + /// Dimension value for the ID of the primary placement. This is a read-only, auto-generated field. #[serde(alias="primaryPlacementIdDimensionValue")] pub primary_placement_id_dimension_value: Option, - /// Dimension value for the ID of the directory site. This is a read-only, auto-generated field. + /// Dimension value for the ID of the directory site. This is a read-only, auto-generated field. #[serde(alias="directorySiteIdDimensionValue")] pub directory_site_id_dimension_value: Option, - /// Advertiser ID of this placement group. This is a required field on insertion. + /// Advertiser ID of this placement group. This is a required field on insertion. #[serde(alias="advertiserId")] pub advertiser_id: Option, - /// Directory site ID associated with this placement group. On insert, you must set either this field or the site_id field to specify the site associated with this placement group. This is a required field that is read-only after insertion. + /// Directory site ID associated with this placement group. On insert, you must set either this field or the site_id field to specify the site associated with this placement group. This is a required field that is read-only after insertion. #[serde(alias="directorySiteId")] pub directory_site_id: Option, - /// Information about the creation of this placement group. This is a read-only field. + /// Information about the creation of this placement group. This is a read-only field. #[serde(alias="createInfo")] pub create_info: Option, - /// Site ID associated with this placement group. On insert, you must set either this field or the directorySiteId field to specify the site associated with this placement group. This is a required field that is read-only after insertion. + /// Site ID associated with this placement group. On insert, you must set either this field or the directorySiteId field to specify the site associated with this placement group. This is a required field that is read-only after insertion. #[serde(alias="siteId")] pub site_id: Option, - /// Pricing schedule of this placement group. This field is required on insertion. + /// Pricing schedule of this placement group. This field is required on insertion. #[serde(alias="pricingSchedule")] pub pricing_schedule: Option, - /// Dimension value for the ID of the site. This is a read-only, auto-generated field. + /// Dimension value for the ID of the site. This is a read-only, auto-generated field. #[serde(alias="siteIdDimensionValue")] pub site_id_dimension_value: Option, - /// Type of this placement group. A package is a simple group of placements that acts as a single pricing point for a group of tags. A roadblock is a group of placements that not only acts as a single pricing point, but also assumes that all the tags in it will be served at the same time. A roadblock requires one of its assigned placements to be marked as primary for reporting. This field is required on insertion. + /// Type of this placement group. A package is a simple group of placements that acts as a single pricing point for a group of tags. A roadblock is a group of placements that not only acts as a single pricing point, but also assumes that all the tags in it will be served at the same time. A roadblock requires one of its assigned placements to be marked as primary for reporting. This field is required on insertion. #[serde(alias="placementGroupType")] pub placement_group_type: Option, - /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. + /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. #[serde(alias="advertiserIdDimensionValue")] pub advertiser_id_dimension_value: Option, - /// Whether this placement group is archived. + /// Whether this placement group is archived. pub archived: Option, - /// ID of this placement group. This is a read-only, auto-generated field. + /// ID of this placement group. This is a read-only, auto-generated field. pub id: Option, - /// ID of the placement strategy assigned to this placement group. + /// ID of the placement strategy assigned to this placement group. #[serde(alias="placementStrategyId")] pub placement_strategy_id: Option, - /// Account ID of this placement group. This is a read-only field that can be left blank. + /// Account ID of this placement group. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, - /// Settings for a programmatic placement. + /// Settings for a programmatic placement. #[serde(alias="programmaticSetting")] pub programmatic_setting: Option, - /// Dimension value for the ID of the campaign. This is a read-only, auto-generated field. + /// Dimension value for the ID of the campaign. This is a read-only, auto-generated field. #[serde(alias="campaignIdDimensionValue")] pub campaign_id_dimension_value: Option, - /// Subaccount ID of this placement group. This is a read-only field that can be left blank. + /// Subaccount ID of this placement group. This is a read-only field that can be left blank. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Name of this placement group. This is a required field and must be less than 256 characters long. + /// Name of this placement group. This is a required field and must be less than 256 characters long. pub name: Option, - /// IDs of placements which are assigned to this placement group. This is a read-only, auto-generated field. + /// IDs of placements which are assigned to this placement group. This is a read-only, auto-generated field. #[serde(alias="childPlacementIds")] pub child_placement_ids: Option>, - /// Information about the most recent modification of this placement group. This is a read-only field. + /// Information about the most recent modification of this placement group. This is a read-only field. #[serde(alias="lastModifiedInfo")] pub last_modified_info: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementGroup". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementGroup". pub kind: Option, - /// ID of the content category assigned to this placement group. + /// ID of the content category assigned to this placement group. #[serde(alias="contentCategoryId")] pub content_category_id: Option, - /// External ID for this placement. + /// External ID for this placement. #[serde(alias="externalId")] pub external_id: Option, - /// Dimension value for the ID of this placement group. This is a read-only, auto-generated field. + /// Dimension value for the ID of this placement group. This is a read-only, auto-generated field. #[serde(alias="idDimensionValue")] pub id_dimension_value: Option, } @@ -4805,9 +4814,9 @@ impl ResponseResult for PlacementGroup {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ThirdPartyTrackingUrl { - /// URL for the specified third-party URL type. + /// URL for the specified third-party URL type. pub url: String, - /// Third-party URL type for in-stream video creatives. + /// Third-party URL type for in-stream video creatives. #[serde(alias="thirdPartyUrlType")] pub third_party_url_type: String, } @@ -4827,16 +4836,16 @@ impl Part for ThirdPartyTrackingUrl {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct UserRolePermission { - /// ID of the permission group that this user role permission belongs to. + /// ID of the permission group that this user role permission belongs to. #[serde(alias="permissionGroupId")] pub permission_group_id: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolePermission". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolePermission". pub kind: String, - /// Levels of availability for a user role permission. + /// Levels of availability for a user role permission. pub availability: String, - /// ID of this user role permission. + /// ID of this user role permission. pub id: String, - /// Name of this user role permission. + /// Name of this user role permission. pub name: String, } @@ -4855,9 +4864,9 @@ impl ResponseResult for UserRolePermission {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct MetrosListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#metrosListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#metrosListResponse". pub kind: String, - /// Metro collection + /// Metro collection pub metros: Vec, } @@ -4870,30 +4879,30 @@ impl ResponseResult for MetrosListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PricingSchedule { - /// Placement start date. This date cannot be earlier than the campaign start date. The hours, minutes, and seconds of the start date should not be set, as doing so will result in an error. This field is required on insertion. + /// Placement start date. This date cannot be earlier than the campaign start date. The hours, minutes, and seconds of the start date should not be set, as doing so will result in an error. This field is required on insertion. #[serde(alias="startDate")] pub start_date: String, - /// Placement end date. This date must be later than or be the same day as the placement start date, but not later than the campaign end date. If, for example, you set 6/25/2015 as both the start and end dates, the effective placement date is just that day only, 6/25/2015. The hours, minutes, and seconds of the end date should not be set, as doing so will result in an error. This field is required on insertion. + /// Placement end date. This date must be later than or be the same day as the placement start date, but not later than the campaign end date. If, for example, you set 6/25/2015 as both the start and end dates, the effective placement date is just that day only, 6/25/2015. The hours, minutes, and seconds of the end date should not be set, as doing so will result in an error. This field is required on insertion. #[serde(alias="endDate")] pub end_date: String, - /// Whether this placement is flighted. If true, pricing periods will be computed automatically. + /// Whether this placement is flighted. If true, pricing periods will be computed automatically. pub flighted: bool, - /// Whether cap costs are ignored by ad serving. + /// Whether cap costs are ignored by ad serving. #[serde(alias="disregardOverdelivery")] pub disregard_overdelivery: bool, - /// Placement cap cost option. + /// Placement cap cost option. #[serde(alias="capCostOption")] pub cap_cost_option: String, - /// Pricing periods for this placement. + /// Pricing periods for this placement. #[serde(alias="pricingPeriods")] pub pricing_periods: Vec, - /// Placement pricing type. This field is required on insertion. + /// Placement pricing type. This field is required on insertion. #[serde(alias="pricingType")] pub pricing_type: String, - /// Testing start date of this placement. The hours, minutes, and seconds of the start date should not be set, as doing so will result in an error. + /// Testing start date of this placement. The hours, minutes, and seconds of the start date should not be set, as doing so will result in an error. #[serde(alias="testingStartDate")] pub testing_start_date: String, - /// Floodlight activity ID associated with this placement. This field should be set when placement pricing type is set to PRICING_TYPE_CPA. + /// Floodlight activity ID associated with this placement. This field should be set when placement pricing type is set to PRICING_TYPE_CPA. #[serde(alias="floodlightActivityId")] pub floodlight_activity_id: String, } @@ -4912,12 +4921,12 @@ impl Part for PricingSchedule {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountsListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountsListResponse". pub kind: String, - /// Account collection + /// Account collection pub accounts: Vec, } @@ -4935,16 +4944,16 @@ impl ResponseResult for AccountsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OperatingSystem { - /// Whether this operating system is for mobile. + /// Whether this operating system is for mobile. pub mobile: Option, - /// DART ID of this operating system. This is the ID used for targeting. + /// DART ID of this operating system. This is the ID used for targeting. #[serde(alias="dartId")] pub dart_id: Option, - /// Whether this operating system is for desktop. + /// Whether this operating system is for desktop. pub desktop: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#operatingSystem". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#operatingSystem". pub kind: Option, - /// Name of this operating system. + /// Name of this operating system. pub name: Option, } @@ -4957,11 +4966,11 @@ impl Resource for OperatingSystem {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Activities { - /// The kind of resource this is, in this case dfareporting#activities. + /// The kind of resource this is, in this case dfareporting#activities. pub kind: String, - /// List of activity filters. The dimension values need to be all either of type "dfa:activity" or "dfa:activityGroup". + /// List of activity filters. The dimension values need to be all either of type "dfa:activity" or "dfa:activityGroup". pub filters: Vec, - /// List of names of floodlight activity metrics. + /// List of names of floodlight activity metrics. #[serde(alias="metricNames")] pub metric_names: Vec, } @@ -4975,11 +4984,11 @@ impl Part for Activities {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SortedDimension { - /// The kind of resource this is, in this case dfareporting#sortedDimension. + /// The kind of resource this is, in this case dfareporting#sortedDimension. pub kind: String, - /// The name of the dimension. + /// The name of the dimension. pub name: String, - /// An optional sort order for the dimension column. + /// An optional sort order for the dimension column. #[serde(alias="sortOrder")] pub sort_order: String, } @@ -4998,12 +5007,12 @@ impl Part for SortedDimension {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PlacementStrategiesListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementStrategiesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#placementStrategiesListResponse". pub kind: String, - /// Placement strategy collection + /// Placement strategy collection #[serde(alias="placementStrategies")] pub placement_strategies: Vec, } @@ -5022,14 +5031,14 @@ impl ResponseResult for PlacementStrategiesListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReportList { - /// Continuation token used to page through reports. To retrieve the next page of results, set the next request's "pageToken" to the value of this field. The page token is only valid for a limited amount of time and should not be persisted. + /// Continuation token used to page through reports. To retrieve the next page of results, set the next request's "pageToken" to the value of this field. The page token is only valid for a limited amount of time and should not be persisted. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The reports returned in this response. + /// The reports returned in this response. pub items: Vec, - /// The kind of list this is, in this case dfareporting#reportList. + /// The kind of list this is, in this case dfareporting#reportList. pub kind: String, - /// The eTag of this response for caching purposes. + /// The eTag of this response for caching purposes. pub etag: String, } @@ -5052,14 +5061,14 @@ impl ResponseResult for ReportList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct AdvertiserGroup { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#advertiserGroup". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#advertiserGroup". pub kind: Option, - /// Account ID of this advertiser group. This is a read-only field that can be left blank. + /// Account ID of this advertiser group. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, - /// ID of this advertiser group. This is a read-only, auto-generated field. + /// ID of this advertiser group. This is a read-only, auto-generated field. pub id: Option, - /// Name of this advertiser group. This is a required field and must be less than 256 characters long and unique among advertiser groups of the same account. + /// Name of this advertiser group. This is a required field and must be less than 256 characters long and unique among advertiser groups of the same account. pub name: Option, } @@ -5074,18 +5083,18 @@ impl ResponseResult for AdvertiserGroup {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FsCommand { - /// Height of the window. + /// Height of the window. #[serde(alias="windowHeight")] pub window_height: i32, - /// Distance from the top of the browser. Applicable when positionOption is DISTANCE_FROM_TOP_LEFT_CORNER. + /// Distance from the top of the browser. Applicable when positionOption is DISTANCE_FROM_TOP_LEFT_CORNER. pub top: i32, - /// Width of the window. + /// Width of the window. #[serde(alias="windowWidth")] pub window_width: i32, - /// Position in the browser where the window will open. + /// Position in the browser where the window will open. #[serde(alias="positionOption")] pub position_option: String, - /// Distance from the left of the browser.Applicable when positionOption is DISTANCE_FROM_TOP_LEFT_CORNER. + /// Distance from the left of the browser.Applicable when positionOption is DISTANCE_FROM_TOP_LEFT_CORNER. pub left: i32, } @@ -5098,14 +5107,14 @@ impl Part for FsCommand {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeOptimizationConfiguration { - /// List of optimization activities associated with this configuration. + /// List of optimization activities associated with this configuration. #[serde(alias="optimizationActivitys")] pub optimization_activitys: Vec, - /// ID of this creative optimization config. This field is auto-generated when the campaign is inserted or updated. It can be null for existing campaigns. + /// ID of this creative optimization config. This field is auto-generated when the campaign is inserted or updated. It can be null for existing campaigns. pub id: String, - /// Name of this creative optimization config. This is a required field and must be less than 129 characters long. + /// Name of this creative optimization config. This is a required field and must be less than 129 characters long. pub name: String, - /// Optimization model for this configuration. + /// Optimization model for this configuration. #[serde(alias="optimizationModel")] pub optimization_model: String, } @@ -5124,13 +5133,13 @@ impl Part for CreativeOptimizationConfiguration {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CreativeGroupsListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Creative group collection + /// Creative group collection #[serde(alias="creativeGroups")] pub creative_groups: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeGroupsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeGroupsListResponse". pub kind: String, } @@ -5143,9 +5152,9 @@ impl ResponseResult for CreativeGroupsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct OffsetPosition { - /// Offset distance from top side of an asset or a window. + /// Offset distance from top side of an asset or a window. pub top: i32, - /// Offset distance from left side of an asset or a window. + /// Offset distance from left side of an asset or a window. pub left: i32, } @@ -5158,10 +5167,10 @@ impl Part for OffsetPosition {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TargetWindow { - /// User-entered value. + /// User-entered value. #[serde(alias="customHtml")] pub custom_html: String, - /// Type of browser window for which the backup image of the flash creative can be displayed. + /// Type of browser window for which the backup image of the flash creative can be displayed. #[serde(alias="targetWindowOption")] pub target_window_option: String, } @@ -5175,21 +5184,21 @@ impl Part for TargetWindow {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ProgrammaticSetting { - /// Trafficker emails assigned to the placement. + /// Trafficker emails assigned to the placement. #[serde(alias="traffickerEmails")] pub trafficker_emails: Vec, - /// Whether programmatic is enabled. + /// Whether programmatic is enabled. pub programmatic: bool, - /// Media cost for the programmatic placement. + /// Media cost for the programmatic placement. #[serde(alias="mediaCostNanos")] pub media_cost_nanos: String, - /// Adx deal IDs assigned to the placement. + /// Adx deal IDs assigned to the placement. #[serde(alias="adxDealIds")] pub adx_deal_ids: Vec, - /// Insertion order ID. + /// Insertion order ID. #[serde(alias="insertionOrderId")] pub insertion_order_id: String, - /// Whether insertion order ID has been placed in DFP. This is a read-only field. + /// Whether insertion order ID has been placed in DFP. This is a read-only field. #[serde(alias="insertionOrderIdStatus")] pub insertion_order_id_status: bool, } @@ -5203,18 +5212,18 @@ impl Part for ProgrammaticSetting {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct SiteContact { - /// Last name of this site contact. + /// Last name of this site contact. #[serde(alias="lastName")] pub last_name: String, - /// Site contact type. + /// Site contact type. #[serde(alias="contactType")] pub contact_type: String, - /// Email address of this site contact. This is a required field. + /// Email address of this site contact. This is a required field. pub email: String, - /// First name of this site contact. + /// First name of this site contact. #[serde(alias="firstName")] pub first_name: String, - /// ID of this site contact. This is a read-only, auto-generated field. + /// ID of this site contact. This is a read-only, auto-generated field. pub id: String, } @@ -5227,16 +5236,16 @@ impl Part for SiteContact {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CreativeRotation { - /// Creative assignments in this creative rotation. + /// Creative assignments in this creative rotation. #[serde(alias="creativeAssignments")] pub creative_assignments: Vec, - /// Strategy for calculating weights. Used with CREATIVE_ROTATION_TYPE_RANDOM. + /// Strategy for calculating weights. Used with CREATIVE_ROTATION_TYPE_RANDOM. #[serde(alias="weightCalculationStrategy")] pub weight_calculation_strategy: String, - /// Creative optimization configuration that is used by this ad. It should refer to one of the existing optimization configurations in the ad's campaign. If it is unset or set to 0, then the campaign's default optimization configuration will be used for this ad. + /// Creative optimization configuration that is used by this ad. It should refer to one of the existing optimization configurations in the ad's campaign. If it is unset or set to 0, then the campaign's default optimization configuration will be used for this ad. #[serde(alias="creativeOptimizationConfigurationId")] pub creative_optimization_configuration_id: String, - /// Type of creative rotation. Can be used to specify whether to use sequential or random rotation. + /// Type of creative rotation. Can be used to specify whether to use sequential or random rotation. #[serde(alias="type")] pub type_: String, } @@ -5255,23 +5264,23 @@ impl Part for CreativeRotation {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Metro { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#metro". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#metro". pub kind: Option, - /// DART ID of the country to which this metro region belongs. + /// DART ID of the country to which this metro region belongs. #[serde(alias="countryDartId")] pub country_dart_id: Option, - /// Name of this metro region. + /// Name of this metro region. pub name: Option, - /// Country code of the country to which this metro region belongs. + /// Country code of the country to which this metro region belongs. #[serde(alias="countryCode")] pub country_code: Option, - /// Metro code of this metro region. This is equivalent to dma_id. + /// Metro code of this metro region. This is equivalent to dma_id. #[serde(alias="metroCode")] pub metro_code: Option, - /// DART ID of this metro region. + /// DART ID of this metro region. #[serde(alias="dartId")] pub dart_id: Option, - /// DMA ID of this metro region. This is the ID used for targeting and generating reports, and is equivalent to metro_code. + /// DMA ID of this metro region. This is the ID used for targeting and generating reports, and is equivalent to metro_code. #[serde(alias="dmaId")] pub dma_id: Option, } @@ -5290,18 +5299,18 @@ impl Resource for Metro {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Country { - /// DART ID of this country. This is the ID used for targeting and generating reports. + /// DART ID of this country. This is the ID used for targeting and generating reports. #[serde(alias="dartId")] pub dart_id: String, - /// Whether ad serving supports secure servers in this country. + /// Whether ad serving supports secure servers in this country. #[serde(alias="sslEnabled")] pub ssl_enabled: bool, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#country". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#country". pub kind: String, - /// Country code. + /// Country code. #[serde(alias="countryCode")] pub country_code: String, - /// Name of this country. + /// Name of this country. pub name: String, } @@ -5319,9 +5328,9 @@ impl ResponseResult for Country {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct PostalCodesListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#postalCodesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#postalCodesListResponse". pub kind: String, - /// Postal code collection + /// Postal code collection #[serde(alias="postalCodes")] pub postal_codes: Vec, } @@ -5335,16 +5344,16 @@ impl ResponseResult for PostalCodesListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct TagSetting { - /// Whether static landing page URLs should be included in the tags. This setting applies only to placements. + /// Whether static landing page URLs should be included in the tags. This setting applies only to placements. #[serde(alias="includeClickThroughUrls")] pub include_click_through_urls: bool, - /// Whether click-tracking string should be included in the tags. + /// Whether click-tracking string should be included in the tags. #[serde(alias="includeClickTracking")] pub include_click_tracking: bool, - /// Additional key-values to be included in tags. Each key-value pair must be of the form key=value, and pairs must be separated by a semicolon (;). Keys and values must not contain commas. For example, id=2;color=red is a valid value for this field. + /// Additional key-values to be included in tags. Each key-value pair must be of the form key=value, and pairs must be separated by a semicolon (;). Keys and values must not contain commas. For example, id=2;color=red is a valid value for this field. #[serde(alias="additionalKeyValues")] pub additional_key_values: String, - /// Option specifying how keywords are embedded in ad tags. This setting can be used to specify whether keyword placeholders are inserted in placement tags for this site. Publishers can then add keywords to those placeholders. + /// Option specifying how keywords are embedded in ad tags. This setting can be used to specify whether keyword placeholders are inserted in placement tags for this site. Publishers can then add keywords to those placeholders. #[serde(alias="keywordOption")] pub keyword_option: String, } @@ -5368,50 +5377,50 @@ impl Part for TagSetting {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct EventTag { - /// Status of this event tag. Must be ENABLED for this event tag to fire. This is a required field. + /// Status of this event tag. Must be ENABLED for this event tag to fire. This is a required field. pub status: Option, - /// Filter list of site IDs associated with this event tag. The siteFilterType determines whether this is a whitelist or blacklist filter. + /// Filter list of site IDs associated with this event tag. The siteFilterType determines whether this is a whitelist or blacklist filter. #[serde(alias="siteIds")] pub site_ids: Option>, - /// Campaign ID of this event tag. This field or the advertiserId field is required on insertion. + /// Campaign ID of this event tag. This field or the advertiserId field is required on insertion. #[serde(alias="campaignId")] pub campaign_id: Option, - /// Dimension value for the ID of the campaign. This is a read-only, auto-generated field. + /// Dimension value for the ID of the campaign. This is a read-only, auto-generated field. #[serde(alias="campaignIdDimensionValue")] pub campaign_id_dimension_value: Option, - /// Whether this event tag should be automatically enabled for all of the advertiser's campaigns and ads. + /// Whether this event tag should be automatically enabled for all of the advertiser's campaigns and ads. #[serde(alias="enabledByDefault")] pub enabled_by_default: Option, - /// Advertiser ID of this event tag. This field or the campaignId field is required on insertion. + /// Advertiser ID of this event tag. This field or the campaignId field is required on insertion. #[serde(alias="advertiserId")] pub advertiser_id: Option, - /// Site filter type for this event tag. If no type is specified then the event tag will be applied to all sites. + /// Site filter type for this event tag. If no type is specified then the event tag will be applied to all sites. #[serde(alias="siteFilterType")] pub site_filter_type: Option, - /// Event tag type. Can be used to specify whether to use a third-party pixel, a third-party JavaScript URL, or a third-party click-through URL for either impression or click tracking. This is a required field. + /// Event tag type. Can be used to specify whether to use a third-party pixel, a third-party JavaScript URL, or a third-party click-through URL for either impression or click tracking. This is a required field. #[serde(alias="type")] pub type_: Option, - /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. + /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. #[serde(alias="advertiserIdDimensionValue")] pub advertiser_id_dimension_value: Option, - /// ID of this event tag. This is a read-only, auto-generated field. + /// ID of this event tag. This is a read-only, auto-generated field. pub id: Option, - /// Account ID of this event tag. This is a read-only field that can be left blank. + /// Account ID of this event tag. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#eventTag". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#eventTag". pub kind: Option, - /// Subaccount ID of this event tag. This is a read-only field that can be left blank. + /// Subaccount ID of this event tag. This is a read-only field that can be left blank. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Name of this event tag. This is a required field and must be less than 256 characters long. + /// Name of this event tag. This is a required field and must be less than 256 characters long. pub name: Option, - /// Payload URL for this event tag. The URL on a click-through event tag should have a landing page URL appended to the end of it. This field is required on insertion. + /// Payload URL for this event tag. The URL on a click-through event tag should have a landing page URL appended to the end of it. This field is required on insertion. pub url: Option, - /// Whether this tag is SSL-compliant or not. + /// Whether this tag is SSL-compliant or not. #[serde(alias="sslCompliant")] pub ssl_compliant: Option, - /// Number of times the landing page URL should be URL-escaped before being appended to the click-through event tag URL. Only applies to click-through event tags as specified by the event tag type. + /// Number of times the landing page URL should be URL-escaped before being appended to the click-through event tag URL. Only applies to click-through event tags as specified by the event tag type. #[serde(alias="urlEscapeLevels")] pub url_escape_levels: Option, } @@ -5432,12 +5441,12 @@ impl ResponseResult for EventTag {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct CreativeFieldValuesListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeFieldValuesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#creativeFieldValuesListResponse". pub kind: String, - /// Creative field value collection + /// Creative field value collection #[serde(alias="creativeFieldValues")] pub creative_field_values: Vec, } @@ -5457,22 +5466,22 @@ impl ResponseResult for CreativeFieldValuesListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DirectorySiteContact { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySiteContact". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#directorySiteContact". pub kind: String, - /// Directory site contact role. + /// Directory site contact role. pub role: String, - /// First name of this directory site contact. + /// First name of this directory site contact. #[serde(alias="firstName")] pub first_name: String, - /// Last name of this directory site contact. + /// Last name of this directory site contact. #[serde(alias="lastName")] pub last_name: String, - /// Directory site contact type. + /// Directory site contact type. #[serde(alias="type")] pub type_: String, - /// Email address of this directory site contact. + /// Email address of this directory site contact. pub email: String, - /// ID of this directory site contact. This is a read-only, auto-generated field. + /// ID of this directory site contact. This is a read-only, auto-generated field. pub id: String, } @@ -5491,19 +5500,19 @@ impl ResponseResult for DirectorySiteContact {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DimensionValue { - /// The name of the dimension. + /// The name of the dimension. #[serde(alias="dimensionName")] pub dimension_name: Option, - /// The kind of resource this is, in this case dfareporting#dimensionValue. + /// The kind of resource this is, in this case dfareporting#dimensionValue. pub kind: Option, - /// The eTag of this response for caching purposes. + /// The eTag of this response for caching purposes. pub etag: Option, - /// Determines how the 'value' field is matched when filtering. If not specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable length character sequences, and it can be escaped with a backslash. Note, only paid search dimensions ('dfa:paidSearch*') allow a matchType other than EXACT. + /// Determines how the 'value' field is matched when filtering. If not specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed as a placeholder for variable length character sequences, and it can be escaped with a backslash. Note, only paid search dimensions ('dfa:paidSearch*') allow a matchType other than EXACT. #[serde(alias="matchType")] pub match_type: Option, - /// The ID associated with the value if available. + /// The ID associated with the value if available. pub id: Option, - /// The value of the dimension. + /// The value of the dimension. pub value: Option, } @@ -5521,12 +5530,12 @@ impl Resource for DimensionValue {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ContentCategoriesListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#contentCategoriesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#contentCategoriesListResponse". pub kind: String, - /// Content category collection + /// Content category collection #[serde(alias="contentCategories")] pub content_categories: Vec, } @@ -5545,10 +5554,10 @@ impl ResponseResult for ContentCategoriesListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct FloodlightConfigurationsListResponse { - /// Floodlight configuration collection + /// Floodlight configuration collection #[serde(alias="floodlightConfigurations")] pub floodlight_configurations: Vec, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightConfigurationsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightConfigurationsListResponse". pub kind: String, } @@ -5561,29 +5570,29 @@ impl ResponseResult for FloodlightConfigurationsListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PopupWindowProperties { - /// Whether to display the browser status bar. + /// Whether to display the browser status bar. #[serde(alias="showStatusBar")] pub show_status_bar: bool, - /// Whether to display the browser scroll bar. + /// Whether to display the browser scroll bar. #[serde(alias="showScrollBar")] pub show_scroll_bar: bool, - /// Whether to display the browser address bar. + /// Whether to display the browser address bar. #[serde(alias="showAddressBar")] pub show_address_bar: bool, - /// Whether to display the browser menu bar. + /// Whether to display the browser menu bar. #[serde(alias="showMenuBar")] pub show_menu_bar: bool, - /// Title of popup window. + /// Title of popup window. pub title: String, - /// Upper-left corner coordinates of the popup window. Applicable if positionType is COORDINATES. + /// Upper-left corner coordinates of the popup window. Applicable if positionType is COORDINATES. pub offset: OffsetPosition, - /// Popup window position either centered or at specific coordinate. + /// Popup window position either centered or at specific coordinate. #[serde(alias="positionType")] pub position_type: String, - /// Whether to display the browser tool bar. + /// Whether to display the browser tool bar. #[serde(alias="showToolBar")] pub show_tool_bar: bool, - /// Popup dimension for a creative. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA and all VPAID + /// Popup dimension for a creative. This is a read-only field. Applicable to the following creative types: all RICH_MEDIA and all VPAID pub dimension: Size, } @@ -5602,14 +5611,14 @@ impl Part for PopupWindowProperties {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountPermission { - /// Permission group of this account permission. + /// Permission group of this account permission. #[serde(alias="permissionGroupId")] pub permission_group_id: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountPermission". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountPermission". pub kind: String, - /// Name of this account permission. + /// Name of this account permission. pub name: String, - /// Administrative level required to enable this account permission. + /// Administrative level required to enable this account permission. pub level: String, /// Account profiles associated with this account permission. /// @@ -5618,7 +5627,7 @@ pub struct AccountPermission { /// - "ACCOUNT_PROFILE_STANDARD" #[serde(alias="accountProfiles")] pub account_profiles: Vec, - /// ID of this account permission. + /// ID of this account permission. pub id: String, } @@ -5641,106 +5650,106 @@ impl ResponseResult for AccountPermission {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Ad { - /// Click-through URL suffix properties for this ad. Applies to the URL in the ad or (if overriding ad properties) the URL in the creative. + /// Click-through URL suffix properties for this ad. Applies to the URL in the ad or (if overriding ad properties) the URL in the creative. #[serde(alias="clickThroughUrlSuffixProperties")] pub click_through_url_suffix_properties: Option, - /// Campaign ID of this ad. This is a required field on insertion. + /// Campaign ID of this ad. This is a required field on insertion. #[serde(alias="campaignId")] pub campaign_id: Option, - /// Advertiser ID of this ad. This is a required field on insertion. + /// Advertiser ID of this ad. This is a required field on insertion. #[serde(alias="advertiserId")] pub advertiser_id: Option, - /// Geographical targeting information for this ad.Applicable when type is AD_SERVING_STANDARD_AD. + /// Geographical targeting information for this ad.Applicable when type is AD_SERVING_STANDARD_AD. #[serde(alias="geoTargeting")] pub geo_targeting: Option, - /// Comments for this ad. + /// Comments for this ad. pub comments: Option, - /// Delivery schedule information for this ad. Applicable when type is AD_SERVING_STANDARD_AD or AD_SERVING_TRACKING. This field along with subfields priority and impressionRatio are required on insertion when type is AD_SERVING_STANDARD_AD. + /// Delivery schedule information for this ad. Applicable when type is AD_SERVING_STANDARD_AD or AD_SERVING_TRACKING. This field along with subfields priority and impressionRatio are required on insertion when type is AD_SERVING_STANDARD_AD. #[serde(alias="deliverySchedule")] pub delivery_schedule: Option, - /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. + /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. #[serde(alias="advertiserIdDimensionValue")] pub advertiser_id_dimension_value: Option, - /// Event tag overrides for this ad. + /// Event tag overrides for this ad. #[serde(alias="eventTagOverrides")] pub event_tag_overrides: Option>, - /// ID of this ad. This is a read-only, auto-generated field. + /// ID of this ad. This is a read-only, auto-generated field. pub id: Option, - /// Applicable when type is AD_SERVING_STANDARD_AD. Remarketing list targeting expression for this ad. + /// Applicable when type is AD_SERVING_STANDARD_AD. Remarketing list targeting expression for this ad. pub remarketing_list_expression: Option, - /// Size of this ad. Applicable when type is AD_SERVING_DEFAULT_AD. + /// Size of this ad. Applicable when type is AD_SERVING_DEFAULT_AD. pub size: Option, - /// Whether this ad is archived. + /// Whether this ad is archived. pub archived: Option, - /// Technology platform targeting information for this ad. Applicable when type is AD_SERVING_STANDARD_AD. + /// Technology platform targeting information for this ad. Applicable when type is AD_SERVING_STANDARD_AD. #[serde(alias="technologyTargeting")] pub technology_targeting: Option, - /// Creative rotation for this ad. Applicable when type is AD_SERVING_DEFAULT_AD, AD_SERVING_STANDARD_AD, or AD_SERVING_TRACKING. When type is AD_SERVING_DEFAULT_AD, this field should have exactly one creativeAssignment. + /// Creative rotation for this ad. Applicable when type is AD_SERVING_DEFAULT_AD, AD_SERVING_STANDARD_AD, or AD_SERVING_TRACKING. When type is AD_SERVING_DEFAULT_AD, this field should have exactly one creativeAssignment. #[serde(alias="creativeRotation")] pub creative_rotation: Option, - /// Click-through URL for this ad. This is a required field on insertion. Applicable when type is AD_SERVING_CLICK_TRACKER. + /// Click-through URL for this ad. This is a required field on insertion. Applicable when type is AD_SERVING_CLICK_TRACKER. #[serde(alias="clickThroughUrl")] pub click_through_url: Option, - /// Creative group assignments for this ad. Applicable when type is AD_SERVING_CLICK_TRACKER. Only one assignment per creative group number is allowed for a maximum of two assignments. + /// Creative group assignments for this ad. Applicable when type is AD_SERVING_CLICK_TRACKER. Only one assignment per creative group number is allowed for a maximum of two assignments. #[serde(alias="creativeGroupAssignments")] pub creative_group_assignments: Option>, - /// Dimension value for the ID of this ad. This is a read-only, auto-generated field. + /// Dimension value for the ID of this ad. This is a read-only, auto-generated field. #[serde(alias="idDimensionValue")] pub id_dimension_value: Option, - /// Account ID of this ad. This is a read-only field that can be left blank. + /// Account ID of this ad. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, - /// Type of ad. This is a required field on insertion. Note that default ads (AD_SERVING_DEFAULT_AD) cannot be created directly (see Creative resource). + /// Type of ad. This is a required field on insertion. Note that default ads (AD_SERVING_DEFAULT_AD) cannot be created directly (see Creative resource). #[serde(alias="type")] pub type_: Option, - /// Whether this ad requires ssl. This is a read-only field that is auto-generated when the ad is inserted or updated. + /// Whether this ad requires ssl. This is a read-only field that is auto-generated when the ad is inserted or updated. #[serde(alias="sslRequired")] pub ssl_required: Option, - /// Audience segment ID that is being targeted for this ad. Applicable when type is AD_SERVING_STANDARD_AD. + /// Audience segment ID that is being targeted for this ad. Applicable when type is AD_SERVING_STANDARD_AD. #[serde(alias="audienceSegmentId")] pub audience_segment_id: Option, - /// Key-value targeting information for this ad. Applicable when type is AD_SERVING_STANDARD_AD. + /// Key-value targeting information for this ad. Applicable when type is AD_SERVING_STANDARD_AD. #[serde(alias="keyValueTargetingExpression")] pub key_value_targeting_expression: Option, - /// Dimension value for the ID of the campaign. This is a read-only, auto-generated field. + /// Dimension value for the ID of the campaign. This is a read-only, auto-generated field. #[serde(alias="campaignIdDimensionValue")] pub campaign_id_dimension_value: Option, - /// Default click-through event tag properties for this ad. + /// Default click-through event tag properties for this ad. #[serde(alias="defaultClickThroughEventTagProperties")] pub default_click_through_event_tag_properties: Option, - /// Information about the creation of this ad.This is a read-only field. + /// Information about the creation of this ad.This is a read-only field. #[serde(alias="createInfo")] pub create_info: Option, - /// Date and time that this ad should start serving. If creating an ad, this field must be a time in the future. This is a required field on insertion. + /// Date and time that this ad should start serving. If creating an ad, this field must be a time in the future. This is a required field on insertion. #[serde(alias="startTime")] pub start_time: Option, - /// Whether this ad is active. + /// Whether this ad is active. pub active: Option, - /// Compatibility of this ad. Applicable when type is AD_SERVING_DEFAULT_AD. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an in-stream video ads developed with the VAST standard. + /// Compatibility of this ad. Applicable when type is AD_SERVING_DEFAULT_AD. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an in-stream video ads developed with the VAST standard. pub compatibility: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#ad". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#ad". pub kind: Option, - /// Subaccount ID of this ad. This is a read-only field that can be left blank. + /// Subaccount ID of this ad. This is a read-only field that can be left blank. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Name of this ad. This is a required field and must be less than 256 characters long. + /// Name of this ad. This is a required field and must be less than 256 characters long. pub name: Option, - /// Time and day targeting information for this ad. Applicable when type is AD_SERVING_STANDARD_AD. + /// Time and day targeting information for this ad. Applicable when type is AD_SERVING_STANDARD_AD. #[serde(alias="dayPartTargeting")] pub day_part_targeting: Option, - /// Information about the most recent modification of this ad. This is a read-only field. + /// Information about the most recent modification of this ad. This is a read-only field. #[serde(alias="lastModifiedInfo")] pub last_modified_info: Option, - /// Whether this ad is ssl compliant. This is a read-only field that is auto-generated when the ad is inserted or updated. + /// Whether this ad is ssl compliant. This is a read-only field that is auto-generated when the ad is inserted or updated. #[serde(alias="sslCompliant")] pub ssl_compliant: Option, - /// Date and time that this ad should stop serving. Must be later than the start time. This is a required field on insertion. + /// Date and time that this ad should stop serving. Must be later than the start time. This is a required field on insertion. #[serde(alias="endTime")] pub end_time: Option, - /// Whether this ad is a dynamic click tracker. Applicable when type is AD_SERVING_CLICK_TRACKER. This is a required field on insert, and is read-only after insert. + /// Whether this ad is a dynamic click tracker. Applicable when type is AD_SERVING_CLICK_TRACKER. This is a required field on insert, and is read-only after insert. #[serde(alias="dynamicClickTracker")] pub dynamic_click_tracker: Option, - /// Placement assignments for this ad. + /// Placement assignments for this ad. #[serde(alias="placementAssignments")] pub placement_assignments: Option>, } @@ -5756,18 +5765,18 @@ impl ResponseResult for Ad {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PricingSchedulePricingPeriod { - /// Units of this pricing period. + /// Units of this pricing period. pub units: String, - /// Pricing period start date. This date cannot be earlier than the placement start date. The hours, minutes, and seconds of the start date should not be set, as doing so will result in an error. + /// Pricing period start date. This date cannot be earlier than the placement start date. The hours, minutes, and seconds of the start date should not be set, as doing so will result in an error. #[serde(alias="startDate")] pub start_date: String, - /// Rate or cost of this pricing period. + /// Rate or cost of this pricing period. #[serde(alias="rateOrCostNanos")] pub rate_or_cost_nanos: String, - /// Pricing period end date. This date must be later than or be the same day as the pricing period start date, but not later than the placement end date. The period end date can be the same date as the period start date. If, for example, you set 6/25/2015 as both the start and end dates, the effective pricing period date is just that day only, 6/25/2015. The hours, minutes, and seconds of the end date should not be set, as doing so will result in an error. + /// Pricing period end date. This date must be later than or be the same day as the pricing period start date, but not later than the placement end date. The period end date can be the same date as the period start date. If, for example, you set 6/25/2015 as both the start and end dates, the effective pricing period date is just that day only, 6/25/2015. The hours, minutes, and seconds of the end date should not be set, as doing so will result in an error. #[serde(alias="endDate")] pub end_date: String, - /// Comments for this pricing period. + /// Comments for this pricing period. #[serde(alias="pricingComment")] pub pricing_comment: String, } @@ -5781,15 +5790,15 @@ impl Part for PricingSchedulePricingPeriod {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PlacementAssignment { - /// Whether this placement assignment is active. When true, the placement will be included in the ad's rotation. + /// Whether this placement assignment is active. When true, the placement will be included in the ad's rotation. pub active: bool, - /// Dimension value for the ID of the placement. This is a read-only, auto-generated field. + /// Dimension value for the ID of the placement. This is a read-only, auto-generated field. #[serde(alias="placementIdDimensionValue")] pub placement_id_dimension_value: DimensionValue, - /// ID of the placement to be assigned. This is a required field. + /// ID of the placement to be assigned. This is a required field. #[serde(alias="placementId")] pub placement_id: String, - /// Whether the placement to be assigned requires SSL. This is a read-only field that is auto-generated when the ad is inserted or updated. + /// Whether the placement to be assigned requires SSL. This is a read-only field that is auto-generated when the ad is inserted or updated. #[serde(alias="sslRequired")] pub ssl_required: bool, } @@ -5803,19 +5812,19 @@ impl Part for PlacementAssignment {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReachReportCompatibleFields { - /// Metrics which are compatible to be selected in the "metricNames" section of the report. + /// Metrics which are compatible to be selected in the "metricNames" section of the report. pub metrics: Vec, - /// The kind of resource this is, in this case dfareporting#reachReportCompatibleFields. + /// The kind of resource this is, in this case dfareporting#reachReportCompatibleFields. pub kind: String, - /// Dimensions which are compatible to be selected in the "dimensions" section of the report. + /// Dimensions which are compatible to be selected in the "dimensions" section of the report. pub dimensions: Vec, - /// Metrics which are compatible to be selected in the "reachByFrequencyMetricNames" section of the report. + /// Metrics which are compatible to be selected in the "reachByFrequencyMetricNames" section of the report. #[serde(alias="reachByFrequencyMetrics")] pub reach_by_frequency_metrics: Vec, - /// Dimensions which are compatible to be selected in the "dimensionFilters" section of the report. + /// Dimensions which are compatible to be selected in the "dimensionFilters" section of the report. #[serde(alias="dimensionFilters")] pub dimension_filters: Vec, - /// Metrics which are compatible to be selected as activity metrics to pivot on in the "activities" section of the report. + /// Metrics which are compatible to be selected as activity metrics to pivot on in the "activities" section of the report. #[serde(alias="pivotedActivityMetrics")] pub pivoted_activity_metrics: Vec, } @@ -5838,36 +5847,36 @@ impl Part for ReachReportCompatibleFields {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Site { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#site". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#site". pub kind: Option, - /// Subaccount ID of this site. This is a read-only field that can be left blank. + /// Subaccount ID of this site. This is a read-only field that can be left blank. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Name of this site.This is a required field. Must be less than 128 characters long. If this site is under a subaccount, the name must be unique among sites of the same subaccount. Otherwise, this site is a top-level site, and the name must be unique among top-level sites of the same account. + /// Name of this site.This is a required field. Must be less than 128 characters long. If this site is under a subaccount, the name must be unique among sites of the same subaccount. Otherwise, this site is a top-level site, and the name must be unique among top-level sites of the same account. pub name: Option, - /// Dimension value for the ID of the directory site. This is a read-only, auto-generated field. + /// Dimension value for the ID of the directory site. This is a read-only, auto-generated field. #[serde(alias="directorySiteIdDimensionValue")] pub directory_site_id_dimension_value: Option, - /// Site-wide settings. + /// Site-wide settings. #[serde(alias="siteSettings")] pub site_settings: Option, - /// ID of this site. This is a read-only, auto-generated field. + /// ID of this site. This is a read-only, auto-generated field. pub id: Option, - /// Directory site associated with this site. This is a required field that is read-only after insertion. + /// Directory site associated with this site. This is a required field that is read-only after insertion. #[serde(alias="directorySiteId")] pub directory_site_id: Option, - /// Site contacts. + /// Site contacts. #[serde(alias="siteContacts")] pub site_contacts: Option>, - /// Key name of this site. This is a read-only, auto-generated field. + /// Key name of this site. This is a read-only, auto-generated field. #[serde(alias="keyName")] pub key_name: Option, - /// Dimension value for the ID of this site. This is a read-only, auto-generated field. + /// Dimension value for the ID of this site. This is a read-only, auto-generated field. #[serde(alias="idDimensionValue")] pub id_dimension_value: Option, - /// Whether this site is approved. + /// Whether this site is approved. pub approved: Option, - /// Account ID of this site. This is a read-only field that can be left blank. + /// Account ID of this site. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, } @@ -5883,17 +5892,17 @@ impl ResponseResult for Site {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DfpSettings { - /// DFP network name for this directory site. + /// DFP network name for this directory site. pub dfp_network_name: String, - /// DFP network code for this directory site. + /// DFP network code for this directory site. pub dfp_network_code: String, - /// Whether this directory site is available only via Publisher Portal. + /// Whether this directory site is available only via Publisher Portal. #[serde(alias="publisherPortalOnly")] pub publisher_portal_only: bool, - /// Whether this directory site accepts programmatic placements. + /// Whether this directory site accepts programmatic placements. #[serde(alias="programmaticPlacementAccepted")] pub programmatic_placement_accepted: bool, - /// Whether this directory site accepts publisher-paid tags. + /// Whether this directory site accepts publisher-paid tags. #[serde(alias="pubPaidPlacementAccepted")] pub pub_paid_placement_accepted: bool, } @@ -5912,9 +5921,9 @@ impl Part for DfpSettings {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ConnectionTypesListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#connectionTypesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#connectionTypesListResponse". pub kind: String, - /// Connection Type Collection. + /// Connection Type Collection. #[serde(alias="connectionTypes")] pub connection_types: Vec, } @@ -5936,38 +5945,38 @@ impl ResponseResult for ConnectionTypesListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FloodlightConfiguration { - /// List of user defined variables enabled for this configuration. + /// List of user defined variables enabled for this configuration. #[serde(alias="userDefinedVariableConfigurations")] pub user_defined_variable_configurations: Option>, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightConfiguration". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#floodlightConfiguration". pub kind: Option, - /// Advertiser ID of the parent advertiser of this floodlight configuration. + /// Advertiser ID of the parent advertiser of this floodlight configuration. #[serde(alias="advertiserId")] pub advertiser_id: Option, - /// Configuration settings for dynamic and image floodlight tags. + /// Configuration settings for dynamic and image floodlight tags. #[serde(alias="tagSettings")] pub tag_settings: Option, - /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. + /// Dimension value for the ID of the advertiser. This is a read-only, auto-generated field. #[serde(alias="advertiserIdDimensionValue")] pub advertiser_id_dimension_value: Option, - /// ID of this floodlight configuration. This is a read-only, auto-generated field. + /// ID of this floodlight configuration. This is a read-only, auto-generated field. pub id: Option, - /// Account ID of this floodlight configuration. This is a read-only field that can be left blank. + /// Account ID of this floodlight configuration. This is a read-only field that can be left blank. #[serde(alias="accountId")] pub account_id: Option, - /// Types of attribution options for natural search conversions. + /// Types of attribution options for natural search conversions. #[serde(alias="naturalSearchConversionAttributionOption")] pub natural_search_conversion_attribution_option: Option, - /// Settings for DCM Omniture integration. + /// Settings for DCM Omniture integration. #[serde(alias="omnitureSettings")] pub omniture_settings: Option, - /// Whether the exposure-to-conversion report is enabled. This report shows detailed pathway information on up to 10 of the most recent ad exposures seen by a user before converting. + /// Whether the exposure-to-conversion report is enabled. This report shows detailed pathway information on up to 10 of the most recent ad exposures seen by a user before converting. #[serde(alias="exposureToConversionEnabled")] pub exposure_to_conversion_enabled: Option, - /// Lookback window settings for this floodlight configuration. + /// Lookback window settings for this floodlight configuration. #[serde(alias="lookbackConfiguration")] pub lookback_configuration: Option, - /// Day that will be counted as the first day of the week in reports. This is a required field. + /// Day that will be counted as the first day of the week in reports. This is a required field. #[serde(alias="firstDayOfWeek")] pub first_day_of_week: Option, /// List of standard variables enabled for this configuration. @@ -5977,16 +5986,16 @@ pub struct FloodlightConfiguration { /// - "NUM" #[serde(alias="standardVariableTypes")] pub standard_variable_types: Option>, - /// Subaccount ID of this floodlight configuration. This is a read-only field that can be left blank. + /// Subaccount ID of this floodlight configuration. This is a read-only field that can be left blank. #[serde(alias="subaccountId")] pub subaccount_id: Option, - /// Whether advertiser data is shared with Google Analytics. + /// Whether advertiser data is shared with Google Analytics. #[serde(alias="analyticsDataSharingEnabled")] pub analytics_data_sharing_enabled: Option, - /// Dimension value for the ID of this floodlight configuration. This is a read-only, auto-generated field. + /// Dimension value for the ID of this floodlight configuration. This is a read-only, auto-generated field. #[serde(alias="idDimensionValue")] pub id_dimension_value: Option, - /// Whether floodlight activities owned by this configuration are required to be SSL-compliant. + /// Whether floodlight activities owned by this configuration are required to be SSL-compliant. #[serde(alias="sslRequired")] pub ssl_required: Option, } @@ -6002,15 +6011,15 @@ impl ResponseResult for FloodlightConfiguration {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DateRange { - /// The start date of the date range, inclusive. A string of the format: "yyyy-MM-dd". + /// The start date of the date range, inclusive. A string of the format: "yyyy-MM-dd". #[serde(alias="startDate")] pub start_date: String, - /// The kind of resource this is, in this case dfareporting#dateRange. + /// The kind of resource this is, in this case dfareporting#dateRange. pub kind: String, - /// The end date of the date range, inclusive. A string of the format: "yyyy-MM-dd". + /// The end date of the date range, inclusive. A string of the format: "yyyy-MM-dd". #[serde(alias="endDate")] pub end_date: String, - /// The date range relative to the date of when the report is run. + /// The date range relative to the date of when the report is run. #[serde(alias="relativeDateRange")] pub relative_date_range: String, } @@ -6029,9 +6038,9 @@ impl Part for DateRange {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct AccountPermissionGroupsListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountPermissionGroupsListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#accountPermissionGroupsListResponse". pub kind: String, - /// Account permission group collection + /// Account permission group collection #[serde(alias="accountPermissionGroups")] pub account_permission_groups: Vec, } @@ -6050,9 +6059,9 @@ impl ResponseResult for AccountPermissionGroupsListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SizesListResponse { - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#sizesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#sizesListResponse". pub kind: String, - /// Size collection + /// Size collection pub sizes: Vec, } @@ -6070,12 +6079,12 @@ impl ResponseResult for SizesListResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UserRolesListResponse { - /// Pagination token to be used for the next list operation. + /// Pagination token to be used for the next list operation. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolesListResponse". + /// Identifies what kind of resource this is. Value: the fixed string "dfareporting#userRolesListResponse". pub kind: String, - /// User role collection + /// User role collection #[serde(alias="userRoles")] pub user_roles: Vec, } @@ -6122,13 +6131,18 @@ pub struct UserRolePermissionGroupMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for UserRolePermissionGroupMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for UserRolePermissionGroupMethods<'a, C, NC, A> {} impl<'a, C, NC, A> UserRolePermissionGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one user role permission group by ID. + /// Gets one user role permission group by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - User role permission group ID. pub fn get(&self, profile_id: &str, id: &str) -> UserRolePermissionGroupGetCall<'a, C, NC, A> { UserRolePermissionGroupGetCall { hub: self.hub, @@ -6142,7 +6156,11 @@ impl<'a, C, NC, A> UserRolePermissionGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets a list of all supported user role permission groups. + /// Gets a list of all supported user role permission groups. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> UserRolePermissionGroupListCall<'a, C, NC, A> { UserRolePermissionGroupListCall { hub: self.hub, @@ -6190,13 +6208,17 @@ pub struct PlatformTypeMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PlatformTypeMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PlatformTypeMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PlatformTypeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of platform types. + /// Retrieves a list of platform types. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> PlatformTypeListCall<'a, C, NC, A> { PlatformTypeListCall { hub: self.hub, @@ -6244,13 +6266,18 @@ pub struct CreativeFieldMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CreativeFieldMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CreativeFieldMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CreativeFieldMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing creative field. + /// Updates an existing creative field. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &CreativeField, profile_id: &str) -> CreativeFieldUpdateCall<'a, C, NC, A> { CreativeFieldUpdateCall { hub: self.hub, @@ -6264,7 +6291,11 @@ impl<'a, C, NC, A> CreativeFieldMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of creative fields, possibly filtered. + /// Retrieves a list of creative fields, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> CreativeFieldListCall<'a, C, NC, A> { CreativeFieldListCall { hub: self.hub, @@ -6284,7 +6315,12 @@ impl<'a, C, NC, A> CreativeFieldMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an existing creative field. + /// Deletes an existing creative field. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Creative Field ID pub fn delete(&self, profile_id: &str, id: &str) -> CreativeFieldDeleteCall<'a, C, NC, A> { CreativeFieldDeleteCall { hub: self.hub, @@ -6298,7 +6334,12 @@ impl<'a, C, NC, A> CreativeFieldMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one creative field by ID. + /// Gets one creative field by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Creative Field ID pub fn get(&self, profile_id: &str, id: &str) -> CreativeFieldGetCall<'a, C, NC, A> { CreativeFieldGetCall { hub: self.hub, @@ -6312,7 +6353,12 @@ impl<'a, C, NC, A> CreativeFieldMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new creative field. + /// Inserts a new creative field. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &CreativeField, profile_id: &str) -> CreativeFieldInsertCall<'a, C, NC, A> { CreativeFieldInsertCall { hub: self.hub, @@ -6326,7 +6372,13 @@ impl<'a, C, NC, A> CreativeFieldMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing creative field. This method supports patch semantics. + /// Updates an existing creative field. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Creative Field ID pub fn patch(&self, request: &CreativeField, profile_id: &str, id: &str) -> CreativeFieldPatchCall<'a, C, NC, A> { CreativeFieldPatchCall { hub: self.hub, @@ -6376,13 +6428,18 @@ pub struct UserRoleMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for UserRoleMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for UserRoleMethods<'a, C, NC, A> {} impl<'a, C, NC, A> UserRoleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new user role. + /// Inserts a new user role. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &UserRole, profile_id: &str) -> UserRoleInsertCall<'a, C, NC, A> { UserRoleInsertCall { hub: self.hub, @@ -6396,7 +6453,12 @@ impl<'a, C, NC, A> UserRoleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one user role by ID. + /// Gets one user role by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - User role ID. pub fn get(&self, profile_id: &str, id: &str) -> UserRoleGetCall<'a, C, NC, A> { UserRoleGetCall { hub: self.hub, @@ -6410,7 +6472,12 @@ impl<'a, C, NC, A> UserRoleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing user role. + /// Updates an existing user role. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &UserRole, profile_id: &str) -> UserRoleUpdateCall<'a, C, NC, A> { UserRoleUpdateCall { hub: self.hub, @@ -6424,7 +6491,12 @@ impl<'a, C, NC, A> UserRoleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an existing user role. + /// Deletes an existing user role. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - User role ID. pub fn delete(&self, profile_id: &str, id: &str) -> UserRoleDeleteCall<'a, C, NC, A> { UserRoleDeleteCall { hub: self.hub, @@ -6438,7 +6510,13 @@ impl<'a, C, NC, A> UserRoleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing user role. This method supports patch semantics. + /// Updates an existing user role. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - User role ID. pub fn patch(&self, request: &UserRole, profile_id: &str, id: &str) -> UserRolePatchCall<'a, C, NC, A> { UserRolePatchCall { hub: self.hub, @@ -6453,7 +6531,11 @@ impl<'a, C, NC, A> UserRoleMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of user roles, possibly filtered. + /// Retrieves a list of user roles, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> UserRoleListCall<'a, C, NC, A> { UserRoleListCall { hub: self.hub, @@ -6509,13 +6591,17 @@ pub struct OperatingSystemVersionMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for OperatingSystemVersionMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for OperatingSystemVersionMethods<'a, C, NC, A> {} impl<'a, C, NC, A> OperatingSystemVersionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of operating system versions. + /// Retrieves a list of operating system versions. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> OperatingSystemVersionListCall<'a, C, NC, A> { OperatingSystemVersionListCall { hub: self.hub, @@ -6563,13 +6649,19 @@ pub struct LandingPageMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for LandingPageMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for LandingPageMethods<'a, C, NC, A> {} impl<'a, C, NC, A> LandingPageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one campaign landing page by ID. + /// Gets one campaign landing page by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `campaignId` - Landing page campaign ID. + /// * `id` - Landing page ID. pub fn get(&self, profile_id: &str, campaign_id: &str, id: &str) -> LandingPageGetCall<'a, C, NC, A> { LandingPageGetCall { hub: self.hub, @@ -6584,7 +6676,13 @@ impl<'a, C, NC, A> LandingPageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing campaign landing page. + /// Updates an existing campaign landing page. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `campaignId` - Landing page campaign ID. pub fn update(&self, request: &LandingPage, profile_id: &str, campaign_id: &str) -> LandingPageUpdateCall<'a, C, NC, A> { LandingPageUpdateCall { hub: self.hub, @@ -6599,7 +6697,12 @@ impl<'a, C, NC, A> LandingPageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of landing pages for the specified campaign. + /// Retrieves the list of landing pages for the specified campaign. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `campaignId` - Landing page campaign ID. pub fn list(&self, profile_id: &str, campaign_id: &str) -> LandingPageListCall<'a, C, NC, A> { LandingPageListCall { hub: self.hub, @@ -6613,7 +6716,13 @@ impl<'a, C, NC, A> LandingPageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new landing page for the specified campaign. + /// Inserts a new landing page for the specified campaign. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `campaignId` - Landing page campaign ID. pub fn insert(&self, request: &LandingPage, profile_id: &str, campaign_id: &str) -> LandingPageInsertCall<'a, C, NC, A> { LandingPageInsertCall { hub: self.hub, @@ -6628,7 +6737,14 @@ impl<'a, C, NC, A> LandingPageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing campaign landing page. This method supports patch semantics. + /// Updates an existing campaign landing page. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `campaignId` - Landing page campaign ID. + /// * `id` - Landing page ID. pub fn patch(&self, request: &LandingPage, profile_id: &str, campaign_id: &str, id: &str) -> LandingPagePatchCall<'a, C, NC, A> { LandingPagePatchCall { hub: self.hub, @@ -6644,7 +6760,13 @@ impl<'a, C, NC, A> LandingPageMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an existing campaign landing page. + /// Deletes an existing campaign landing page. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `campaignId` - Landing page campaign ID. + /// * `id` - Landing page ID. pub fn delete(&self, profile_id: &str, campaign_id: &str, id: &str) -> LandingPageDeleteCall<'a, C, NC, A> { LandingPageDeleteCall { hub: self.hub, @@ -6694,13 +6816,19 @@ pub struct CampaignCreativeAssociationMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CampaignCreativeAssociationMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CampaignCreativeAssociationMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CampaignCreativeAssociationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Associates a creative with the specified campaign. This method creates a default ad with dimensions matching the creative in the campaign if such a default ad does not exist already. + /// Associates a creative with the specified campaign. This method creates a default ad with dimensions matching the creative in the campaign if such a default ad does not exist already. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `campaignId` - Campaign ID in this association. pub fn insert(&self, request: &CampaignCreativeAssociation, profile_id: &str, campaign_id: &str) -> CampaignCreativeAssociationInsertCall<'a, C, NC, A> { CampaignCreativeAssociationInsertCall { hub: self.hub, @@ -6715,7 +6843,12 @@ impl<'a, C, NC, A> CampaignCreativeAssociationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of creative IDs associated with the specified campaign. + /// Retrieves the list of creative IDs associated with the specified campaign. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `campaignId` - Campaign ID in this association. pub fn list(&self, profile_id: &str, campaign_id: &str) -> CampaignCreativeAssociationListCall<'a, C, NC, A> { CampaignCreativeAssociationListCall { hub: self.hub, @@ -6767,13 +6900,17 @@ pub struct ChangeLogMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ChangeLogMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ChangeLogMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ChangeLogMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of change logs. + /// Retrieves a list of change logs. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> ChangeLogListCall<'a, C, NC, A> { ChangeLogListCall { hub: self.hub, @@ -6796,7 +6933,12 @@ impl<'a, C, NC, A> ChangeLogMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one change log by ID. + /// Gets one change log by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Change log ID. pub fn get(&self, profile_id: &str, id: &str) -> ChangeLogGetCall<'a, C, NC, A> { ChangeLogGetCall { hub: self.hub, @@ -6845,13 +6987,18 @@ pub struct AccountMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AccountMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AccountMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one account by ID. + /// Gets one account by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Account ID. pub fn get(&self, profile_id: &str, id: &str) -> AccountGetCall<'a, C, NC, A> { AccountGetCall { hub: self.hub, @@ -6865,7 +7012,11 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of accounts, possibly filtered. + /// Retrieves the list of accounts, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> AccountListCall<'a, C, NC, A> { AccountListCall { hub: self.hub, @@ -6885,7 +7036,12 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing account. + /// Updates an existing account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &Account, profile_id: &str) -> AccountUpdateCall<'a, C, NC, A> { AccountUpdateCall { hub: self.hub, @@ -6899,7 +7055,13 @@ impl<'a, C, NC, A> AccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing account. This method supports patch semantics. + /// Updates an existing account. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Account ID. pub fn patch(&self, request: &Account, profile_id: &str, id: &str) -> AccountPatchCall<'a, C, NC, A> { AccountPatchCall { hub: self.hub, @@ -6949,13 +7111,17 @@ pub struct PostalCodeMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PostalCodeMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PostalCodeMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PostalCodeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of postal codes. + /// Retrieves a list of postal codes. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> PostalCodeListCall<'a, C, NC, A> { PostalCodeListCall { hub: self.hub, @@ -7003,13 +7169,18 @@ pub struct AdvertiserMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AdvertiserMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AdvertiserMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AdvertiserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new advertiser. + /// Inserts a new advertiser. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &Advertiser, profile_id: &str) -> AdvertiserInsertCall<'a, C, NC, A> { AdvertiserInsertCall { hub: self.hub, @@ -7023,7 +7194,13 @@ impl<'a, C, NC, A> AdvertiserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing advertiser. This method supports patch semantics. + /// Updates an existing advertiser. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Advertiser ID. pub fn patch(&self, request: &Advertiser, profile_id: &str, id: &str) -> AdvertiserPatchCall<'a, C, NC, A> { AdvertiserPatchCall { hub: self.hub, @@ -7038,7 +7215,11 @@ impl<'a, C, NC, A> AdvertiserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of advertisers, possibly filtered. + /// Retrieves a list of advertisers, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> AdvertiserListCall<'a, C, NC, A> { AdvertiserListCall { hub: self.hub, @@ -7063,7 +7244,12 @@ impl<'a, C, NC, A> AdvertiserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing advertiser. + /// Updates an existing advertiser. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &Advertiser, profile_id: &str) -> AdvertiserUpdateCall<'a, C, NC, A> { AdvertiserUpdateCall { hub: self.hub, @@ -7077,7 +7263,12 @@ impl<'a, C, NC, A> AdvertiserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one advertiser by ID. + /// Gets one advertiser by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Advertiser ID. pub fn get(&self, profile_id: &str, id: &str) -> AdvertiserGetCall<'a, C, NC, A> { AdvertiserGetCall { hub: self.hub, @@ -7126,13 +7317,18 @@ pub struct DimensionValueMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for DimensionValueMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for DimensionValueMethods<'a, C, NC, A> {} impl<'a, C, NC, A> DimensionValueMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves list of report dimension values for a list of filters. + /// Retrieves list of report dimension values for a list of filters. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - The DFA user profile ID. pub fn query(&self, request: &DimensionValueRequest, profile_id: &str) -> DimensionValueQueryCall<'a, C, NC, A> { DimensionValueQueryCall { hub: self.hub, @@ -7183,13 +7379,18 @@ pub struct FloodlightActivityGroupMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for FloodlightActivityGroupMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for FloodlightActivityGroupMethods<'a, C, NC, A> {} impl<'a, C, NC, A> FloodlightActivityGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an existing floodlight activity group. + /// Deletes an existing floodlight activity group. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Floodlight activity Group ID. pub fn delete(&self, profile_id: &str, id: &str) -> FloodlightActivityGroupDeleteCall<'a, C, NC, A> { FloodlightActivityGroupDeleteCall { hub: self.hub, @@ -7203,7 +7404,12 @@ impl<'a, C, NC, A> FloodlightActivityGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one floodlight activity group by ID. + /// Gets one floodlight activity group by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Floodlight activity Group ID. pub fn get(&self, profile_id: &str, id: &str) -> FloodlightActivityGroupGetCall<'a, C, NC, A> { FloodlightActivityGroupGetCall { hub: self.hub, @@ -7217,7 +7423,13 @@ impl<'a, C, NC, A> FloodlightActivityGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing floodlight activity group. This method supports patch semantics. + /// Updates an existing floodlight activity group. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Floodlight activity Group ID. pub fn patch(&self, request: &FloodlightActivityGroup, profile_id: &str, id: &str) -> FloodlightActivityGroupPatchCall<'a, C, NC, A> { FloodlightActivityGroupPatchCall { hub: self.hub, @@ -7232,7 +7444,11 @@ impl<'a, C, NC, A> FloodlightActivityGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of floodlight activity groups, possibly filtered. + /// Retrieves a list of floodlight activity groups, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> FloodlightActivityGroupListCall<'a, C, NC, A> { FloodlightActivityGroupListCall { hub: self.hub, @@ -7254,7 +7470,12 @@ impl<'a, C, NC, A> FloodlightActivityGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new floodlight activity group. + /// Inserts a new floodlight activity group. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &FloodlightActivityGroup, profile_id: &str) -> FloodlightActivityGroupInsertCall<'a, C, NC, A> { FloodlightActivityGroupInsertCall { hub: self.hub, @@ -7268,7 +7489,12 @@ impl<'a, C, NC, A> FloodlightActivityGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing floodlight activity group. + /// Updates an existing floodlight activity group. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &FloodlightActivityGroup, profile_id: &str) -> FloodlightActivityGroupUpdateCall<'a, C, NC, A> { FloodlightActivityGroupUpdateCall { hub: self.hub, @@ -7317,13 +7543,17 @@ pub struct MetroMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for MetroMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for MetroMethods<'a, C, NC, A> {} impl<'a, C, NC, A> MetroMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of metros. + /// Retrieves a list of metros. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> MetroListCall<'a, C, NC, A> { MetroListCall { hub: self.hub, @@ -7371,13 +7601,18 @@ pub struct DirectorySiteContactMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for DirectorySiteContactMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for DirectorySiteContactMethods<'a, C, NC, A> {} impl<'a, C, NC, A> DirectorySiteContactMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one directory site contact by ID. + /// Gets one directory site contact by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Directory site contact ID. pub fn get(&self, profile_id: &str, id: &str) -> DirectorySiteContactGetCall<'a, C, NC, A> { DirectorySiteContactGetCall { hub: self.hub, @@ -7391,7 +7626,11 @@ impl<'a, C, NC, A> DirectorySiteContactMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of directory site contacts, possibly filtered. + /// Retrieves a list of directory site contacts, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> DirectorySiteContactListCall<'a, C, NC, A> { DirectorySiteContactListCall { hub: self.hub, @@ -7446,13 +7685,13 @@ pub struct UserProfileMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for UserProfileMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for UserProfileMethods<'a, C, NC, A> {} impl<'a, C, NC, A> UserProfileMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves list of user profiles for a user. + /// Retrieves list of user profiles for a user. pub fn list(&self) -> UserProfileListCall<'a, C, NC, A> { UserProfileListCall { hub: self.hub, @@ -7464,7 +7703,11 @@ impl<'a, C, NC, A> UserProfileMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one user profile by ID. + /// Gets one user profile by ID. + /// + /// # Arguments + /// + /// * `profileId` - The user profile ID. pub fn get(&self, profile_id: &str) -> UserProfileGetCall<'a, C, NC, A> { UserProfileGetCall { hub: self.hub, @@ -7512,13 +7755,19 @@ pub struct AdMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AdMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AdMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AdMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing ad. This method supports patch semantics. + /// Updates an existing ad. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Ad ID. pub fn patch(&self, request: &Ad, profile_id: &str, id: &str) -> AdPatchCall<'a, C, NC, A> { AdPatchCall { hub: self.hub, @@ -7533,7 +7782,12 @@ impl<'a, C, NC, A> AdMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new ad. + /// Inserts a new ad. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &Ad, profile_id: &str) -> AdInsertCall<'a, C, NC, A> { AdInsertCall { hub: self.hub, @@ -7547,7 +7801,11 @@ impl<'a, C, NC, A> AdMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of ads, possibly filtered. + /// Retrieves a list of ads, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> AdListCall<'a, C, NC, A> { AdListCall { hub: self.hub, @@ -7584,7 +7842,12 @@ impl<'a, C, NC, A> AdMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one ad by ID. + /// Gets one ad by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Ad ID. pub fn get(&self, profile_id: &str, id: &str) -> AdGetCall<'a, C, NC, A> { AdGetCall { hub: self.hub, @@ -7598,7 +7861,12 @@ impl<'a, C, NC, A> AdMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing ad. + /// Updates an existing ad. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &Ad, profile_id: &str) -> AdUpdateCall<'a, C, NC, A> { AdUpdateCall { hub: self.hub, @@ -7647,13 +7915,18 @@ pub struct AccountPermissionMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AccountPermissionMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AccountPermissionMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AccountPermissionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one account permission by ID. + /// Gets one account permission by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Account permission ID. pub fn get(&self, profile_id: &str, id: &str) -> AccountPermissionGetCall<'a, C, NC, A> { AccountPermissionGetCall { hub: self.hub, @@ -7667,7 +7940,11 @@ impl<'a, C, NC, A> AccountPermissionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of account permissions. + /// Retrieves the list of account permissions. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> AccountPermissionListCall<'a, C, NC, A> { AccountPermissionListCall { hub: self.hub, @@ -7715,13 +7992,17 @@ pub struct ConnectionTypeMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ConnectionTypeMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ConnectionTypeMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ConnectionTypeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of connection types. + /// Retrieves a list of connection types. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> ConnectionTypeListCall<'a, C, NC, A> { ConnectionTypeListCall { hub: self.hub, @@ -7769,13 +8050,18 @@ pub struct AdvertiserGroupMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AdvertiserGroupMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AdvertiserGroupMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AdvertiserGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one advertiser group by ID. + /// Gets one advertiser group by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Advertiser group ID. pub fn get(&self, profile_id: &str, id: &str) -> AdvertiserGroupGetCall<'a, C, NC, A> { AdvertiserGroupGetCall { hub: self.hub, @@ -7789,7 +8075,11 @@ impl<'a, C, NC, A> AdvertiserGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of advertiser groups, possibly filtered. + /// Retrieves a list of advertiser groups, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> AdvertiserGroupListCall<'a, C, NC, A> { AdvertiserGroupListCall { hub: self.hub, @@ -7808,7 +8098,12 @@ impl<'a, C, NC, A> AdvertiserGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new advertiser group. + /// Inserts a new advertiser group. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &AdvertiserGroup, profile_id: &str) -> AdvertiserGroupInsertCall<'a, C, NC, A> { AdvertiserGroupInsertCall { hub: self.hub, @@ -7822,7 +8117,12 @@ impl<'a, C, NC, A> AdvertiserGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing advertiser group. + /// Updates an existing advertiser group. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &AdvertiserGroup, profile_id: &str) -> AdvertiserGroupUpdateCall<'a, C, NC, A> { AdvertiserGroupUpdateCall { hub: self.hub, @@ -7836,7 +8136,13 @@ impl<'a, C, NC, A> AdvertiserGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing advertiser group. This method supports patch semantics. + /// Updates an existing advertiser group. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Advertiser group ID. pub fn patch(&self, request: &AdvertiserGroup, profile_id: &str, id: &str) -> AdvertiserGroupPatchCall<'a, C, NC, A> { AdvertiserGroupPatchCall { hub: self.hub, @@ -7851,7 +8157,12 @@ impl<'a, C, NC, A> AdvertiserGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an existing advertiser group. + /// Deletes an existing advertiser group. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Advertiser group ID. pub fn delete(&self, profile_id: &str, id: &str) -> AdvertiserGroupDeleteCall<'a, C, NC, A> { AdvertiserGroupDeleteCall { hub: self.hub, @@ -7900,13 +8211,18 @@ pub struct SiteMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for SiteMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for SiteMethods<'a, C, NC, A> {} impl<'a, C, NC, A> SiteMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new site. + /// Inserts a new site. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &Site, profile_id: &str) -> SiteInsertCall<'a, C, NC, A> { SiteInsertCall { hub: self.hub, @@ -7920,7 +8236,12 @@ impl<'a, C, NC, A> SiteMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one site by ID. + /// Gets one site by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Site ID. pub fn get(&self, profile_id: &str, id: &str) -> SiteGetCall<'a, C, NC, A> { SiteGetCall { hub: self.hub, @@ -7934,7 +8255,11 @@ impl<'a, C, NC, A> SiteMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of sites, possibly filtered. + /// Retrieves a list of sites, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> SiteListCall<'a, C, NC, A> { SiteListCall { hub: self.hub, @@ -7962,7 +8287,12 @@ impl<'a, C, NC, A> SiteMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing site. + /// Updates an existing site. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &Site, profile_id: &str) -> SiteUpdateCall<'a, C, NC, A> { SiteUpdateCall { hub: self.hub, @@ -7976,7 +8306,13 @@ impl<'a, C, NC, A> SiteMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing site. This method supports patch semantics. + /// Updates an existing site. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Site ID. pub fn patch(&self, request: &Site, profile_id: &str, id: &str) -> SitePatchCall<'a, C, NC, A> { SitePatchCall { hub: self.hub, @@ -8026,13 +8362,18 @@ pub struct FloodlightActivityMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for FloodlightActivityMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for FloodlightActivityMethods<'a, C, NC, A> {} impl<'a, C, NC, A> FloodlightActivityMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one floodlight activity by ID. + /// Gets one floodlight activity by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Floodlight activity ID. pub fn get(&self, profile_id: &str, id: &str) -> FloodlightActivityGetCall<'a, C, NC, A> { FloodlightActivityGetCall { hub: self.hub, @@ -8046,7 +8387,11 @@ impl<'a, C, NC, A> FloodlightActivityMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of floodlight activities, possibly filtered. + /// Retrieves a list of floodlight activities, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> FloodlightActivityListCall<'a, C, NC, A> { FloodlightActivityListCall { hub: self.hub, @@ -8072,7 +8417,12 @@ impl<'a, C, NC, A> FloodlightActivityMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new floodlight activity. + /// Inserts a new floodlight activity. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &FloodlightActivity, profile_id: &str) -> FloodlightActivityInsertCall<'a, C, NC, A> { FloodlightActivityInsertCall { hub: self.hub, @@ -8086,7 +8436,12 @@ impl<'a, C, NC, A> FloodlightActivityMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an existing floodlight activity. + /// Deletes an existing floodlight activity. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Floodlight activity ID. pub fn delete(&self, profile_id: &str, id: &str) -> FloodlightActivityDeleteCall<'a, C, NC, A> { FloodlightActivityDeleteCall { hub: self.hub, @@ -8100,7 +8455,13 @@ impl<'a, C, NC, A> FloodlightActivityMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing floodlight activity. This method supports patch semantics. + /// Updates an existing floodlight activity. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Floodlight activity ID. pub fn patch(&self, request: &FloodlightActivity, profile_id: &str, id: &str) -> FloodlightActivityPatchCall<'a, C, NC, A> { FloodlightActivityPatchCall { hub: self.hub, @@ -8115,7 +8476,11 @@ impl<'a, C, NC, A> FloodlightActivityMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Generates a tag for a floodlight activity. + /// Generates a tag for a floodlight activity. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn generatetag(&self, profile_id: &str) -> FloodlightActivityGeneratetagCall<'a, C, NC, A> { FloodlightActivityGeneratetagCall { hub: self.hub, @@ -8129,7 +8494,12 @@ impl<'a, C, NC, A> FloodlightActivityMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing floodlight activity. + /// Updates an existing floodlight activity. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &FloodlightActivity, profile_id: &str) -> FloodlightActivityUpdateCall<'a, C, NC, A> { FloodlightActivityUpdateCall { hub: self.hub, @@ -8178,13 +8548,17 @@ pub struct RegionMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for RegionMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for RegionMethods<'a, C, NC, A> {} impl<'a, C, NC, A> RegionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of regions. + /// Retrieves a list of regions. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> RegionListCall<'a, C, NC, A> { RegionListCall { hub: self.hub, @@ -8232,13 +8606,18 @@ pub struct CreativeGroupMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CreativeGroupMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CreativeGroupMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CreativeGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new creative group. + /// Inserts a new creative group. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &CreativeGroup, profile_id: &str) -> CreativeGroupInsertCall<'a, C, NC, A> { CreativeGroupInsertCall { hub: self.hub, @@ -8252,7 +8631,12 @@ impl<'a, C, NC, A> CreativeGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one creative group by ID. + /// Gets one creative group by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Creative group ID. pub fn get(&self, profile_id: &str, id: &str) -> CreativeGroupGetCall<'a, C, NC, A> { CreativeGroupGetCall { hub: self.hub, @@ -8266,7 +8650,12 @@ impl<'a, C, NC, A> CreativeGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing creative group. + /// Updates an existing creative group. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &CreativeGroup, profile_id: &str) -> CreativeGroupUpdateCall<'a, C, NC, A> { CreativeGroupUpdateCall { hub: self.hub, @@ -8280,7 +8669,11 @@ impl<'a, C, NC, A> CreativeGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of creative groups, possibly filtered. + /// Retrieves a list of creative groups, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> CreativeGroupListCall<'a, C, NC, A> { CreativeGroupListCall { hub: self.hub, @@ -8301,7 +8694,13 @@ impl<'a, C, NC, A> CreativeGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing creative group. This method supports patch semantics. + /// Updates an existing creative group. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Creative group ID. pub fn patch(&self, request: &CreativeGroup, profile_id: &str, id: &str) -> CreativeGroupPatchCall<'a, C, NC, A> { CreativeGroupPatchCall { hub: self.hub, @@ -8351,13 +8750,19 @@ pub struct SubaccountMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for SubaccountMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for SubaccountMethods<'a, C, NC, A> {} impl<'a, C, NC, A> SubaccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing subaccount. This method supports patch semantics. + /// Updates an existing subaccount. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Subaccount ID. pub fn patch(&self, request: &Subaccount, profile_id: &str, id: &str) -> SubaccountPatchCall<'a, C, NC, A> { SubaccountPatchCall { hub: self.hub, @@ -8372,7 +8777,12 @@ impl<'a, C, NC, A> SubaccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new subaccount. + /// Inserts a new subaccount. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &Subaccount, profile_id: &str) -> SubaccountInsertCall<'a, C, NC, A> { SubaccountInsertCall { hub: self.hub, @@ -8386,7 +8796,11 @@ impl<'a, C, NC, A> SubaccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets a list of subaccounts, possibly filtered. + /// Gets a list of subaccounts, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> SubaccountListCall<'a, C, NC, A> { SubaccountListCall { hub: self.hub, @@ -8405,7 +8819,12 @@ impl<'a, C, NC, A> SubaccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing subaccount. + /// Updates an existing subaccount. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &Subaccount, profile_id: &str) -> SubaccountUpdateCall<'a, C, NC, A> { SubaccountUpdateCall { hub: self.hub, @@ -8419,7 +8838,12 @@ impl<'a, C, NC, A> SubaccountMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one subaccount by ID. + /// Gets one subaccount by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Subaccount ID. pub fn get(&self, profile_id: &str, id: &str) -> SubaccountGetCall<'a, C, NC, A> { SubaccountGetCall { hub: self.hub, @@ -8468,13 +8892,17 @@ pub struct MobileCarrierMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for MobileCarrierMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for MobileCarrierMethods<'a, C, NC, A> {} impl<'a, C, NC, A> MobileCarrierMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of mobile carriers. + /// Retrieves a list of mobile carriers. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> MobileCarrierListCall<'a, C, NC, A> { MobileCarrierListCall { hub: self.hub, @@ -8522,13 +8950,18 @@ pub struct FloodlightConfigurationMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for FloodlightConfigurationMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for FloodlightConfigurationMethods<'a, C, NC, A> {} impl<'a, C, NC, A> FloodlightConfigurationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing floodlight configuration. + /// Updates an existing floodlight configuration. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &FloodlightConfiguration, profile_id: &str) -> FloodlightConfigurationUpdateCall<'a, C, NC, A> { FloodlightConfigurationUpdateCall { hub: self.hub, @@ -8542,7 +8975,13 @@ impl<'a, C, NC, A> FloodlightConfigurationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing floodlight configuration. This method supports patch semantics. + /// Updates an existing floodlight configuration. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Floodlight configuration ID. pub fn patch(&self, request: &FloodlightConfiguration, profile_id: &str, id: &str) -> FloodlightConfigurationPatchCall<'a, C, NC, A> { FloodlightConfigurationPatchCall { hub: self.hub, @@ -8557,7 +8996,12 @@ impl<'a, C, NC, A> FloodlightConfigurationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one floodlight configuration by ID. + /// Gets one floodlight configuration by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Floodlight configuration ID. pub fn get(&self, profile_id: &str, id: &str) -> FloodlightConfigurationGetCall<'a, C, NC, A> { FloodlightConfigurationGetCall { hub: self.hub, @@ -8571,7 +9015,11 @@ impl<'a, C, NC, A> FloodlightConfigurationMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of floodlight configurations, possibly filtered. + /// Retrieves a list of floodlight configurations, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> FloodlightConfigurationListCall<'a, C, NC, A> { FloodlightConfigurationListCall { hub: self.hub, @@ -8620,13 +9068,17 @@ pub struct OperatingSystemMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for OperatingSystemMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for OperatingSystemMethods<'a, C, NC, A> {} impl<'a, C, NC, A> OperatingSystemMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of operating systems. + /// Retrieves a list of operating systems. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> OperatingSystemListCall<'a, C, NC, A> { OperatingSystemListCall { hub: self.hub, @@ -8674,13 +9126,17 @@ pub struct FileMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for FileMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for FileMethods<'a, C, NC, A> {} impl<'a, C, NC, A> FileMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists files for a user profile. + /// Lists files for a user profile. + /// + /// # Arguments + /// + /// * `profileId` - The DFA profile ID. pub fn list(&self, profile_id: &str) -> FileListCall<'a, C, NC, A> { FileListCall { hub: self.hub, @@ -8698,7 +9154,12 @@ impl<'a, C, NC, A> FileMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a report file by its report ID and file ID. + /// Retrieves a report file by its report ID and file ID. + /// + /// # Arguments + /// + /// * `reportId` - The ID of the report. + /// * `fileId` - The ID of the report file. pub fn get(&self, report_id: &str, file_id: &str) -> FileGetCall<'a, C, NC, A> { FileGetCall { hub: self.hub, @@ -8747,13 +9208,17 @@ pub struct PlacementGroupMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PlacementGroupMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PlacementGroupMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PlacementGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of placement groups, possibly filtered. + /// Retrieves a list of placement groups, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> PlacementGroupListCall<'a, C, NC, A> { PlacementGroupListCall { hub: self.hub, @@ -8781,7 +9246,12 @@ impl<'a, C, NC, A> PlacementGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing placement group. + /// Updates an existing placement group. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &PlacementGroup, profile_id: &str) -> PlacementGroupUpdateCall<'a, C, NC, A> { PlacementGroupUpdateCall { hub: self.hub, @@ -8795,7 +9265,12 @@ impl<'a, C, NC, A> PlacementGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new placement group. + /// Inserts a new placement group. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &PlacementGroup, profile_id: &str) -> PlacementGroupInsertCall<'a, C, NC, A> { PlacementGroupInsertCall { hub: self.hub, @@ -8809,7 +9284,12 @@ impl<'a, C, NC, A> PlacementGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one placement group by ID. + /// Gets one placement group by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Placement group ID. pub fn get(&self, profile_id: &str, id: &str) -> PlacementGroupGetCall<'a, C, NC, A> { PlacementGroupGetCall { hub: self.hub, @@ -8823,7 +9303,13 @@ impl<'a, C, NC, A> PlacementGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing placement group. This method supports patch semantics. + /// Updates an existing placement group. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Placement group ID. pub fn patch(&self, request: &PlacementGroup, profile_id: &str, id: &str) -> PlacementGroupPatchCall<'a, C, NC, A> { PlacementGroupPatchCall { hub: self.hub, @@ -8873,13 +9359,19 @@ pub struct CreativeAssetMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CreativeAssetMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CreativeAssetMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CreativeAssetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new creative asset. + /// Inserts a new creative asset. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `advertiserId` - Advertiser ID of this creative. This is a required field. pub fn insert(&self, request: &CreativeAssetMetadata, profile_id: &str, advertiser_id: &str) -> CreativeAssetInsertCall<'a, C, NC, A> { CreativeAssetInsertCall { hub: self.hub, @@ -8929,13 +9421,18 @@ pub struct UserRolePermissionMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for UserRolePermissionMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for UserRolePermissionMethods<'a, C, NC, A> {} impl<'a, C, NC, A> UserRolePermissionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one user role permission by ID. + /// Gets one user role permission by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - User role permission ID. pub fn get(&self, profile_id: &str, id: &str) -> UserRolePermissionGetCall<'a, C, NC, A> { UserRolePermissionGetCall { hub: self.hub, @@ -8949,7 +9446,11 @@ impl<'a, C, NC, A> UserRolePermissionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets a list of user role permissions, possibly filtered. + /// Gets a list of user role permissions, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> UserRolePermissionListCall<'a, C, NC, A> { UserRolePermissionListCall { hub: self.hub, @@ -8998,13 +9499,17 @@ pub struct AccountPermissionGroupMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AccountPermissionGroupMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AccountPermissionGroupMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AccountPermissionGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves the list of account permission groups. + /// Retrieves the list of account permission groups. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> AccountPermissionGroupListCall<'a, C, NC, A> { AccountPermissionGroupListCall { hub: self.hub, @@ -9017,7 +9522,12 @@ impl<'a, C, NC, A> AccountPermissionGroupMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one account permission group by ID. + /// Gets one account permission group by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Account permission group ID. pub fn get(&self, profile_id: &str, id: &str) -> AccountPermissionGroupGetCall<'a, C, NC, A> { AccountPermissionGroupGetCall { hub: self.hub, @@ -9066,13 +9576,17 @@ pub struct ContentCategoryMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ContentCategoryMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ContentCategoryMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ContentCategoryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of content categories, possibly filtered. + /// Retrieves a list of content categories, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> ContentCategoryListCall<'a, C, NC, A> { ContentCategoryListCall { hub: self.hub, @@ -9091,7 +9605,12 @@ impl<'a, C, NC, A> ContentCategoryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing content category. + /// Updates an existing content category. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &ContentCategory, profile_id: &str) -> ContentCategoryUpdateCall<'a, C, NC, A> { ContentCategoryUpdateCall { hub: self.hub, @@ -9105,7 +9624,12 @@ impl<'a, C, NC, A> ContentCategoryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new content category. + /// Inserts a new content category. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &ContentCategory, profile_id: &str) -> ContentCategoryInsertCall<'a, C, NC, A> { ContentCategoryInsertCall { hub: self.hub, @@ -9119,7 +9643,12 @@ impl<'a, C, NC, A> ContentCategoryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an existing content category. + /// Deletes an existing content category. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Content category ID. pub fn delete(&self, profile_id: &str, id: &str) -> ContentCategoryDeleteCall<'a, C, NC, A> { ContentCategoryDeleteCall { hub: self.hub, @@ -9133,7 +9662,12 @@ impl<'a, C, NC, A> ContentCategoryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one content category by ID. + /// Gets one content category by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Content category ID. pub fn get(&self, profile_id: &str, id: &str) -> ContentCategoryGetCall<'a, C, NC, A> { ContentCategoryGetCall { hub: self.hub, @@ -9147,7 +9681,13 @@ impl<'a, C, NC, A> ContentCategoryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing content category. This method supports patch semantics. + /// Updates an existing content category. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Content category ID. pub fn patch(&self, request: &ContentCategory, profile_id: &str, id: &str) -> ContentCategoryPatchCall<'a, C, NC, A> { ContentCategoryPatchCall { hub: self.hub, @@ -9197,13 +9737,18 @@ pub struct CreativeMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CreativeMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CreativeMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CreativeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new creative. + /// Inserts a new creative. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &Creative, profile_id: &str) -> CreativeInsertCall<'a, C, NC, A> { CreativeInsertCall { hub: self.hub, @@ -9217,7 +9762,12 @@ impl<'a, C, NC, A> CreativeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing creative. + /// Updates an existing creative. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &Creative, profile_id: &str) -> CreativeUpdateCall<'a, C, NC, A> { CreativeUpdateCall { hub: self.hub, @@ -9231,7 +9781,12 @@ impl<'a, C, NC, A> CreativeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one creative by ID. + /// Gets one creative by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Creative ID. pub fn get(&self, profile_id: &str, id: &str) -> CreativeGetCall<'a, C, NC, A> { CreativeGetCall { hub: self.hub, @@ -9245,7 +9800,11 @@ impl<'a, C, NC, A> CreativeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of creatives, possibly filtered. + /// Retrieves a list of creatives, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> CreativeListCall<'a, C, NC, A> { CreativeListCall { hub: self.hub, @@ -9274,7 +9833,13 @@ impl<'a, C, NC, A> CreativeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing creative. This method supports patch semantics. + /// Updates an existing creative. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Creative ID. pub fn patch(&self, request: &Creative, profile_id: &str, id: &str) -> CreativePatchCall<'a, C, NC, A> { CreativePatchCall { hub: self.hub, @@ -9324,13 +9889,18 @@ pub struct CampaignMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CampaignMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CampaignMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CampaignMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one campaign by ID. + /// Gets one campaign by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Campaign ID. pub fn get(&self, profile_id: &str, id: &str) -> CampaignGetCall<'a, C, NC, A> { CampaignGetCall { hub: self.hub, @@ -9344,7 +9914,14 @@ impl<'a, C, NC, A> CampaignMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new campaign. + /// Inserts a new campaign. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `defaultLandingPageName` - Default landing page name for this new campaign. Must be less than 256 characters long. + /// * `defaultLandingPageUrl` - Default landing page URL for this new campaign. pub fn insert(&self, request: &Campaign, profile_id: &str, default_landing_page_name: &str, default_landing_page_url: &str) -> CampaignInsertCall<'a, C, NC, A> { CampaignInsertCall { hub: self.hub, @@ -9360,7 +9937,13 @@ impl<'a, C, NC, A> CampaignMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing campaign. This method supports patch semantics. + /// Updates an existing campaign. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Campaign ID. pub fn patch(&self, request: &Campaign, profile_id: &str, id: &str) -> CampaignPatchCall<'a, C, NC, A> { CampaignPatchCall { hub: self.hub, @@ -9375,7 +9958,12 @@ impl<'a, C, NC, A> CampaignMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing campaign. + /// Updates an existing campaign. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &Campaign, profile_id: &str) -> CampaignUpdateCall<'a, C, NC, A> { CampaignUpdateCall { hub: self.hub, @@ -9389,7 +9977,11 @@ impl<'a, C, NC, A> CampaignMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of campaigns, possibly filtered. + /// Retrieves a list of campaigns, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> CampaignListCall<'a, C, NC, A> { CampaignListCall { hub: self.hub, @@ -9450,13 +10042,18 @@ pub struct EventTagMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for EventTagMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for EventTagMethods<'a, C, NC, A> {} impl<'a, C, NC, A> EventTagMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an existing event tag. + /// Deletes an existing event tag. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Event tag ID. pub fn delete(&self, profile_id: &str, id: &str) -> EventTagDeleteCall<'a, C, NC, A> { EventTagDeleteCall { hub: self.hub, @@ -9470,7 +10067,11 @@ impl<'a, C, NC, A> EventTagMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of event tags, possibly filtered. + /// Retrieves a list of event tags, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> EventTagListCall<'a, C, NC, A> { EventTagListCall { hub: self.hub, @@ -9493,7 +10094,12 @@ impl<'a, C, NC, A> EventTagMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new event tag. + /// Inserts a new event tag. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &EventTag, profile_id: &str) -> EventTagInsertCall<'a, C, NC, A> { EventTagInsertCall { hub: self.hub, @@ -9507,7 +10113,13 @@ impl<'a, C, NC, A> EventTagMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing event tag. This method supports patch semantics. + /// Updates an existing event tag. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Event tag ID. pub fn patch(&self, request: &EventTag, profile_id: &str, id: &str) -> EventTagPatchCall<'a, C, NC, A> { EventTagPatchCall { hub: self.hub, @@ -9522,7 +10134,12 @@ impl<'a, C, NC, A> EventTagMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing event tag. + /// Updates an existing event tag. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &EventTag, profile_id: &str) -> EventTagUpdateCall<'a, C, NC, A> { EventTagUpdateCall { hub: self.hub, @@ -9536,7 +10153,12 @@ impl<'a, C, NC, A> EventTagMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one event tag by ID. + /// Gets one event tag by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Event tag ID. pub fn get(&self, profile_id: &str, id: &str) -> EventTagGetCall<'a, C, NC, A> { EventTagGetCall { hub: self.hub, @@ -9585,13 +10207,17 @@ pub struct CityMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CityMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CityMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CityMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of cities, possibly filtered. + /// Retrieves a list of cities, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> CityListCall<'a, C, NC, A> { CityListCall { hub: self.hub, @@ -9643,13 +10269,17 @@ pub struct PlacementStrategyMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PlacementStrategyMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PlacementStrategyMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PlacementStrategyMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of placement strategies, possibly filtered. + /// Retrieves a list of placement strategies, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> PlacementStrategyListCall<'a, C, NC, A> { PlacementStrategyListCall { hub: self.hub, @@ -9668,7 +10298,12 @@ impl<'a, C, NC, A> PlacementStrategyMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing placement strategy. + /// Updates an existing placement strategy. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &PlacementStrategy, profile_id: &str) -> PlacementStrategyUpdateCall<'a, C, NC, A> { PlacementStrategyUpdateCall { hub: self.hub, @@ -9682,7 +10317,12 @@ impl<'a, C, NC, A> PlacementStrategyMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one placement strategy by ID. + /// Gets one placement strategy by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Placement strategy ID. pub fn get(&self, profile_id: &str, id: &str) -> PlacementStrategyGetCall<'a, C, NC, A> { PlacementStrategyGetCall { hub: self.hub, @@ -9696,7 +10336,12 @@ impl<'a, C, NC, A> PlacementStrategyMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an existing placement strategy. + /// Deletes an existing placement strategy. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Placement strategy ID. pub fn delete(&self, profile_id: &str, id: &str) -> PlacementStrategyDeleteCall<'a, C, NC, A> { PlacementStrategyDeleteCall { hub: self.hub, @@ -9710,7 +10355,12 @@ impl<'a, C, NC, A> PlacementStrategyMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new placement strategy. + /// Inserts a new placement strategy. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &PlacementStrategy, profile_id: &str) -> PlacementStrategyInsertCall<'a, C, NC, A> { PlacementStrategyInsertCall { hub: self.hub, @@ -9724,7 +10374,13 @@ impl<'a, C, NC, A> PlacementStrategyMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing placement strategy. This method supports patch semantics. + /// Updates an existing placement strategy. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Placement strategy ID. pub fn patch(&self, request: &PlacementStrategy, profile_id: &str, id: &str) -> PlacementStrategyPatchCall<'a, C, NC, A> { PlacementStrategyPatchCall { hub: self.hub, @@ -9774,13 +10430,17 @@ pub struct DirectorySiteMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for DirectorySiteMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for DirectorySiteMethods<'a, C, NC, A> {} impl<'a, C, NC, A> DirectorySiteMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of directory sites, possibly filtered. + /// Retrieves a list of directory sites, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> DirectorySiteListCall<'a, C, NC, A> { DirectorySiteListCall { hub: self.hub, @@ -9806,7 +10466,12 @@ impl<'a, C, NC, A> DirectorySiteMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one directory site by ID. + /// Gets one directory site by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Directory site ID. pub fn get(&self, profile_id: &str, id: &str) -> DirectorySiteGetCall<'a, C, NC, A> { DirectorySiteGetCall { hub: self.hub, @@ -9855,13 +10520,18 @@ pub struct SizeMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for SizeMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for SizeMethods<'a, C, NC, A> {} impl<'a, C, NC, A> SizeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new size. + /// Inserts a new size. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &Size, profile_id: &str) -> SizeInsertCall<'a, C, NC, A> { SizeInsertCall { hub: self.hub, @@ -9875,7 +10545,11 @@ impl<'a, C, NC, A> SizeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of sizes, possibly filtered. + /// Retrieves a list of sizes, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> SizeListCall<'a, C, NC, A> { SizeListCall { hub: self.hub, @@ -9892,7 +10566,12 @@ impl<'a, C, NC, A> SizeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one size by ID. + /// Gets one size by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Size ID. pub fn get(&self, profile_id: &str, id: &str) -> SizeGetCall<'a, C, NC, A> { SizeGetCall { hub: self.hub, @@ -9941,13 +10620,18 @@ pub struct AccountActiveAdSummaryMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AccountActiveAdSummaryMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AccountActiveAdSummaryMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AccountActiveAdSummaryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets the account's active ad summary by account ID. + /// Gets the account's active ad summary by account ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `summaryAccountId` - Account ID. pub fn get(&self, profile_id: &str, summary_account_id: &str) -> AccountActiveAdSummaryGetCall<'a, C, NC, A> { AccountActiveAdSummaryGetCall { hub: self.hub, @@ -9996,13 +10680,18 @@ pub struct AccountUserProfileMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for AccountUserProfileMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for AccountUserProfileMethods<'a, C, NC, A> {} impl<'a, C, NC, A> AccountUserProfileMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing account user profile. + /// Updates an existing account user profile. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &AccountUserProfile, profile_id: &str) -> AccountUserProfileUpdateCall<'a, C, NC, A> { AccountUserProfileUpdateCall { hub: self.hub, @@ -10016,7 +10705,11 @@ impl<'a, C, NC, A> AccountUserProfileMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of account user profiles, possibly filtered. + /// Retrieves a list of account user profiles, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> AccountUserProfileListCall<'a, C, NC, A> { AccountUserProfileListCall { hub: self.hub, @@ -10038,7 +10731,13 @@ impl<'a, C, NC, A> AccountUserProfileMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing account user profile. This method supports patch semantics. + /// Updates an existing account user profile. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - User profile ID. pub fn patch(&self, request: &AccountUserProfile, profile_id: &str, id: &str) -> AccountUserProfilePatchCall<'a, C, NC, A> { AccountUserProfilePatchCall { hub: self.hub, @@ -10053,7 +10752,12 @@ impl<'a, C, NC, A> AccountUserProfileMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one account user profile by ID. + /// Gets one account user profile by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - User profile ID. pub fn get(&self, profile_id: &str, id: &str) -> AccountUserProfileGetCall<'a, C, NC, A> { AccountUserProfileGetCall { hub: self.hub, @@ -10102,13 +10806,17 @@ pub struct CountryMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CountryMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CountryMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CountryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of countries. + /// Retrieves a list of countries. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> CountryListCall<'a, C, NC, A> { CountryListCall { hub: self.hub, @@ -10121,7 +10829,12 @@ impl<'a, C, NC, A> CountryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one country by ID. + /// Gets one country by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `dartId` - Country DART ID. pub fn get(&self, profile_id: &str, dart_id: &str) -> CountryGetCall<'a, C, NC, A> { CountryGetCall { hub: self.hub, @@ -10170,13 +10883,20 @@ pub struct CreativeFieldValueMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for CreativeFieldValueMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for CreativeFieldValueMethods<'a, C, NC, A> {} impl<'a, C, NC, A> CreativeFieldValueMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing creative field value. This method supports patch semantics. + /// Updates an existing creative field value. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `creativeFieldId` - Creative field ID for this creative field value. + /// * `id` - Creative Field Value ID pub fn patch(&self, request: &CreativeFieldValue, profile_id: &str, creative_field_id: &str, id: &str) -> CreativeFieldValuePatchCall<'a, C, NC, A> { CreativeFieldValuePatchCall { hub: self.hub, @@ -10192,7 +10912,13 @@ impl<'a, C, NC, A> CreativeFieldValueMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes an existing creative field value. + /// Deletes an existing creative field value. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `creativeFieldId` - Creative field ID for this creative field value. + /// * `id` - Creative Field Value ID pub fn delete(&self, profile_id: &str, creative_field_id: &str, id: &str) -> CreativeFieldValueDeleteCall<'a, C, NC, A> { CreativeFieldValueDeleteCall { hub: self.hub, @@ -10207,7 +10933,13 @@ impl<'a, C, NC, A> CreativeFieldValueMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new creative field value. + /// Inserts a new creative field value. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `creativeFieldId` - Creative field ID for this creative field value. pub fn insert(&self, request: &CreativeFieldValue, profile_id: &str, creative_field_id: &str) -> CreativeFieldValueInsertCall<'a, C, NC, A> { CreativeFieldValueInsertCall { hub: self.hub, @@ -10222,7 +10954,13 @@ impl<'a, C, NC, A> CreativeFieldValueMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing creative field value. + /// Updates an existing creative field value. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `creativeFieldId` - Creative field ID for this creative field value. pub fn update(&self, request: &CreativeFieldValue, profile_id: &str, creative_field_id: &str) -> CreativeFieldValueUpdateCall<'a, C, NC, A> { CreativeFieldValueUpdateCall { hub: self.hub, @@ -10237,7 +10975,13 @@ impl<'a, C, NC, A> CreativeFieldValueMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one creative field value by ID. + /// Gets one creative field value by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `creativeFieldId` - Creative field ID for this creative field value. + /// * `id` - Creative Field Value ID pub fn get(&self, profile_id: &str, creative_field_id: &str, id: &str) -> CreativeFieldValueGetCall<'a, C, NC, A> { CreativeFieldValueGetCall { hub: self.hub, @@ -10252,7 +10996,12 @@ impl<'a, C, NC, A> CreativeFieldValueMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of creative field values, possibly filtered. + /// Retrieves a list of creative field values, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `creativeFieldId` - Creative field ID for this creative field value. pub fn list(&self, profile_id: &str, creative_field_id: &str) -> CreativeFieldValueListCall<'a, C, NC, A> { CreativeFieldValueListCall { hub: self.hub, @@ -10307,13 +11056,19 @@ pub struct ReportMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ReportMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ReportMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a report. + /// Updates a report. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - The DFA user profile ID. + /// * `reportId` - The ID of the report. pub fn update(&self, request: &Report, profile_id: &str, report_id: &str) -> ReportUpdateCall<'a, C, NC, A> { ReportUpdateCall { hub: self.hub, @@ -10328,7 +11083,12 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Runs a report. + /// Runs a report. + /// + /// # Arguments + /// + /// * `profileId` - The DFA profile ID. + /// * `reportId` - The ID of the report. pub fn run(&self, profile_id: &str, report_id: &str) -> ReportRunCall<'a, C, NC, A> { ReportRunCall { hub: self.hub, @@ -10343,7 +11103,13 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a report. This method supports patch semantics. + /// Updates a report. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - The DFA user profile ID. + /// * `reportId` - The ID of the report. pub fn patch(&self, request: &Report, profile_id: &str, report_id: &str) -> ReportPatchCall<'a, C, NC, A> { ReportPatchCall { hub: self.hub, @@ -10358,7 +11124,12 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists files for a report. + /// Lists files for a report. + /// + /// # Arguments + /// + /// * `profileId` - The DFA profile ID. + /// * `reportId` - The ID of the parent report. pub fn files_list(&self, profile_id: &str, report_id: &str) -> ReportFileListCall<'a, C, NC, A> { ReportFileListCall { hub: self.hub, @@ -10376,7 +11147,12 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a report. + /// Creates a report. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - The DFA user profile ID. pub fn insert(&self, request: &Report, profile_id: &str) -> ReportInsertCall<'a, C, NC, A> { ReportInsertCall { hub: self.hub, @@ -10390,7 +11166,12 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns the fields that are compatible to be selected in the respective sections of a report criteria, given the fields already selected in the input report and user permissions. + /// Returns the fields that are compatible to be selected in the respective sections of a report criteria, given the fields already selected in the input report and user permissions. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - The DFA user profile ID. pub fn compatible_fields_query(&self, request: &Report, profile_id: &str) -> ReportCompatibleFieldQueryCall<'a, C, NC, A> { ReportCompatibleFieldQueryCall { hub: self.hub, @@ -10404,7 +11185,12 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a report by its ID. + /// Retrieves a report by its ID. + /// + /// # Arguments + /// + /// * `profileId` - The DFA user profile ID. + /// * `reportId` - The ID of the report. pub fn get(&self, profile_id: &str, report_id: &str) -> ReportGetCall<'a, C, NC, A> { ReportGetCall { hub: self.hub, @@ -10418,7 +11204,13 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a report file. + /// Retrieves a report file. + /// + /// # Arguments + /// + /// * `profileId` - The DFA profile ID. + /// * `reportId` - The ID of the report. + /// * `fileId` - The ID of the report file. pub fn files_get(&self, profile_id: &str, report_id: &str, file_id: &str) -> ReportFileGetCall<'a, C, NC, A> { ReportFileGetCall { hub: self.hub, @@ -10433,7 +11225,12 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a report by its ID. + /// Deletes a report by its ID. + /// + /// # Arguments + /// + /// * `profileId` - The DFA user profile ID. + /// * `reportId` - The ID of the report. pub fn delete(&self, profile_id: &str, report_id: &str) -> ReportDeleteCall<'a, C, NC, A> { ReportDeleteCall { hub: self.hub, @@ -10447,7 +11244,11 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves list of reports. + /// Retrieves list of reports. + /// + /// # Arguments + /// + /// * `profileId` - The DFA user profile ID. pub fn list(&self, profile_id: &str) -> ReportListCall<'a, C, NC, A> { ReportListCall { hub: self.hub, @@ -10500,13 +11301,17 @@ pub struct BrowserMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for BrowserMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for BrowserMethods<'a, C, NC, A> {} impl<'a, C, NC, A> BrowserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of browsers. + /// Retrieves a list of browsers. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> BrowserListCall<'a, C, NC, A> { BrowserListCall { hub: self.hub, @@ -10554,13 +11359,19 @@ pub struct PlacementMethods<'a, C, NC, A> hub: &'a Dfareporting, } -impl<'a, C, NC, A> ResourceMethodsBuilder for PlacementMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for PlacementMethods<'a, C, NC, A> {} impl<'a, C, NC, A> PlacementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing placement. This method supports patch semantics. + /// Updates an existing placement. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Placement ID. pub fn patch(&self, request: &Placement, profile_id: &str, id: &str) -> PlacementPatchCall<'a, C, NC, A> { PlacementPatchCall { hub: self.hub, @@ -10575,7 +11386,11 @@ impl<'a, C, NC, A> PlacementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of placements, possibly filtered. + /// Retrieves a list of placements, possibly filtered. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn list(&self, profile_id: &str) -> PlacementListCall<'a, C, NC, A> { PlacementListCall { hub: self.hub, @@ -10606,7 +11421,12 @@ impl<'a, C, NC, A> PlacementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Gets one placement by ID. + /// Gets one placement by ID. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. + /// * `id` - Placement ID. pub fn get(&self, profile_id: &str, id: &str) -> PlacementGetCall<'a, C, NC, A> { PlacementGetCall { hub: self.hub, @@ -10620,7 +11440,12 @@ impl<'a, C, NC, A> PlacementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a new placement. + /// Inserts a new placement. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn insert(&self, request: &Placement, profile_id: &str) -> PlacementInsertCall<'a, C, NC, A> { PlacementInsertCall { hub: self.hub, @@ -10634,7 +11459,12 @@ impl<'a, C, NC, A> PlacementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates an existing placement. + /// Updates an existing placement. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `profileId` - User profile ID associated with this request. pub fn update(&self, request: &Placement, profile_id: &str) -> PlacementUpdateCall<'a, C, NC, A> { PlacementUpdateCall { hub: self.hub, @@ -10648,7 +11478,11 @@ impl<'a, C, NC, A> PlacementMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Generates tags for a placement. + /// Generates tags for a placement. + /// + /// # Arguments + /// + /// * `profileId` - User profile ID associated with this request. pub fn generatetags(&self, profile_id: &str) -> PlacementGeneratetagCall<'a, C, NC, A> { PlacementGeneratetagCall { hub: self.hub, @@ -10674,7 +11508,7 @@ impl<'a, C, NC, A> PlacementMethods<'a, C, NC, A> { /// Gets one user role permission group by ID. /// /// A builder for the *get* method supported by a *userRolePermissionGroup* resource. -/// It is not used directly, but through a `UserRolePermissionGroupMethods`. +/// It is not used directly, but through a `UserRolePermissionGroupMethods` instance. /// /// # Example /// @@ -10734,7 +11568,7 @@ impl<'a, C, NC, A> UserRolePermissionGroupGetCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -10787,7 +11621,7 @@ impl<'a, C, NC, A> UserRolePermissionGroupGetCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -10799,7 +11633,6 @@ impl<'a, C, NC, A> UserRolePermissionGroupGetCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -10809,7 +11642,7 @@ impl<'a, C, NC, A> UserRolePermissionGroupGetCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -10820,7 +11653,7 @@ impl<'a, C, NC, A> UserRolePermissionGroupGetCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -10829,13 +11662,13 @@ impl<'a, C, NC, A> UserRolePermissionGroupGetCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -10847,7 +11680,7 @@ impl<'a, C, NC, A> UserRolePermissionGroupGetCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRolePermissionGroupGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -10857,7 +11690,7 @@ impl<'a, C, NC, A> UserRolePermissionGroupGetCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User role permission group ID. + /// User role permission group ID. pub fn id(mut self, new_value: &str) -> UserRolePermissionGroupGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -10918,7 +11751,7 @@ impl<'a, C, NC, A> UserRolePermissionGroupGetCall<'a, C, NC, A> where NC: hyper: /// Gets a list of all supported user role permission groups. /// /// A builder for the *list* method supported by a *userRolePermissionGroup* resource. -/// It is not used directly, but through a `UserRolePermissionGroupMethods`. +/// It is not used directly, but through a `UserRolePermissionGroupMethods` instance. /// /// # Example /// @@ -10976,7 +11809,7 @@ impl<'a, C, NC, A> UserRolePermissionGroupListCall<'a, C, NC, A> where NC: hyper for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11029,7 +11862,7 @@ impl<'a, C, NC, A> UserRolePermissionGroupListCall<'a, C, NC, A> where NC: hyper } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11041,7 +11874,6 @@ impl<'a, C, NC, A> UserRolePermissionGroupListCall<'a, C, NC, A> where NC: hyper dlg.pre_request(); req.send() - }; match req_result { @@ -11051,7 +11883,7 @@ impl<'a, C, NC, A> UserRolePermissionGroupListCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11062,7 +11894,7 @@ impl<'a, C, NC, A> UserRolePermissionGroupListCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11071,13 +11903,13 @@ impl<'a, C, NC, A> UserRolePermissionGroupListCall<'a, C, NC, A> where NC: hyper Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11089,7 +11921,7 @@ impl<'a, C, NC, A> UserRolePermissionGroupListCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRolePermissionGroupListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -11150,7 +11982,7 @@ impl<'a, C, NC, A> UserRolePermissionGroupListCall<'a, C, NC, A> where NC: hyper /// Retrieves a list of platform types. /// /// A builder for the *list* method supported by a *platformType* resource. -/// It is not used directly, but through a `PlatformTypeMethods`. +/// It is not used directly, but through a `PlatformTypeMethods` instance. /// /// # Example /// @@ -11208,7 +12040,7 @@ impl<'a, C, NC, A> PlatformTypeListCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11261,7 +12093,7 @@ impl<'a, C, NC, A> PlatformTypeListCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11273,7 +12105,6 @@ impl<'a, C, NC, A> PlatformTypeListCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -11283,7 +12114,7 @@ impl<'a, C, NC, A> PlatformTypeListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11294,7 +12125,7 @@ impl<'a, C, NC, A> PlatformTypeListCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11303,13 +12134,13 @@ impl<'a, C, NC, A> PlatformTypeListCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11321,7 +12152,7 @@ impl<'a, C, NC, A> PlatformTypeListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlatformTypeListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -11382,7 +12213,7 @@ impl<'a, C, NC, A> PlatformTypeListCall<'a, C, NC, A> where NC: hyper::net::Netw /// Updates an existing creative field. /// /// A builder for the *update* method supported by a *creativeField* resource. -/// It is not used directly, but through a `CreativeFieldMethods`. +/// It is not used directly, but through a `CreativeFieldMethods` instance. /// /// # Example /// @@ -11447,7 +12278,7 @@ impl<'a, C, NC, A> CreativeFieldUpdateCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11504,7 +12335,7 @@ impl<'a, C, NC, A> CreativeFieldUpdateCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11520,7 +12351,6 @@ impl<'a, C, NC, A> CreativeFieldUpdateCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -11530,7 +12360,7 @@ impl<'a, C, NC, A> CreativeFieldUpdateCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11541,7 +12371,7 @@ impl<'a, C, NC, A> CreativeFieldUpdateCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11550,13 +12380,13 @@ impl<'a, C, NC, A> CreativeFieldUpdateCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11577,7 +12407,7 @@ impl<'a, C, NC, A> CreativeFieldUpdateCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -11638,7 +12468,7 @@ impl<'a, C, NC, A> CreativeFieldUpdateCall<'a, C, NC, A> where NC: hyper::net::N /// Retrieves a list of creative fields, possibly filtered. /// /// A builder for the *list* method supported by a *creativeField* resource. -/// It is not used directly, but through a `CreativeFieldMethods`. +/// It is not used directly, but through a `CreativeFieldMethods` instance. /// /// # Example /// @@ -11739,7 +12569,7 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "profileId", "sortOrder", "sortField", "searchString", "pageToken", "maxResults", "ids", "advertiserIds"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -11792,7 +12622,7 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -11804,7 +12634,6 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -11814,7 +12643,7 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -11825,7 +12654,7 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -11834,13 +12663,13 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -11852,7 +12681,7 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -11860,7 +12689,7 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -11868,7 +12697,7 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -11876,7 +12705,7 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for creative fields by name or ID. Wildcards (*) are allowed. For example, "creativefield*2015" will return creative fields with names like "creativefield June 2015", "creativefield April 2015" or simply "creativefield 2015". Most of the searches also add wild-cards implicitly at the start and the end of the search string. For example, a search string of "creativefield" will match creative fields with the name "my creativefield", "creativefield 2015" or simply "creativefield". + /// Allows searching for creative fields by name or ID. Wildcards (*) are allowed. For example, "creativefield*2015" will return creative fields with names like "creativefield June 2015", "creativefield April 2015" or simply "creativefield 2015". Most of the searches also add wild-cards implicitly at the start and the end of the search string. For example, a search string of "creativefield" will match creative fields with the name "my creativefield", "creativefield 2015" or simply "creativefield". pub fn search_string(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -11884,7 +12713,7 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -11892,7 +12721,7 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> CreativeFieldListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -11901,7 +12730,7 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only creative fields with these IDs. + /// Select only creative fields with these IDs. pub fn add_ids(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -11910,7 +12739,7 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only creative fields that belong to these advertisers. + /// Select only creative fields that belong to these advertisers. pub fn add_advertiser_ids(mut self, new_value: &str) -> CreativeFieldListCall<'a, C, NC, A> { self._advertiser_ids.push(new_value.to_string()); self @@ -11971,7 +12800,7 @@ impl<'a, C, NC, A> CreativeFieldListCall<'a, C, NC, A> where NC: hyper::net::Net /// Deletes an existing creative field. /// /// A builder for the *delete* method supported by a *creativeField* resource. -/// It is not used directly, but through a `CreativeFieldMethods`. +/// It is not used directly, but through a `CreativeFieldMethods` instance. /// /// # Example /// @@ -12031,7 +12860,7 @@ impl<'a, C, NC, A> CreativeFieldDeleteCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12083,7 +12912,7 @@ impl<'a, C, NC, A> CreativeFieldDeleteCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12095,7 +12924,6 @@ impl<'a, C, NC, A> CreativeFieldDeleteCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -12105,7 +12933,7 @@ impl<'a, C, NC, A> CreativeFieldDeleteCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12116,12 +12944,12 @@ impl<'a, C, NC, A> CreativeFieldDeleteCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12133,7 +12961,7 @@ impl<'a, C, NC, A> CreativeFieldDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -12143,7 +12971,7 @@ impl<'a, C, NC, A> CreativeFieldDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative Field ID + /// Creative Field ID pub fn id(mut self, new_value: &str) -> CreativeFieldDeleteCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -12204,7 +13032,7 @@ impl<'a, C, NC, A> CreativeFieldDeleteCall<'a, C, NC, A> where NC: hyper::net::N /// Gets one creative field by ID. /// /// A builder for the *get* method supported by a *creativeField* resource. -/// It is not used directly, but through a `CreativeFieldMethods`. +/// It is not used directly, but through a `CreativeFieldMethods` instance. /// /// # Example /// @@ -12264,7 +13092,7 @@ impl<'a, C, NC, A> CreativeFieldGetCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12317,7 +13145,7 @@ impl<'a, C, NC, A> CreativeFieldGetCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12329,7 +13157,6 @@ impl<'a, C, NC, A> CreativeFieldGetCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -12339,7 +13166,7 @@ impl<'a, C, NC, A> CreativeFieldGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12350,7 +13177,7 @@ impl<'a, C, NC, A> CreativeFieldGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12359,13 +13186,13 @@ impl<'a, C, NC, A> CreativeFieldGetCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12377,7 +13204,7 @@ impl<'a, C, NC, A> CreativeFieldGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -12387,7 +13214,7 @@ impl<'a, C, NC, A> CreativeFieldGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative Field ID + /// Creative Field ID pub fn id(mut self, new_value: &str) -> CreativeFieldGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -12448,7 +13275,7 @@ impl<'a, C, NC, A> CreativeFieldGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Inserts a new creative field. /// /// A builder for the *insert* method supported by a *creativeField* resource. -/// It is not used directly, but through a `CreativeFieldMethods`. +/// It is not used directly, but through a `CreativeFieldMethods` instance. /// /// # Example /// @@ -12513,7 +13340,7 @@ impl<'a, C, NC, A> CreativeFieldInsertCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12570,7 +13397,7 @@ impl<'a, C, NC, A> CreativeFieldInsertCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12586,7 +13413,6 @@ impl<'a, C, NC, A> CreativeFieldInsertCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -12596,7 +13422,7 @@ impl<'a, C, NC, A> CreativeFieldInsertCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12607,7 +13433,7 @@ impl<'a, C, NC, A> CreativeFieldInsertCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12616,13 +13442,13 @@ impl<'a, C, NC, A> CreativeFieldInsertCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12643,7 +13469,7 @@ impl<'a, C, NC, A> CreativeFieldInsertCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -12704,7 +13530,7 @@ impl<'a, C, NC, A> CreativeFieldInsertCall<'a, C, NC, A> where NC: hyper::net::N /// Updates an existing creative field. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *creativeField* resource. -/// It is not used directly, but through a `CreativeFieldMethods`. +/// It is not used directly, but through a `CreativeFieldMethods` instance. /// /// # Example /// @@ -12771,7 +13597,7 @@ impl<'a, C, NC, A> CreativeFieldPatchCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -12828,7 +13654,7 @@ impl<'a, C, NC, A> CreativeFieldPatchCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -12844,7 +13670,6 @@ impl<'a, C, NC, A> CreativeFieldPatchCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -12854,7 +13679,7 @@ impl<'a, C, NC, A> CreativeFieldPatchCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -12865,7 +13690,7 @@ impl<'a, C, NC, A> CreativeFieldPatchCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -12874,13 +13699,13 @@ impl<'a, C, NC, A> CreativeFieldPatchCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -12901,7 +13726,7 @@ impl<'a, C, NC, A> CreativeFieldPatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -12911,7 +13736,7 @@ impl<'a, C, NC, A> CreativeFieldPatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative Field ID + /// Creative Field ID pub fn id(mut self, new_value: &str) -> CreativeFieldPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -12972,7 +13797,7 @@ impl<'a, C, NC, A> CreativeFieldPatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Inserts a new user role. /// /// A builder for the *insert* method supported by a *userRole* resource. -/// It is not used directly, but through a `UserRoleMethods`. +/// It is not used directly, but through a `UserRoleMethods` instance. /// /// # Example /// @@ -13037,7 +13862,7 @@ impl<'a, C, NC, A> UserRoleInsertCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13094,7 +13919,7 @@ impl<'a, C, NC, A> UserRoleInsertCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13110,7 +13935,6 @@ impl<'a, C, NC, A> UserRoleInsertCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -13120,7 +13944,7 @@ impl<'a, C, NC, A> UserRoleInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13131,7 +13955,7 @@ impl<'a, C, NC, A> UserRoleInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13140,13 +13964,13 @@ impl<'a, C, NC, A> UserRoleInsertCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13167,7 +13991,7 @@ impl<'a, C, NC, A> UserRoleInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRoleInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -13228,7 +14052,7 @@ impl<'a, C, NC, A> UserRoleInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Gets one user role by ID. /// /// A builder for the *get* method supported by a *userRole* resource. -/// It is not used directly, but through a `UserRoleMethods`. +/// It is not used directly, but through a `UserRoleMethods` instance. /// /// # Example /// @@ -13288,7 +14112,7 @@ impl<'a, C, NC, A> UserRoleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13341,7 +14165,7 @@ impl<'a, C, NC, A> UserRoleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13353,7 +14177,6 @@ impl<'a, C, NC, A> UserRoleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -13363,7 +14186,7 @@ impl<'a, C, NC, A> UserRoleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13374,7 +14197,7 @@ impl<'a, C, NC, A> UserRoleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13383,13 +14206,13 @@ impl<'a, C, NC, A> UserRoleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13401,7 +14224,7 @@ impl<'a, C, NC, A> UserRoleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRoleGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -13411,7 +14234,7 @@ impl<'a, C, NC, A> UserRoleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User role ID. + /// User role ID. pub fn id(mut self, new_value: &str) -> UserRoleGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -13472,7 +14295,7 @@ impl<'a, C, NC, A> UserRoleGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Updates an existing user role. /// /// A builder for the *update* method supported by a *userRole* resource. -/// It is not used directly, but through a `UserRoleMethods`. +/// It is not used directly, but through a `UserRoleMethods` instance. /// /// # Example /// @@ -13537,7 +14360,7 @@ impl<'a, C, NC, A> UserRoleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13594,7 +14417,7 @@ impl<'a, C, NC, A> UserRoleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13610,7 +14433,6 @@ impl<'a, C, NC, A> UserRoleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -13620,7 +14442,7 @@ impl<'a, C, NC, A> UserRoleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13631,7 +14453,7 @@ impl<'a, C, NC, A> UserRoleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -13640,13 +14462,13 @@ impl<'a, C, NC, A> UserRoleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13667,7 +14489,7 @@ impl<'a, C, NC, A> UserRoleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRoleUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -13728,7 +14550,7 @@ impl<'a, C, NC, A> UserRoleUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Deletes an existing user role. /// /// A builder for the *delete* method supported by a *userRole* resource. -/// It is not used directly, but through a `UserRoleMethods`. +/// It is not used directly, but through a `UserRoleMethods` instance. /// /// # Example /// @@ -13788,7 +14610,7 @@ impl<'a, C, NC, A> UserRoleDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -13840,7 +14662,7 @@ impl<'a, C, NC, A> UserRoleDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -13852,7 +14674,6 @@ impl<'a, C, NC, A> UserRoleDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -13862,7 +14683,7 @@ impl<'a, C, NC, A> UserRoleDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -13873,12 +14694,12 @@ impl<'a, C, NC, A> UserRoleDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -13890,7 +14711,7 @@ impl<'a, C, NC, A> UserRoleDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRoleDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -13900,7 +14721,7 @@ impl<'a, C, NC, A> UserRoleDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User role ID. + /// User role ID. pub fn id(mut self, new_value: &str) -> UserRoleDeleteCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -13961,7 +14782,7 @@ impl<'a, C, NC, A> UserRoleDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Updates an existing user role. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *userRole* resource. -/// It is not used directly, but through a `UserRoleMethods`. +/// It is not used directly, but through a `UserRoleMethods` instance. /// /// # Example /// @@ -14028,7 +14849,7 @@ impl<'a, C, NC, A> UserRolePatchCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14085,7 +14906,7 @@ impl<'a, C, NC, A> UserRolePatchCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14101,7 +14922,6 @@ impl<'a, C, NC, A> UserRolePatchCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -14111,7 +14931,7 @@ impl<'a, C, NC, A> UserRolePatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14122,7 +14942,7 @@ impl<'a, C, NC, A> UserRolePatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14131,13 +14951,13 @@ impl<'a, C, NC, A> UserRolePatchCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14158,7 +14978,7 @@ impl<'a, C, NC, A> UserRolePatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRolePatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -14168,7 +14988,7 @@ impl<'a, C, NC, A> UserRolePatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User role ID. + /// User role ID. pub fn id(mut self, new_value: &str) -> UserRolePatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -14229,7 +15049,7 @@ impl<'a, C, NC, A> UserRolePatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Retrieves a list of user roles, possibly filtered. /// /// A builder for the *list* method supported by a *userRole* resource. -/// It is not used directly, but through a `UserRoleMethods`. +/// It is not used directly, but through a `UserRoleMethods` instance. /// /// # Example /// @@ -14331,7 +15151,7 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "profileId", "subaccountId", "sortOrder", "sortField", "searchString", "pageToken", "maxResults", "ids", "accountUserRoleOnly"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14384,7 +15204,7 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14396,7 +15216,6 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -14406,7 +15225,7 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14417,7 +15236,7 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14426,13 +15245,13 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14444,7 +15263,7 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRoleListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -14452,7 +15271,7 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *subaccount id* query property to the given value. /// /// - /// Select only user roles that belong to this subaccount. + /// Select only user roles that belong to this subaccount. pub fn subaccount_id(mut self, new_value: &str) -> UserRoleListCall<'a, C, NC, A> { self._subaccount_id = Some(new_value.to_string()); self @@ -14460,7 +15279,7 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> UserRoleListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -14468,7 +15287,7 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> UserRoleListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -14476,7 +15295,7 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "userrole*2015" will return objects with names like "userrole June 2015", "userrole April 2015" or simply "userrole 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "userrole" will match objects with name "my userrole", "userrole 2015" or simply "userrole". + /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "userrole*2015" will return objects with names like "userrole June 2015", "userrole April 2015" or simply "userrole 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "userrole" will match objects with name "my userrole", "userrole 2015" or simply "userrole". pub fn search_string(mut self, new_value: &str) -> UserRoleListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -14484,7 +15303,7 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> UserRoleListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -14492,7 +15311,7 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> UserRoleListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -14501,7 +15320,7 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only user roles with the specified IDs. + /// Select only user roles with the specified IDs. pub fn add_ids(mut self, new_value: &str) -> UserRoleListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -14509,7 +15328,7 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *account user role only* query property to the given value. /// /// - /// Select only account level user roles not associated with any specific subaccount. + /// Select only account level user roles not associated with any specific subaccount. pub fn account_user_role_only(mut self, new_value: bool) -> UserRoleListCall<'a, C, NC, A> { self._account_user_role_only = Some(new_value); self @@ -14570,7 +15389,7 @@ impl<'a, C, NC, A> UserRoleListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Retrieves a list of operating system versions. /// /// A builder for the *list* method supported by a *operatingSystemVersion* resource. -/// It is not used directly, but through a `OperatingSystemVersionMethods`. +/// It is not used directly, but through a `OperatingSystemVersionMethods` instance. /// /// # Example /// @@ -14628,7 +15447,7 @@ impl<'a, C, NC, A> OperatingSystemVersionListCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14681,7 +15500,7 @@ impl<'a, C, NC, A> OperatingSystemVersionListCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14693,7 +15512,6 @@ impl<'a, C, NC, A> OperatingSystemVersionListCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -14703,7 +15521,7 @@ impl<'a, C, NC, A> OperatingSystemVersionListCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14714,7 +15532,7 @@ impl<'a, C, NC, A> OperatingSystemVersionListCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14723,13 +15541,13 @@ impl<'a, C, NC, A> OperatingSystemVersionListCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14741,7 +15559,7 @@ impl<'a, C, NC, A> OperatingSystemVersionListCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> OperatingSystemVersionListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -14802,7 +15620,7 @@ impl<'a, C, NC, A> OperatingSystemVersionListCall<'a, C, NC, A> where NC: hyper: /// Gets one campaign landing page by ID. /// /// A builder for the *get* method supported by a *landingPage* resource. -/// It is not used directly, but through a `LandingPageMethods`. +/// It is not used directly, but through a `LandingPageMethods` instance. /// /// # Example /// @@ -14864,7 +15682,7 @@ impl<'a, C, NC, A> LandingPageGetCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId", "campaignId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -14917,7 +15735,7 @@ impl<'a, C, NC, A> LandingPageGetCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -14929,7 +15747,6 @@ impl<'a, C, NC, A> LandingPageGetCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -14939,7 +15756,7 @@ impl<'a, C, NC, A> LandingPageGetCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -14950,7 +15767,7 @@ impl<'a, C, NC, A> LandingPageGetCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -14959,13 +15776,13 @@ impl<'a, C, NC, A> LandingPageGetCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -14977,7 +15794,7 @@ impl<'a, C, NC, A> LandingPageGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> LandingPageGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -14987,7 +15804,7 @@ impl<'a, C, NC, A> LandingPageGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Landing page campaign ID. + /// Landing page campaign ID. pub fn campaign_id(mut self, new_value: &str) -> LandingPageGetCall<'a, C, NC, A> { self._campaign_id = new_value.to_string(); self @@ -14997,7 +15814,7 @@ impl<'a, C, NC, A> LandingPageGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Landing page ID. + /// Landing page ID. pub fn id(mut self, new_value: &str) -> LandingPageGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -15058,7 +15875,7 @@ impl<'a, C, NC, A> LandingPageGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Updates an existing campaign landing page. /// /// A builder for the *update* method supported by a *landingPage* resource. -/// It is not used directly, but through a `LandingPageMethods`. +/// It is not used directly, but through a `LandingPageMethods` instance. /// /// # Example /// @@ -15125,7 +15942,7 @@ impl<'a, C, NC, A> LandingPageUpdateCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "profileId", "campaignId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15182,7 +15999,7 @@ impl<'a, C, NC, A> LandingPageUpdateCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15198,7 +16015,6 @@ impl<'a, C, NC, A> LandingPageUpdateCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -15208,7 +16024,7 @@ impl<'a, C, NC, A> LandingPageUpdateCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15219,7 +16035,7 @@ impl<'a, C, NC, A> LandingPageUpdateCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15228,13 +16044,13 @@ impl<'a, C, NC, A> LandingPageUpdateCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15255,7 +16071,7 @@ impl<'a, C, NC, A> LandingPageUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> LandingPageUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -15265,7 +16081,7 @@ impl<'a, C, NC, A> LandingPageUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Landing page campaign ID. + /// Landing page campaign ID. pub fn campaign_id(mut self, new_value: &str) -> LandingPageUpdateCall<'a, C, NC, A> { self._campaign_id = new_value.to_string(); self @@ -15326,7 +16142,7 @@ impl<'a, C, NC, A> LandingPageUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Retrieves the list of landing pages for the specified campaign. /// /// A builder for the *list* method supported by a *landingPage* resource. -/// It is not used directly, but through a `LandingPageMethods`. +/// It is not used directly, but through a `LandingPageMethods` instance. /// /// # Example /// @@ -15386,7 +16202,7 @@ impl<'a, C, NC, A> LandingPageListCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "profileId", "campaignId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15439,7 +16255,7 @@ impl<'a, C, NC, A> LandingPageListCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15451,7 +16267,6 @@ impl<'a, C, NC, A> LandingPageListCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -15461,7 +16276,7 @@ impl<'a, C, NC, A> LandingPageListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15472,7 +16287,7 @@ impl<'a, C, NC, A> LandingPageListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15481,13 +16296,13 @@ impl<'a, C, NC, A> LandingPageListCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15499,7 +16314,7 @@ impl<'a, C, NC, A> LandingPageListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> LandingPageListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -15509,7 +16324,7 @@ impl<'a, C, NC, A> LandingPageListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Landing page campaign ID. + /// Landing page campaign ID. pub fn campaign_id(mut self, new_value: &str) -> LandingPageListCall<'a, C, NC, A> { self._campaign_id = new_value.to_string(); self @@ -15570,7 +16385,7 @@ impl<'a, C, NC, A> LandingPageListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Inserts a new landing page for the specified campaign. /// /// A builder for the *insert* method supported by a *landingPage* resource. -/// It is not used directly, but through a `LandingPageMethods`. +/// It is not used directly, but through a `LandingPageMethods` instance. /// /// # Example /// @@ -15637,7 +16452,7 @@ impl<'a, C, NC, A> LandingPageInsertCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "profileId", "campaignId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15694,7 +16509,7 @@ impl<'a, C, NC, A> LandingPageInsertCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15710,7 +16525,6 @@ impl<'a, C, NC, A> LandingPageInsertCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -15720,7 +16534,7 @@ impl<'a, C, NC, A> LandingPageInsertCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -15731,7 +16545,7 @@ impl<'a, C, NC, A> LandingPageInsertCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -15740,13 +16554,13 @@ impl<'a, C, NC, A> LandingPageInsertCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -15767,7 +16581,7 @@ impl<'a, C, NC, A> LandingPageInsertCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> LandingPageInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -15777,7 +16591,7 @@ impl<'a, C, NC, A> LandingPageInsertCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Landing page campaign ID. + /// Landing page campaign ID. pub fn campaign_id(mut self, new_value: &str) -> LandingPageInsertCall<'a, C, NC, A> { self._campaign_id = new_value.to_string(); self @@ -15838,7 +16652,7 @@ impl<'a, C, NC, A> LandingPageInsertCall<'a, C, NC, A> where NC: hyper::net::Net /// Updates an existing campaign landing page. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *landingPage* resource. -/// It is not used directly, but through a `LandingPageMethods`. +/// It is not used directly, but through a `LandingPageMethods` instance. /// /// # Example /// @@ -15907,7 +16721,7 @@ impl<'a, C, NC, A> LandingPagePatchCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "profileId", "campaignId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -15964,7 +16778,7 @@ impl<'a, C, NC, A> LandingPagePatchCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -15980,7 +16794,6 @@ impl<'a, C, NC, A> LandingPagePatchCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -15990,7 +16803,7 @@ impl<'a, C, NC, A> LandingPagePatchCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16001,7 +16814,7 @@ impl<'a, C, NC, A> LandingPagePatchCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16010,13 +16823,13 @@ impl<'a, C, NC, A> LandingPagePatchCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16037,7 +16850,7 @@ impl<'a, C, NC, A> LandingPagePatchCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> LandingPagePatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -16047,7 +16860,7 @@ impl<'a, C, NC, A> LandingPagePatchCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Landing page campaign ID. + /// Landing page campaign ID. pub fn campaign_id(mut self, new_value: &str) -> LandingPagePatchCall<'a, C, NC, A> { self._campaign_id = new_value.to_string(); self @@ -16057,7 +16870,7 @@ impl<'a, C, NC, A> LandingPagePatchCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Landing page ID. + /// Landing page ID. pub fn id(mut self, new_value: &str) -> LandingPagePatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -16118,7 +16931,7 @@ impl<'a, C, NC, A> LandingPagePatchCall<'a, C, NC, A> where NC: hyper::net::Netw /// Deletes an existing campaign landing page. /// /// A builder for the *delete* method supported by a *landingPage* resource. -/// It is not used directly, but through a `LandingPageMethods`. +/// It is not used directly, but through a `LandingPageMethods` instance. /// /// # Example /// @@ -16180,7 +16993,7 @@ impl<'a, C, NC, A> LandingPageDeleteCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["profileId", "campaignId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16232,7 +17045,7 @@ impl<'a, C, NC, A> LandingPageDeleteCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16244,7 +17057,6 @@ impl<'a, C, NC, A> LandingPageDeleteCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -16254,7 +17066,7 @@ impl<'a, C, NC, A> LandingPageDeleteCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16265,12 +17077,12 @@ impl<'a, C, NC, A> LandingPageDeleteCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16282,7 +17094,7 @@ impl<'a, C, NC, A> LandingPageDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> LandingPageDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -16292,7 +17104,7 @@ impl<'a, C, NC, A> LandingPageDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Landing page campaign ID. + /// Landing page campaign ID. pub fn campaign_id(mut self, new_value: &str) -> LandingPageDeleteCall<'a, C, NC, A> { self._campaign_id = new_value.to_string(); self @@ -16302,7 +17114,7 @@ impl<'a, C, NC, A> LandingPageDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Landing page ID. + /// Landing page ID. pub fn id(mut self, new_value: &str) -> LandingPageDeleteCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -16363,7 +17175,7 @@ impl<'a, C, NC, A> LandingPageDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Associates a creative with the specified campaign. This method creates a default ad with dimensions matching the creative in the campaign if such a default ad does not exist already. /// /// A builder for the *insert* method supported by a *campaignCreativeAssociation* resource. -/// It is not used directly, but through a `CampaignCreativeAssociationMethods`. +/// It is not used directly, but through a `CampaignCreativeAssociationMethods` instance. /// /// # Example /// @@ -16430,7 +17242,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationInsertCall<'a, C, NC, A> where NC: for &field in ["alt", "profileId", "campaignId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16487,7 +17299,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationInsertCall<'a, C, NC, A> where NC: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16503,7 +17315,6 @@ impl<'a, C, NC, A> CampaignCreativeAssociationInsertCall<'a, C, NC, A> where NC: dlg.pre_request(); req.send() - }; match req_result { @@ -16513,7 +17324,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationInsertCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16524,7 +17335,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationInsertCall<'a, C, NC, A> where NC: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16533,13 +17344,13 @@ impl<'a, C, NC, A> CampaignCreativeAssociationInsertCall<'a, C, NC, A> where NC: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16560,7 +17371,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationInsertCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CampaignCreativeAssociationInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -16570,7 +17381,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationInsertCall<'a, C, NC, A> where NC: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Campaign ID in this association. + /// Campaign ID in this association. pub fn campaign_id(mut self, new_value: &str) -> CampaignCreativeAssociationInsertCall<'a, C, NC, A> { self._campaign_id = new_value.to_string(); self @@ -16631,7 +17442,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationInsertCall<'a, C, NC, A> where NC: /// Retrieves the list of creative IDs associated with the specified campaign. /// /// A builder for the *list* method supported by a *campaignCreativeAssociation* resource. -/// It is not used directly, but through a `CampaignCreativeAssociationMethods`. +/// It is not used directly, but through a `CampaignCreativeAssociationMethods` instance. /// /// # Example /// @@ -16706,7 +17517,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationListCall<'a, C, NC, A> where NC: h for &field in ["alt", "profileId", "campaignId", "sortOrder", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -16759,7 +17570,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationListCall<'a, C, NC, A> where NC: h } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -16771,7 +17582,6 @@ impl<'a, C, NC, A> CampaignCreativeAssociationListCall<'a, C, NC, A> where NC: h dlg.pre_request(); req.send() - }; match req_result { @@ -16781,7 +17591,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationListCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -16792,7 +17602,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationListCall<'a, C, NC, A> where NC: h continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -16801,13 +17611,13 @@ impl<'a, C, NC, A> CampaignCreativeAssociationListCall<'a, C, NC, A> where NC: h Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -16819,7 +17629,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationListCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CampaignCreativeAssociationListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -16829,7 +17639,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationListCall<'a, C, NC, A> where NC: h /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Campaign ID in this association. + /// Campaign ID in this association. pub fn campaign_id(mut self, new_value: &str) -> CampaignCreativeAssociationListCall<'a, C, NC, A> { self._campaign_id = new_value.to_string(); self @@ -16837,7 +17647,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationListCall<'a, C, NC, A> where NC: h /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> CampaignCreativeAssociationListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -16845,7 +17655,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationListCall<'a, C, NC, A> where NC: h /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> CampaignCreativeAssociationListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -16853,7 +17663,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationListCall<'a, C, NC, A> where NC: h /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> CampaignCreativeAssociationListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -16914,7 +17724,7 @@ impl<'a, C, NC, A> CampaignCreativeAssociationListCall<'a, C, NC, A> where NC: h /// Retrieves a list of change logs. /// /// A builder for the *list* method supported by a *changeLog* resource. -/// It is not used directly, but through a `ChangeLogMethods`. +/// It is not used directly, but through a `ChangeLogMethods` instance. /// /// # Example /// @@ -17034,7 +17844,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "profileId", "userProfileIds", "searchString", "pageToken", "objectType", "objectIds", "minChangeTime", "maxResults", "maxChangeTime", "ids", "action"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17087,7 +17897,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17099,7 +17909,6 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -17109,7 +17918,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17120,7 +17929,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -17129,13 +17938,13 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -17147,7 +17956,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> ChangeLogListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -17156,7 +17965,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only change logs with these user profile IDs. + /// Select only change logs with these user profile IDs. pub fn add_user_profile_ids(mut self, new_value: &str) -> ChangeLogListCall<'a, C, NC, A> { self._user_profile_ids.push(new_value.to_string()); self @@ -17164,7 +17973,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *search string* query property to the given value. /// /// - /// Select only change logs whose object ID, user name, old or new values match the search string. + /// Select only change logs whose object ID, user name, old or new values match the search string. pub fn search_string(mut self, new_value: &str) -> ChangeLogListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -17172,7 +17981,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> ChangeLogListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -17180,7 +17989,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *object type* query property to the given value. /// /// - /// Select only change logs with the specified object type. + /// Select only change logs with the specified object type. pub fn object_type(mut self, new_value: &str) -> ChangeLogListCall<'a, C, NC, A> { self._object_type = Some(new_value.to_string()); self @@ -17189,7 +17998,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only change logs with these object IDs. + /// Select only change logs with these object IDs. pub fn add_object_ids(mut self, new_value: &str) -> ChangeLogListCall<'a, C, NC, A> { self._object_ids.push(new_value.to_string()); self @@ -17197,7 +18006,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *min change time* query property to the given value. /// /// - /// Select only change logs whose change time is before the specified minChangeTime.The time should be formatted as an RFC3339 date/time string. For example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In other words, the year, month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset. + /// Select only change logs whose change time is before the specified minChangeTime.The time should be formatted as an RFC3339 date/time string. For example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In other words, the year, month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset. pub fn min_change_time(mut self, new_value: &str) -> ChangeLogListCall<'a, C, NC, A> { self._min_change_time = Some(new_value.to_string()); self @@ -17205,7 +18014,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> ChangeLogListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -17213,7 +18022,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *max change time* query property to the given value. /// /// - /// Select only change logs whose change time is before the specified maxChangeTime.The time should be formatted as an RFC3339 date/time string. For example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In other words, the year, month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset. + /// Select only change logs whose change time is before the specified maxChangeTime.The time should be formatted as an RFC3339 date/time string. For example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In other words, the year, month, day, the letter T, the hour (24-hour clock system), minute, second, and then the time zone offset. pub fn max_change_time(mut self, new_value: &str) -> ChangeLogListCall<'a, C, NC, A> { self._max_change_time = Some(new_value.to_string()); self @@ -17222,7 +18031,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only change logs with these IDs. + /// Select only change logs with these IDs. pub fn add_ids(mut self, new_value: &str) -> ChangeLogListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -17230,7 +18039,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *action* query property to the given value. /// /// - /// Select only change logs with the specified action. + /// Select only change logs with the specified action. pub fn action(mut self, new_value: &str) -> ChangeLogListCall<'a, C, NC, A> { self._action = Some(new_value.to_string()); self @@ -17291,7 +18100,7 @@ impl<'a, C, NC, A> ChangeLogListCall<'a, C, NC, A> where NC: hyper::net::Network /// Gets one change log by ID. /// /// A builder for the *get* method supported by a *changeLog* resource. -/// It is not used directly, but through a `ChangeLogMethods`. +/// It is not used directly, but through a `ChangeLogMethods` instance. /// /// # Example /// @@ -17351,7 +18160,7 @@ impl<'a, C, NC, A> ChangeLogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17404,7 +18213,7 @@ impl<'a, C, NC, A> ChangeLogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17416,7 +18225,6 @@ impl<'a, C, NC, A> ChangeLogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -17426,7 +18234,7 @@ impl<'a, C, NC, A> ChangeLogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17437,7 +18245,7 @@ impl<'a, C, NC, A> ChangeLogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -17446,13 +18254,13 @@ impl<'a, C, NC, A> ChangeLogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -17464,7 +18272,7 @@ impl<'a, C, NC, A> ChangeLogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> ChangeLogGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -17474,7 +18282,7 @@ impl<'a, C, NC, A> ChangeLogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Change log ID. + /// Change log ID. pub fn id(mut self, new_value: &str) -> ChangeLogGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -17535,7 +18343,7 @@ impl<'a, C, NC, A> ChangeLogGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Gets one account by ID. /// /// A builder for the *get* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -17595,7 +18403,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17648,7 +18456,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17660,7 +18468,6 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -17670,7 +18477,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17681,7 +18488,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -17690,13 +18497,13 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -17708,7 +18515,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -17718,7 +18525,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID. + /// Account ID. pub fn id(mut self, new_value: &str) -> AccountGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -17779,7 +18586,7 @@ impl<'a, C, NC, A> AccountGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Retrieves the list of accounts, possibly filtered. /// /// A builder for the *list* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -17876,7 +18683,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "profileId", "sortOrder", "sortField", "searchString", "pageToken", "maxResults", "ids", "active"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -17929,7 +18736,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -17941,7 +18748,6 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -17951,7 +18757,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -17962,7 +18768,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -17971,13 +18777,13 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -17989,7 +18795,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -17997,7 +18803,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> AccountListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -18005,7 +18811,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> AccountListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -18013,7 +18819,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "account*2015" will return objects with names like "account June 2015", "account April 2015" or simply "account 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "account" will match objects with name "my account", "account 2015" or simply "account". + /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "account*2015" will return objects with names like "account June 2015", "account April 2015" or simply "account 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "account" will match objects with name "my account", "account 2015" or simply "account". pub fn search_string(mut self, new_value: &str) -> AccountListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -18021,7 +18827,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> AccountListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -18029,7 +18835,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> AccountListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -18038,7 +18844,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only accounts with these IDs. + /// Select only accounts with these IDs. pub fn add_ids(mut self, new_value: &str) -> AccountListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -18046,7 +18852,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Sets the *active* query property to the given value. /// /// - /// Select only active accounts. Don't set this field to select both active and non-active accounts. + /// Select only active accounts. Don't set this field to select both active and non-active accounts. pub fn active(mut self, new_value: bool) -> AccountListCall<'a, C, NC, A> { self._active = Some(new_value); self @@ -18107,7 +18913,7 @@ impl<'a, C, NC, A> AccountListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Updates an existing account. /// /// A builder for the *update* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -18172,7 +18978,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18229,7 +19035,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18245,7 +19051,6 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -18255,7 +19060,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18266,7 +19071,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -18275,13 +19080,13 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18302,7 +19107,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -18363,7 +19168,7 @@ impl<'a, C, NC, A> AccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Network /// Updates an existing account. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *account* resource. -/// It is not used directly, but through a `AccountMethods`. +/// It is not used directly, but through a `AccountMethods` instance. /// /// # Example /// @@ -18430,7 +19235,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18487,7 +19292,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18503,7 +19308,6 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -18513,7 +19317,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18524,7 +19328,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -18533,13 +19337,13 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18560,7 +19364,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -18570,7 +19374,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID. + /// Account ID. pub fn id(mut self, new_value: &str) -> AccountPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -18631,7 +19435,7 @@ impl<'a, C, NC, A> AccountPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Retrieves a list of postal codes. /// /// A builder for the *list* method supported by a *postalCode* resource. -/// It is not used directly, but through a `PostalCodeMethods`. +/// It is not used directly, but through a `PostalCodeMethods` instance. /// /// # Example /// @@ -18689,7 +19493,7 @@ impl<'a, C, NC, A> PostalCodeListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18742,7 +19546,7 @@ impl<'a, C, NC, A> PostalCodeListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -18754,7 +19558,6 @@ impl<'a, C, NC, A> PostalCodeListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -18764,7 +19567,7 @@ impl<'a, C, NC, A> PostalCodeListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -18775,7 +19578,7 @@ impl<'a, C, NC, A> PostalCodeListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -18784,13 +19587,13 @@ impl<'a, C, NC, A> PostalCodeListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -18802,7 +19605,7 @@ impl<'a, C, NC, A> PostalCodeListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PostalCodeListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -18863,7 +19666,7 @@ impl<'a, C, NC, A> PostalCodeListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Inserts a new advertiser. /// /// A builder for the *insert* method supported by a *advertiser* resource. -/// It is not used directly, but through a `AdvertiserMethods`. +/// It is not used directly, but through a `AdvertiserMethods` instance. /// /// # Example /// @@ -18928,7 +19731,7 @@ impl<'a, C, NC, A> AdvertiserInsertCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -18985,7 +19788,7 @@ impl<'a, C, NC, A> AdvertiserInsertCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19001,7 +19804,6 @@ impl<'a, C, NC, A> AdvertiserInsertCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -19011,7 +19813,7 @@ impl<'a, C, NC, A> AdvertiserInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19022,7 +19824,7 @@ impl<'a, C, NC, A> AdvertiserInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19031,13 +19833,13 @@ impl<'a, C, NC, A> AdvertiserInsertCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19058,7 +19860,7 @@ impl<'a, C, NC, A> AdvertiserInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -19119,7 +19921,7 @@ impl<'a, C, NC, A> AdvertiserInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Updates an existing advertiser. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *advertiser* resource. -/// It is not used directly, but through a `AdvertiserMethods`. +/// It is not used directly, but through a `AdvertiserMethods` instance. /// /// # Example /// @@ -19186,7 +19988,7 @@ impl<'a, C, NC, A> AdvertiserPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19243,7 +20045,7 @@ impl<'a, C, NC, A> AdvertiserPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19259,7 +20061,6 @@ impl<'a, C, NC, A> AdvertiserPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -19269,7 +20070,7 @@ impl<'a, C, NC, A> AdvertiserPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19280,7 +20081,7 @@ impl<'a, C, NC, A> AdvertiserPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19289,13 +20090,13 @@ impl<'a, C, NC, A> AdvertiserPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19316,7 +20117,7 @@ impl<'a, C, NC, A> AdvertiserPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -19326,7 +20127,7 @@ impl<'a, C, NC, A> AdvertiserPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Advertiser ID. + /// Advertiser ID. pub fn id(mut self, new_value: &str) -> AdvertiserPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -19387,7 +20188,7 @@ impl<'a, C, NC, A> AdvertiserPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Retrieves a list of advertisers, possibly filtered. /// /// A builder for the *list* method supported by a *advertiser* resource. -/// It is not used directly, but through a `AdvertiserMethods`. +/// It is not used directly, but through a `AdvertiserMethods` instance. /// /// # Example /// @@ -19517,7 +20318,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId", "subaccountId", "status", "sortOrder", "sortField", "searchString", "pageToken", "onlyParent", "maxResults", "includeAdvertisersWithoutGroupsOnly", "ids", "floodlightConfigurationIds", "advertiserGroupIds"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19570,7 +20371,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19582,7 +20383,6 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -19592,7 +20392,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19603,7 +20403,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19612,13 +20412,13 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19630,7 +20430,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -19638,7 +20438,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *subaccount id* query property to the given value. /// /// - /// Select only advertisers with these subaccount IDs. + /// Select only advertisers with these subaccount IDs. pub fn subaccount_id(mut self, new_value: &str) -> AdvertiserListCall<'a, C, NC, A> { self._subaccount_id = Some(new_value.to_string()); self @@ -19646,7 +20446,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *status* query property to the given value. /// /// - /// Select only advertisers with the specified status. + /// Select only advertisers with the specified status. pub fn status(mut self, new_value: &str) -> AdvertiserListCall<'a, C, NC, A> { self._status = Some(new_value.to_string()); self @@ -19654,7 +20454,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> AdvertiserListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -19662,7 +20462,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> AdvertiserListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -19670,7 +20470,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "advertiser*2015" will return objects with names like "advertiser June 2015", "advertiser April 2015" or simply "advertiser 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "advertiser" will match objects with name "my advertiser", "advertiser 2015" or simply "advertiser". + /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "advertiser*2015" will return objects with names like "advertiser June 2015", "advertiser April 2015" or simply "advertiser 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "advertiser" will match objects with name "my advertiser", "advertiser 2015" or simply "advertiser". pub fn search_string(mut self, new_value: &str) -> AdvertiserListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -19678,7 +20478,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> AdvertiserListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -19686,7 +20486,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *only parent* query property to the given value. /// /// - /// Select only advertisers which use another advertiser's floodlight configuration. + /// Select only advertisers which use another advertiser's floodlight configuration. pub fn only_parent(mut self, new_value: bool) -> AdvertiserListCall<'a, C, NC, A> { self._only_parent = Some(new_value); self @@ -19694,7 +20494,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> AdvertiserListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -19702,7 +20502,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *include advertisers without groups only* query property to the given value. /// /// - /// Select only advertisers which do not belong to any advertiser group. + /// Select only advertisers which do not belong to any advertiser group. pub fn include_advertisers_without_groups_only(mut self, new_value: bool) -> AdvertiserListCall<'a, C, NC, A> { self._include_advertisers_without_groups_only = Some(new_value); self @@ -19711,7 +20511,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only advertisers with these IDs. + /// Select only advertisers with these IDs. pub fn add_ids(mut self, new_value: &str) -> AdvertiserListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -19720,7 +20520,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only advertisers with these floodlight configuration IDs. + /// Select only advertisers with these floodlight configuration IDs. pub fn add_floodlight_configuration_ids(mut self, new_value: &str) -> AdvertiserListCall<'a, C, NC, A> { self._floodlight_configuration_ids.push(new_value.to_string()); self @@ -19729,7 +20529,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only advertisers with these advertiser group IDs. + /// Select only advertisers with these advertiser group IDs. pub fn add_advertiser_group_ids(mut self, new_value: &str) -> AdvertiserListCall<'a, C, NC, A> { self._advertiser_group_ids.push(new_value.to_string()); self @@ -19790,7 +20590,7 @@ impl<'a, C, NC, A> AdvertiserListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Updates an existing advertiser. /// /// A builder for the *update* method supported by a *advertiser* resource. -/// It is not used directly, but through a `AdvertiserMethods`. +/// It is not used directly, but through a `AdvertiserMethods` instance. /// /// # Example /// @@ -19855,7 +20655,7 @@ impl<'a, C, NC, A> AdvertiserUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -19912,7 +20712,7 @@ impl<'a, C, NC, A> AdvertiserUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -19928,7 +20728,6 @@ impl<'a, C, NC, A> AdvertiserUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -19938,7 +20737,7 @@ impl<'a, C, NC, A> AdvertiserUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -19949,7 +20748,7 @@ impl<'a, C, NC, A> AdvertiserUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -19958,13 +20757,13 @@ impl<'a, C, NC, A> AdvertiserUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -19985,7 +20784,7 @@ impl<'a, C, NC, A> AdvertiserUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -20046,7 +20845,7 @@ impl<'a, C, NC, A> AdvertiserUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Gets one advertiser by ID. /// /// A builder for the *get* method supported by a *advertiser* resource. -/// It is not used directly, but through a `AdvertiserMethods`. +/// It is not used directly, but through a `AdvertiserMethods` instance. /// /// # Example /// @@ -20106,7 +20905,7 @@ impl<'a, C, NC, A> AdvertiserGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -20159,7 +20958,7 @@ impl<'a, C, NC, A> AdvertiserGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -20171,7 +20970,6 @@ impl<'a, C, NC, A> AdvertiserGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -20181,7 +20979,7 @@ impl<'a, C, NC, A> AdvertiserGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -20192,7 +20990,7 @@ impl<'a, C, NC, A> AdvertiserGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -20201,13 +20999,13 @@ impl<'a, C, NC, A> AdvertiserGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -20219,7 +21017,7 @@ impl<'a, C, NC, A> AdvertiserGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -20229,7 +21027,7 @@ impl<'a, C, NC, A> AdvertiserGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Advertiser ID. + /// Advertiser ID. pub fn id(mut self, new_value: &str) -> AdvertiserGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -20290,7 +21088,7 @@ impl<'a, C, NC, A> AdvertiserGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Retrieves list of report dimension values for a list of filters. /// /// A builder for the *query* method supported by a *dimensionValue* resource. -/// It is not used directly, but through a `DimensionValueMethods`. +/// It is not used directly, but through a `DimensionValueMethods` instance. /// /// # Example /// @@ -20365,7 +21163,7 @@ impl<'a, C, NC, A> DimensionValueQueryCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "profileId", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -20422,7 +21220,7 @@ impl<'a, C, NC, A> DimensionValueQueryCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -20438,7 +21236,6 @@ impl<'a, C, NC, A> DimensionValueQueryCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -20448,7 +21245,7 @@ impl<'a, C, NC, A> DimensionValueQueryCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -20459,7 +21256,7 @@ impl<'a, C, NC, A> DimensionValueQueryCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -20468,13 +21265,13 @@ impl<'a, C, NC, A> DimensionValueQueryCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -20495,7 +21292,7 @@ impl<'a, C, NC, A> DimensionValueQueryCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The DFA user profile ID. + /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> DimensionValueQueryCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -20503,7 +21300,7 @@ impl<'a, C, NC, A> DimensionValueQueryCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *page token* query property to the given value. /// /// - /// The value of the nextToken from the previous result page. + /// The value of the nextToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> DimensionValueQueryCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -20511,7 +21308,7 @@ impl<'a, C, NC, A> DimensionValueQueryCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> DimensionValueQueryCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -20572,7 +21369,7 @@ impl<'a, C, NC, A> DimensionValueQueryCall<'a, C, NC, A> where NC: hyper::net::N /// Deletes an existing floodlight activity group. /// /// A builder for the *delete* method supported by a *floodlightActivityGroup* resource. -/// It is not used directly, but through a `FloodlightActivityGroupMethods`. +/// It is not used directly, but through a `FloodlightActivityGroupMethods` instance. /// /// # Example /// @@ -20632,7 +21429,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupDeleteCall<'a, C, NC, A> where NC: hyp for &field in ["profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -20684,7 +21481,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupDeleteCall<'a, C, NC, A> where NC: hyp } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -20696,7 +21493,6 @@ impl<'a, C, NC, A> FloodlightActivityGroupDeleteCall<'a, C, NC, A> where NC: hyp dlg.pre_request(); req.send() - }; match req_result { @@ -20706,7 +21502,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupDeleteCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -20717,12 +21513,12 @@ impl<'a, C, NC, A> FloodlightActivityGroupDeleteCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -20734,7 +21530,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupDeleteCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityGroupDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -20744,7 +21540,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupDeleteCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Floodlight activity Group ID. + /// Floodlight activity Group ID. pub fn id(mut self, new_value: &str) -> FloodlightActivityGroupDeleteCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -20805,7 +21601,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupDeleteCall<'a, C, NC, A> where NC: hyp /// Gets one floodlight activity group by ID. /// /// A builder for the *get* method supported by a *floodlightActivityGroup* resource. -/// It is not used directly, but through a `FloodlightActivityGroupMethods`. +/// It is not used directly, but through a `FloodlightActivityGroupMethods` instance. /// /// # Example /// @@ -20865,7 +21661,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupGetCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -20918,7 +21714,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupGetCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -20930,7 +21726,6 @@ impl<'a, C, NC, A> FloodlightActivityGroupGetCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -20940,7 +21735,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupGetCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -20951,7 +21746,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupGetCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -20960,13 +21755,13 @@ impl<'a, C, NC, A> FloodlightActivityGroupGetCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -20978,7 +21773,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupGetCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityGroupGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -20988,7 +21783,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupGetCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Floodlight activity Group ID. + /// Floodlight activity Group ID. pub fn id(mut self, new_value: &str) -> FloodlightActivityGroupGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -21049,7 +21844,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupGetCall<'a, C, NC, A> where NC: hyper: /// Updates an existing floodlight activity group. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *floodlightActivityGroup* resource. -/// It is not used directly, but through a `FloodlightActivityGroupMethods`. +/// It is not used directly, but through a `FloodlightActivityGroupMethods` instance. /// /// # Example /// @@ -21116,7 +21911,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupPatchCall<'a, C, NC, A> where NC: hype for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -21173,7 +21968,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupPatchCall<'a, C, NC, A> where NC: hype } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -21189,7 +21984,6 @@ impl<'a, C, NC, A> FloodlightActivityGroupPatchCall<'a, C, NC, A> where NC: hype dlg.pre_request(); req.send() - }; match req_result { @@ -21199,7 +21993,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupPatchCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -21210,7 +22004,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupPatchCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -21219,13 +22013,13 @@ impl<'a, C, NC, A> FloodlightActivityGroupPatchCall<'a, C, NC, A> where NC: hype Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -21246,7 +22040,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupPatchCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityGroupPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -21256,7 +22050,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupPatchCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Floodlight activity Group ID. + /// Floodlight activity Group ID. pub fn id(mut self, new_value: &str) -> FloodlightActivityGroupPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -21317,7 +22111,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupPatchCall<'a, C, NC, A> where NC: hype /// Retrieves a list of floodlight activity groups, possibly filtered. /// /// A builder for the *list* method supported by a *floodlightActivityGroup* resource. -/// It is not used directly, but through a `FloodlightActivityGroupMethods`. +/// It is not used directly, but through a `FloodlightActivityGroupMethods` instance. /// /// # Example /// @@ -21424,7 +22218,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper for &field in ["alt", "profileId", "type", "sortOrder", "sortField", "searchString", "pageToken", "maxResults", "ids", "floodlightConfigurationId", "advertiserId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -21477,7 +22271,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -21489,7 +22283,6 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper dlg.pre_request(); req.send() - }; match req_result { @@ -21499,7 +22292,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -21510,7 +22303,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -21519,13 +22312,13 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -21537,7 +22330,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -21545,7 +22338,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper /// Sets the *type* query property to the given value. /// /// - /// Select only floodlight activity groups with the specified floodlight activity group type. + /// Select only floodlight activity groups with the specified floodlight activity group type. pub fn type_(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, NC, A> { self._type_ = Some(new_value.to_string()); self @@ -21553,7 +22346,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -21561,7 +22354,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -21569,7 +22362,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "floodlightactivitygroup*2015" will return objects with names like "floodlightactivitygroup June 2015", "floodlightactivitygroup April 2015" or simply "floodlightactivitygroup 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "floodlightactivitygroup" will match objects with name "my floodlightactivitygroup activity", "floodlightactivitygroup 2015" or simply "floodlightactivitygroup". + /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "floodlightactivitygroup*2015" will return objects with names like "floodlightactivitygroup June 2015", "floodlightactivitygroup April 2015" or simply "floodlightactivitygroup 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "floodlightactivitygroup" will match objects with name "my floodlightactivitygroup activity", "floodlightactivitygroup 2015" or simply "floodlightactivitygroup". pub fn search_string(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -21577,7 +22370,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -21585,7 +22378,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> FloodlightActivityGroupListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -21594,7 +22387,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only floodlight activity groups with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. + /// Select only floodlight activity groups with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. pub fn add_ids(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -21602,7 +22395,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper /// Sets the *floodlight configuration id* query property to the given value. /// /// - /// Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. + /// Select only floodlight activity groups with the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. pub fn floodlight_configuration_id(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, NC, A> { self._floodlight_configuration_id = Some(new_value.to_string()); self @@ -21610,7 +22403,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper /// Sets the *advertiser id* query property to the given value. /// /// - /// Select only floodlight activity groups with the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. + /// Select only floodlight activity groups with the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. pub fn advertiser_id(mut self, new_value: &str) -> FloodlightActivityGroupListCall<'a, C, NC, A> { self._advertiser_id = Some(new_value.to_string()); self @@ -21671,7 +22464,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupListCall<'a, C, NC, A> where NC: hyper /// Inserts a new floodlight activity group. /// /// A builder for the *insert* method supported by a *floodlightActivityGroup* resource. -/// It is not used directly, but through a `FloodlightActivityGroupMethods`. +/// It is not used directly, but through a `FloodlightActivityGroupMethods` instance. /// /// # Example /// @@ -21736,7 +22529,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupInsertCall<'a, C, NC, A> where NC: hyp for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -21793,7 +22586,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupInsertCall<'a, C, NC, A> where NC: hyp } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -21809,7 +22602,6 @@ impl<'a, C, NC, A> FloodlightActivityGroupInsertCall<'a, C, NC, A> where NC: hyp dlg.pre_request(); req.send() - }; match req_result { @@ -21819,7 +22611,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupInsertCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -21830,7 +22622,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupInsertCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -21839,13 +22631,13 @@ impl<'a, C, NC, A> FloodlightActivityGroupInsertCall<'a, C, NC, A> where NC: hyp Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -21866,7 +22658,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupInsertCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityGroupInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -21927,7 +22719,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupInsertCall<'a, C, NC, A> where NC: hyp /// Updates an existing floodlight activity group. /// /// A builder for the *update* method supported by a *floodlightActivityGroup* resource. -/// It is not used directly, but through a `FloodlightActivityGroupMethods`. +/// It is not used directly, but through a `FloodlightActivityGroupMethods` instance. /// /// # Example /// @@ -21992,7 +22784,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupUpdateCall<'a, C, NC, A> where NC: hyp for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -22049,7 +22841,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupUpdateCall<'a, C, NC, A> where NC: hyp } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -22065,7 +22857,6 @@ impl<'a, C, NC, A> FloodlightActivityGroupUpdateCall<'a, C, NC, A> where NC: hyp dlg.pre_request(); req.send() - }; match req_result { @@ -22075,7 +22866,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupUpdateCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -22086,7 +22877,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupUpdateCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -22095,13 +22886,13 @@ impl<'a, C, NC, A> FloodlightActivityGroupUpdateCall<'a, C, NC, A> where NC: hyp Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -22122,7 +22913,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupUpdateCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityGroupUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -22183,7 +22974,7 @@ impl<'a, C, NC, A> FloodlightActivityGroupUpdateCall<'a, C, NC, A> where NC: hyp /// Retrieves a list of metros. /// /// A builder for the *list* method supported by a *metro* resource. -/// It is not used directly, but through a `MetroMethods`. +/// It is not used directly, but through a `MetroMethods` instance. /// /// # Example /// @@ -22241,7 +23032,7 @@ impl<'a, C, NC, A> MetroListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -22294,7 +23085,7 @@ impl<'a, C, NC, A> MetroListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -22306,7 +23097,6 @@ impl<'a, C, NC, A> MetroListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -22316,7 +23106,7 @@ impl<'a, C, NC, A> MetroListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -22327,7 +23117,7 @@ impl<'a, C, NC, A> MetroListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -22336,13 +23126,13 @@ impl<'a, C, NC, A> MetroListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -22354,7 +23144,7 @@ impl<'a, C, NC, A> MetroListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> MetroListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -22415,7 +23205,7 @@ impl<'a, C, NC, A> MetroListCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Gets one directory site contact by ID. /// /// A builder for the *get* method supported by a *directorySiteContact* resource. -/// It is not used directly, but through a `DirectorySiteContactMethods`. +/// It is not used directly, but through a `DirectorySiteContactMethods` instance. /// /// # Example /// @@ -22475,7 +23265,7 @@ impl<'a, C, NC, A> DirectorySiteContactGetCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -22528,7 +23318,7 @@ impl<'a, C, NC, A> DirectorySiteContactGetCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -22540,7 +23330,6 @@ impl<'a, C, NC, A> DirectorySiteContactGetCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -22550,7 +23339,7 @@ impl<'a, C, NC, A> DirectorySiteContactGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -22561,7 +23350,7 @@ impl<'a, C, NC, A> DirectorySiteContactGetCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -22570,13 +23359,13 @@ impl<'a, C, NC, A> DirectorySiteContactGetCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -22588,7 +23377,7 @@ impl<'a, C, NC, A> DirectorySiteContactGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> DirectorySiteContactGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -22598,7 +23387,7 @@ impl<'a, C, NC, A> DirectorySiteContactGetCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Directory site contact ID. + /// Directory site contact ID. pub fn id(mut self, new_value: &str) -> DirectorySiteContactGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -22659,7 +23448,7 @@ impl<'a, C, NC, A> DirectorySiteContactGetCall<'a, C, NC, A> where NC: hyper::ne /// Retrieves a list of directory site contacts, possibly filtered. /// /// A builder for the *list* method supported by a *directorySiteContact* resource. -/// It is not used directly, but through a `DirectorySiteContactMethods`. +/// It is not used directly, but through a `DirectorySiteContactMethods` instance. /// /// # Example /// @@ -22760,7 +23549,7 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "profileId", "sortOrder", "sortField", "searchString", "pageToken", "maxResults", "ids", "directorySiteIds"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -22813,7 +23602,7 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -22825,7 +23614,6 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -22835,7 +23623,7 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -22846,7 +23634,7 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -22855,13 +23643,13 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -22873,7 +23661,7 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> DirectorySiteContactListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -22881,7 +23669,7 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> DirectorySiteContactListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -22889,7 +23677,7 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> DirectorySiteContactListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -22897,7 +23685,7 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name, ID or email. Wildcards (*) are allowed. For example, "directory site contact*2015" will return objects with names like "directory site contact June 2015", "directory site contact April 2015" or simply "directory site contact 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "directory site contact" will match objects with name "my directory site contact", "directory site contact 2015" or simply "directory site contact". + /// Allows searching for objects by name, ID or email. Wildcards (*) are allowed. For example, "directory site contact*2015" will return objects with names like "directory site contact June 2015", "directory site contact April 2015" or simply "directory site contact 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "directory site contact" will match objects with name "my directory site contact", "directory site contact 2015" or simply "directory site contact". pub fn search_string(mut self, new_value: &str) -> DirectorySiteContactListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -22905,7 +23693,7 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> DirectorySiteContactListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -22913,7 +23701,7 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> DirectorySiteContactListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -22922,7 +23710,7 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only directory site contacts with these IDs. + /// Select only directory site contacts with these IDs. pub fn add_ids(mut self, new_value: &str) -> DirectorySiteContactListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -22931,7 +23719,7 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only directory site contacts with these directory site IDs. This is a required field. + /// Select only directory site contacts with these directory site IDs. This is a required field. pub fn add_directory_site_ids(mut self, new_value: &str) -> DirectorySiteContactListCall<'a, C, NC, A> { self._directory_site_ids.push(new_value.to_string()); self @@ -22992,7 +23780,7 @@ impl<'a, C, NC, A> DirectorySiteContactListCall<'a, C, NC, A> where NC: hyper::n /// Retrieves list of user profiles for a user. /// /// A builder for the *list* method supported by a *userProfile* resource. -/// It is not used directly, but through a `UserProfileMethods`. +/// It is not used directly, but through a `UserProfileMethods` instance. /// /// # Example /// @@ -23048,7 +23836,7 @@ impl<'a, C, NC, A> UserProfileListCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -23077,7 +23865,7 @@ impl<'a, C, NC, A> UserProfileListCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -23089,7 +23877,6 @@ impl<'a, C, NC, A> UserProfileListCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -23099,7 +23886,7 @@ impl<'a, C, NC, A> UserProfileListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -23110,7 +23897,7 @@ impl<'a, C, NC, A> UserProfileListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -23119,13 +23906,13 @@ impl<'a, C, NC, A> UserProfileListCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -23188,7 +23975,7 @@ impl<'a, C, NC, A> UserProfileListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Gets one user profile by ID. /// /// A builder for the *get* method supported by a *userProfile* resource. -/// It is not used directly, but through a `UserProfileMethods`. +/// It is not used directly, but through a `UserProfileMethods` instance. /// /// # Example /// @@ -23246,7 +24033,7 @@ impl<'a, C, NC, A> UserProfileGetCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -23299,7 +24086,7 @@ impl<'a, C, NC, A> UserProfileGetCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -23311,7 +24098,6 @@ impl<'a, C, NC, A> UserProfileGetCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -23321,7 +24107,7 @@ impl<'a, C, NC, A> UserProfileGetCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -23332,7 +24118,7 @@ impl<'a, C, NC, A> UserProfileGetCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -23341,13 +24127,13 @@ impl<'a, C, NC, A> UserProfileGetCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -23359,7 +24145,7 @@ impl<'a, C, NC, A> UserProfileGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The user profile ID. + /// The user profile ID. pub fn profile_id(mut self, new_value: &str) -> UserProfileGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -23420,7 +24206,7 @@ impl<'a, C, NC, A> UserProfileGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Updates an existing ad. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *ad* resource. -/// It is not used directly, but through a `AdMethods`. +/// It is not used directly, but through a `AdMethods` instance. /// /// # Example /// @@ -23487,7 +24273,7 @@ impl<'a, C, NC, A> AdPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -23544,7 +24330,7 @@ impl<'a, C, NC, A> AdPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -23560,7 +24346,6 @@ impl<'a, C, NC, A> AdPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -23570,7 +24355,7 @@ impl<'a, C, NC, A> AdPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -23581,7 +24366,7 @@ impl<'a, C, NC, A> AdPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -23590,13 +24375,13 @@ impl<'a, C, NC, A> AdPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -23617,7 +24402,7 @@ impl<'a, C, NC, A> AdPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -23627,7 +24412,7 @@ impl<'a, C, NC, A> AdPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad ID. + /// Ad ID. pub fn id(mut self, new_value: &str) -> AdPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -23688,7 +24473,7 @@ impl<'a, C, NC, A> AdPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Inserts a new ad. /// /// A builder for the *insert* method supported by a *ad* resource. -/// It is not used directly, but through a `AdMethods`. +/// It is not used directly, but through a `AdMethods` instance. /// /// # Example /// @@ -23753,7 +24538,7 @@ impl<'a, C, NC, A> AdInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -23810,7 +24595,7 @@ impl<'a, C, NC, A> AdInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -23826,7 +24611,6 @@ impl<'a, C, NC, A> AdInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -23836,7 +24620,7 @@ impl<'a, C, NC, A> AdInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -23847,7 +24631,7 @@ impl<'a, C, NC, A> AdInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -23856,13 +24640,13 @@ impl<'a, C, NC, A> AdInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -23883,7 +24667,7 @@ impl<'a, C, NC, A> AdInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -23944,7 +24728,7 @@ impl<'a, C, NC, A> AdInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Retrieves a list of ads, possibly filtered. /// /// A builder for the *list* method supported by a *ad* resource. -/// It is not used directly, but through a `AdMethods`. +/// It is not used directly, but through a `AdMethods` instance. /// /// # Example /// @@ -24162,7 +24946,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect for &field in ["alt", "profileId", "type", "sslRequired", "sslCompliant", "sortOrder", "sortField", "sizeIds", "searchString", "remarketingListIds", "placementIds", "pageToken", "overriddenEventTagId", "maxResults", "landingPageIds", "ids", "dynamicClickTracker", "creativeType", "creativeOptimizationConfigurationIds", "creativeIds", "compatibility", "campaignIds", "audienceSegmentIds", "archived", "advertiserId", "active"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -24215,7 +24999,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -24227,7 +25011,6 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect dlg.pre_request(); req.send() - }; match req_result { @@ -24237,7 +25020,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -24248,7 +25031,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -24257,13 +25040,13 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -24275,7 +25058,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -24284,7 +25067,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only ads with these types. + /// Select only ads with these types. pub fn add_type(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._type_.push(new_value.to_string()); self @@ -24292,7 +25075,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Sets the *ssl required* query property to the given value. /// /// - /// Select only ads that require SSL. + /// Select only ads that require SSL. pub fn ssl_required(mut self, new_value: bool) -> AdListCall<'a, C, NC, A> { self._ssl_required = Some(new_value); self @@ -24300,7 +25083,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Sets the *ssl compliant* query property to the given value. /// /// - /// Select only ads that are SSL-compliant. + /// Select only ads that are SSL-compliant. pub fn ssl_compliant(mut self, new_value: bool) -> AdListCall<'a, C, NC, A> { self._ssl_compliant = Some(new_value); self @@ -24308,7 +25091,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -24316,7 +25099,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -24325,7 +25108,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only ads with these size IDs. + /// Select only ads with these size IDs. pub fn add_size_ids(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._size_ids.push(new_value.to_string()); self @@ -24333,7 +25116,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "ad*2015" will return objects with names like "ad June 2015", "ad April 2015" or simply "ad 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "ad" will match objects with name "my ad", "ad 2015" or simply "ad". + /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "ad*2015" will return objects with names like "ad June 2015", "ad April 2015" or simply "ad 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "ad" will match objects with name "my ad", "ad 2015" or simply "ad". pub fn search_string(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -24342,7 +25125,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only ads whose list targeting expression use these remarketing list IDs. + /// Select only ads whose list targeting expression use these remarketing list IDs. pub fn add_remarketing_list_ids(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._remarketing_list_ids.push(new_value.to_string()); self @@ -24351,7 +25134,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only ads with these placement IDs assigned. + /// Select only ads with these placement IDs assigned. pub fn add_placement_ids(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._placement_ids.push(new_value.to_string()); self @@ -24359,7 +25142,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -24367,7 +25150,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Sets the *overridden event tag id* query property to the given value. /// /// - /// Select only ads with this event tag override ID. + /// Select only ads with this event tag override ID. pub fn overridden_event_tag_id(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._overridden_event_tag_id = Some(new_value.to_string()); self @@ -24375,7 +25158,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> AdListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -24384,7 +25167,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only ads with these landing page IDs. + /// Select only ads with these landing page IDs. pub fn add_landing_page_ids(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._landing_page_ids.push(new_value.to_string()); self @@ -24393,7 +25176,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only ads with these IDs. + /// Select only ads with these IDs. pub fn add_ids(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -24401,7 +25184,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Sets the *dynamic click tracker* query property to the given value. /// /// - /// Select only dynamic click trackers. Applicable when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click trackers. If false, select static click trackers. Leave unset to select both. + /// Select only dynamic click trackers. Applicable when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click trackers. If false, select static click trackers. Leave unset to select both. pub fn dynamic_click_tracker(mut self, new_value: bool) -> AdListCall<'a, C, NC, A> { self._dynamic_click_tracker = Some(new_value); self @@ -24409,7 +25192,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Sets the *creative type* query property to the given value. /// /// - /// Select only ads with the specified creativeType. + /// Select only ads with the specified creativeType. pub fn creative_type(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._creative_type = Some(new_value.to_string()); self @@ -24418,7 +25201,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only ads with these creative optimization configuration IDs. + /// Select only ads with these creative optimization configuration IDs. pub fn add_creative_optimization_configuration_ids(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._creative_optimization_configuration_ids.push(new_value.to_string()); self @@ -24427,7 +25210,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only ads with these creative IDs assigned. + /// Select only ads with these creative IDs assigned. pub fn add_creative_ids(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._creative_ids.push(new_value.to_string()); self @@ -24435,7 +25218,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Sets the *compatibility* query property to the given value. /// /// - /// Select default ads with the specified compatibility. Applicable when type is AD_SERVING_DEFAULT_AD. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an in-stream video ads developed with the VAST standard. + /// Select default ads with the specified compatibility. Applicable when type is AD_SERVING_DEFAULT_AD. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering an in-stream video ads developed with the VAST standard. pub fn compatibility(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._compatibility = Some(new_value.to_string()); self @@ -24444,7 +25227,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only ads with these campaign IDs. + /// Select only ads with these campaign IDs. pub fn add_campaign_ids(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._campaign_ids.push(new_value.to_string()); self @@ -24453,7 +25236,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only ads with these audience segment IDs. + /// Select only ads with these audience segment IDs. pub fn add_audience_segment_ids(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._audience_segment_ids.push(new_value.to_string()); self @@ -24461,7 +25244,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Sets the *archived* query property to the given value. /// /// - /// Select only archived ads. + /// Select only archived ads. pub fn archived(mut self, new_value: bool) -> AdListCall<'a, C, NC, A> { self._archived = Some(new_value); self @@ -24469,7 +25252,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Sets the *advertiser id* query property to the given value. /// /// - /// Select only ads with this advertiser ID. + /// Select only ads with this advertiser ID. pub fn advertiser_id(mut self, new_value: &str) -> AdListCall<'a, C, NC, A> { self._advertiser_id = Some(new_value.to_string()); self @@ -24477,7 +25260,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Sets the *active* query property to the given value. /// /// - /// Select only active ads. + /// Select only active ads. pub fn active(mut self, new_value: bool) -> AdListCall<'a, C, NC, A> { self._active = Some(new_value); self @@ -24538,7 +25321,7 @@ impl<'a, C, NC, A> AdListCall<'a, C, NC, A> where NC: hyper::net::NetworkConnect /// Gets one ad by ID. /// /// A builder for the *get* method supported by a *ad* resource. -/// It is not used directly, but through a `AdMethods`. +/// It is not used directly, but through a `AdMethods` instance. /// /// # Example /// @@ -24598,7 +25381,7 @@ impl<'a, C, NC, A> AdGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnecto for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -24651,7 +25434,7 @@ impl<'a, C, NC, A> AdGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnecto } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -24663,7 +25446,6 @@ impl<'a, C, NC, A> AdGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnecto dlg.pre_request(); req.send() - }; match req_result { @@ -24673,7 +25455,7 @@ impl<'a, C, NC, A> AdGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnecto continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -24684,7 +25466,7 @@ impl<'a, C, NC, A> AdGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnecto continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -24693,13 +25475,13 @@ impl<'a, C, NC, A> AdGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnecto Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -24711,7 +25493,7 @@ impl<'a, C, NC, A> AdGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnecto /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -24721,7 +25503,7 @@ impl<'a, C, NC, A> AdGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnecto /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Ad ID. + /// Ad ID. pub fn id(mut self, new_value: &str) -> AdGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -24782,7 +25564,7 @@ impl<'a, C, NC, A> AdGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnecto /// Updates an existing ad. /// /// A builder for the *update* method supported by a *ad* resource. -/// It is not used directly, but through a `AdMethods`. +/// It is not used directly, but through a `AdMethods` instance. /// /// # Example /// @@ -24847,7 +25629,7 @@ impl<'a, C, NC, A> AdUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -24904,7 +25686,7 @@ impl<'a, C, NC, A> AdUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -24920,7 +25702,6 @@ impl<'a, C, NC, A> AdUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -24930,7 +25711,7 @@ impl<'a, C, NC, A> AdUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -24941,7 +25722,7 @@ impl<'a, C, NC, A> AdUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -24950,13 +25731,13 @@ impl<'a, C, NC, A> AdUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -24977,7 +25758,7 @@ impl<'a, C, NC, A> AdUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -25038,7 +25819,7 @@ impl<'a, C, NC, A> AdUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Gets one account permission by ID. /// /// A builder for the *get* method supported by a *accountPermission* resource. -/// It is not used directly, but through a `AccountPermissionMethods`. +/// It is not used directly, but through a `AccountPermissionMethods` instance. /// /// # Example /// @@ -25098,7 +25879,7 @@ impl<'a, C, NC, A> AccountPermissionGetCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -25151,7 +25932,7 @@ impl<'a, C, NC, A> AccountPermissionGetCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -25163,7 +25944,6 @@ impl<'a, C, NC, A> AccountPermissionGetCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -25173,7 +25953,7 @@ impl<'a, C, NC, A> AccountPermissionGetCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -25184,7 +25964,7 @@ impl<'a, C, NC, A> AccountPermissionGetCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -25193,13 +25973,13 @@ impl<'a, C, NC, A> AccountPermissionGetCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -25211,7 +25991,7 @@ impl<'a, C, NC, A> AccountPermissionGetCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountPermissionGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -25221,7 +26001,7 @@ impl<'a, C, NC, A> AccountPermissionGetCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account permission ID. + /// Account permission ID. pub fn id(mut self, new_value: &str) -> AccountPermissionGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -25282,7 +26062,7 @@ impl<'a, C, NC, A> AccountPermissionGetCall<'a, C, NC, A> where NC: hyper::net:: /// Retrieves the list of account permissions. /// /// A builder for the *list* method supported by a *accountPermission* resource. -/// It is not used directly, but through a `AccountPermissionMethods`. +/// It is not used directly, but through a `AccountPermissionMethods` instance. /// /// # Example /// @@ -25340,7 +26120,7 @@ impl<'a, C, NC, A> AccountPermissionListCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -25393,7 +26173,7 @@ impl<'a, C, NC, A> AccountPermissionListCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -25405,7 +26185,6 @@ impl<'a, C, NC, A> AccountPermissionListCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -25415,7 +26194,7 @@ impl<'a, C, NC, A> AccountPermissionListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -25426,7 +26205,7 @@ impl<'a, C, NC, A> AccountPermissionListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -25435,13 +26214,13 @@ impl<'a, C, NC, A> AccountPermissionListCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -25453,7 +26232,7 @@ impl<'a, C, NC, A> AccountPermissionListCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountPermissionListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -25514,7 +26293,7 @@ impl<'a, C, NC, A> AccountPermissionListCall<'a, C, NC, A> where NC: hyper::net: /// Retrieves a list of connection types. /// /// A builder for the *list* method supported by a *connectionType* resource. -/// It is not used directly, but through a `ConnectionTypeMethods`. +/// It is not used directly, but through a `ConnectionTypeMethods` instance. /// /// # Example /// @@ -25572,7 +26351,7 @@ impl<'a, C, NC, A> ConnectionTypeListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -25625,7 +26404,7 @@ impl<'a, C, NC, A> ConnectionTypeListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -25637,7 +26416,6 @@ impl<'a, C, NC, A> ConnectionTypeListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -25647,7 +26425,7 @@ impl<'a, C, NC, A> ConnectionTypeListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -25658,7 +26436,7 @@ impl<'a, C, NC, A> ConnectionTypeListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -25667,13 +26445,13 @@ impl<'a, C, NC, A> ConnectionTypeListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -25685,7 +26463,7 @@ impl<'a, C, NC, A> ConnectionTypeListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> ConnectionTypeListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -25746,7 +26524,7 @@ impl<'a, C, NC, A> ConnectionTypeListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Gets one advertiser group by ID. /// /// A builder for the *get* method supported by a *advertiserGroup* resource. -/// It is not used directly, but through a `AdvertiserGroupMethods`. +/// It is not used directly, but through a `AdvertiserGroupMethods` instance. /// /// # Example /// @@ -25806,7 +26584,7 @@ impl<'a, C, NC, A> AdvertiserGroupGetCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -25859,7 +26637,7 @@ impl<'a, C, NC, A> AdvertiserGroupGetCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -25871,7 +26649,6 @@ impl<'a, C, NC, A> AdvertiserGroupGetCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -25881,7 +26658,7 @@ impl<'a, C, NC, A> AdvertiserGroupGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -25892,7 +26669,7 @@ impl<'a, C, NC, A> AdvertiserGroupGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -25901,13 +26678,13 @@ impl<'a, C, NC, A> AdvertiserGroupGetCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -25919,7 +26696,7 @@ impl<'a, C, NC, A> AdvertiserGroupGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserGroupGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -25929,7 +26706,7 @@ impl<'a, C, NC, A> AdvertiserGroupGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Advertiser group ID. + /// Advertiser group ID. pub fn id(mut self, new_value: &str) -> AdvertiserGroupGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -25990,7 +26767,7 @@ impl<'a, C, NC, A> AdvertiserGroupGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Retrieves a list of advertiser groups, possibly filtered. /// /// A builder for the *list* method supported by a *advertiserGroup* resource. -/// It is not used directly, but through a `AdvertiserGroupMethods`. +/// It is not used directly, but through a `AdvertiserGroupMethods` instance. /// /// # Example /// @@ -26082,7 +26859,7 @@ impl<'a, C, NC, A> AdvertiserGroupListCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "profileId", "sortOrder", "sortField", "searchString", "pageToken", "maxResults", "ids"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -26135,7 +26912,7 @@ impl<'a, C, NC, A> AdvertiserGroupListCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -26147,7 +26924,6 @@ impl<'a, C, NC, A> AdvertiserGroupListCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -26157,7 +26933,7 @@ impl<'a, C, NC, A> AdvertiserGroupListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -26168,7 +26944,7 @@ impl<'a, C, NC, A> AdvertiserGroupListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -26177,13 +26953,13 @@ impl<'a, C, NC, A> AdvertiserGroupListCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -26195,7 +26971,7 @@ impl<'a, C, NC, A> AdvertiserGroupListCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserGroupListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -26203,7 +26979,7 @@ impl<'a, C, NC, A> AdvertiserGroupListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> AdvertiserGroupListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -26211,7 +26987,7 @@ impl<'a, C, NC, A> AdvertiserGroupListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> AdvertiserGroupListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -26219,7 +26995,7 @@ impl<'a, C, NC, A> AdvertiserGroupListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "advertiser*2015" will return objects with names like "advertiser group June 2015", "advertiser group April 2015" or simply "advertiser group 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "advertisergroup" will match objects with name "my advertisergroup", "advertisergroup 2015" or simply "advertisergroup". + /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "advertiser*2015" will return objects with names like "advertiser group June 2015", "advertiser group April 2015" or simply "advertiser group 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "advertisergroup" will match objects with name "my advertisergroup", "advertisergroup 2015" or simply "advertisergroup". pub fn search_string(mut self, new_value: &str) -> AdvertiserGroupListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -26227,7 +27003,7 @@ impl<'a, C, NC, A> AdvertiserGroupListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> AdvertiserGroupListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -26235,7 +27011,7 @@ impl<'a, C, NC, A> AdvertiserGroupListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> AdvertiserGroupListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -26244,7 +27020,7 @@ impl<'a, C, NC, A> AdvertiserGroupListCall<'a, C, NC, A> where NC: hyper::net::N /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only advertiser groups with these IDs. + /// Select only advertiser groups with these IDs. pub fn add_ids(mut self, new_value: &str) -> AdvertiserGroupListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -26305,7 +27081,7 @@ impl<'a, C, NC, A> AdvertiserGroupListCall<'a, C, NC, A> where NC: hyper::net::N /// Inserts a new advertiser group. /// /// A builder for the *insert* method supported by a *advertiserGroup* resource. -/// It is not used directly, but through a `AdvertiserGroupMethods`. +/// It is not used directly, but through a `AdvertiserGroupMethods` instance. /// /// # Example /// @@ -26370,7 +27146,7 @@ impl<'a, C, NC, A> AdvertiserGroupInsertCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -26427,7 +27203,7 @@ impl<'a, C, NC, A> AdvertiserGroupInsertCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -26443,7 +27219,6 @@ impl<'a, C, NC, A> AdvertiserGroupInsertCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -26453,7 +27228,7 @@ impl<'a, C, NC, A> AdvertiserGroupInsertCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -26464,7 +27239,7 @@ impl<'a, C, NC, A> AdvertiserGroupInsertCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -26473,13 +27248,13 @@ impl<'a, C, NC, A> AdvertiserGroupInsertCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -26500,7 +27275,7 @@ impl<'a, C, NC, A> AdvertiserGroupInsertCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserGroupInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -26561,7 +27336,7 @@ impl<'a, C, NC, A> AdvertiserGroupInsertCall<'a, C, NC, A> where NC: hyper::net: /// Updates an existing advertiser group. /// /// A builder for the *update* method supported by a *advertiserGroup* resource. -/// It is not used directly, but through a `AdvertiserGroupMethods`. +/// It is not used directly, but through a `AdvertiserGroupMethods` instance. /// /// # Example /// @@ -26626,7 +27401,7 @@ impl<'a, C, NC, A> AdvertiserGroupUpdateCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -26683,7 +27458,7 @@ impl<'a, C, NC, A> AdvertiserGroupUpdateCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -26699,7 +27474,6 @@ impl<'a, C, NC, A> AdvertiserGroupUpdateCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -26709,7 +27483,7 @@ impl<'a, C, NC, A> AdvertiserGroupUpdateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -26720,7 +27494,7 @@ impl<'a, C, NC, A> AdvertiserGroupUpdateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -26729,13 +27503,13 @@ impl<'a, C, NC, A> AdvertiserGroupUpdateCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -26756,7 +27530,7 @@ impl<'a, C, NC, A> AdvertiserGroupUpdateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserGroupUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -26817,7 +27591,7 @@ impl<'a, C, NC, A> AdvertiserGroupUpdateCall<'a, C, NC, A> where NC: hyper::net: /// Updates an existing advertiser group. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *advertiserGroup* resource. -/// It is not used directly, but through a `AdvertiserGroupMethods`. +/// It is not used directly, but through a `AdvertiserGroupMethods` instance. /// /// # Example /// @@ -26884,7 +27658,7 @@ impl<'a, C, NC, A> AdvertiserGroupPatchCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -26941,7 +27715,7 @@ impl<'a, C, NC, A> AdvertiserGroupPatchCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -26957,7 +27731,6 @@ impl<'a, C, NC, A> AdvertiserGroupPatchCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -26967,7 +27740,7 @@ impl<'a, C, NC, A> AdvertiserGroupPatchCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -26978,7 +27751,7 @@ impl<'a, C, NC, A> AdvertiserGroupPatchCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -26987,13 +27760,13 @@ impl<'a, C, NC, A> AdvertiserGroupPatchCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -27014,7 +27787,7 @@ impl<'a, C, NC, A> AdvertiserGroupPatchCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserGroupPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -27024,7 +27797,7 @@ impl<'a, C, NC, A> AdvertiserGroupPatchCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Advertiser group ID. + /// Advertiser group ID. pub fn id(mut self, new_value: &str) -> AdvertiserGroupPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -27085,7 +27858,7 @@ impl<'a, C, NC, A> AdvertiserGroupPatchCall<'a, C, NC, A> where NC: hyper::net:: /// Deletes an existing advertiser group. /// /// A builder for the *delete* method supported by a *advertiserGroup* resource. -/// It is not used directly, but through a `AdvertiserGroupMethods`. +/// It is not used directly, but through a `AdvertiserGroupMethods` instance. /// /// # Example /// @@ -27145,7 +27918,7 @@ impl<'a, C, NC, A> AdvertiserGroupDeleteCall<'a, C, NC, A> where NC: hyper::net: for &field in ["profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -27197,7 +27970,7 @@ impl<'a, C, NC, A> AdvertiserGroupDeleteCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -27209,7 +27982,6 @@ impl<'a, C, NC, A> AdvertiserGroupDeleteCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -27219,7 +27991,7 @@ impl<'a, C, NC, A> AdvertiserGroupDeleteCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -27230,12 +28002,12 @@ impl<'a, C, NC, A> AdvertiserGroupDeleteCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -27247,7 +28019,7 @@ impl<'a, C, NC, A> AdvertiserGroupDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AdvertiserGroupDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -27257,7 +28029,7 @@ impl<'a, C, NC, A> AdvertiserGroupDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Advertiser group ID. + /// Advertiser group ID. pub fn id(mut self, new_value: &str) -> AdvertiserGroupDeleteCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -27318,7 +28090,7 @@ impl<'a, C, NC, A> AdvertiserGroupDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Inserts a new site. /// /// A builder for the *insert* method supported by a *site* resource. -/// It is not used directly, but through a `SiteMethods`. +/// It is not used directly, but through a `SiteMethods` instance. /// /// # Example /// @@ -27383,7 +28155,7 @@ impl<'a, C, NC, A> SiteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -27440,7 +28212,7 @@ impl<'a, C, NC, A> SiteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -27456,7 +28228,6 @@ impl<'a, C, NC, A> SiteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -27466,7 +28237,7 @@ impl<'a, C, NC, A> SiteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -27477,7 +28248,7 @@ impl<'a, C, NC, A> SiteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -27486,13 +28257,13 @@ impl<'a, C, NC, A> SiteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -27513,7 +28284,7 @@ impl<'a, C, NC, A> SiteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SiteInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -27574,7 +28345,7 @@ impl<'a, C, NC, A> SiteInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Gets one site by ID. /// /// A builder for the *get* method supported by a *site* resource. -/// It is not used directly, but through a `SiteMethods`. +/// It is not used directly, but through a `SiteMethods` instance. /// /// # Example /// @@ -27634,7 +28405,7 @@ impl<'a, C, NC, A> SiteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -27687,7 +28458,7 @@ impl<'a, C, NC, A> SiteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -27699,7 +28470,6 @@ impl<'a, C, NC, A> SiteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -27709,7 +28479,7 @@ impl<'a, C, NC, A> SiteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -27720,7 +28490,7 @@ impl<'a, C, NC, A> SiteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -27729,13 +28499,13 @@ impl<'a, C, NC, A> SiteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -27747,7 +28517,7 @@ impl<'a, C, NC, A> SiteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SiteGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -27757,7 +28527,7 @@ impl<'a, C, NC, A> SiteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Site ID. + /// Site ID. pub fn id(mut self, new_value: &str) -> SiteGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -27818,7 +28588,7 @@ impl<'a, C, NC, A> SiteGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Retrieves a list of sites, possibly filtered. /// /// A builder for the *list* method supported by a *site* resource. -/// It is not used directly, but through a `SiteMethods`. +/// It is not used directly, but through a `SiteMethods` instance. /// /// # Example /// @@ -27963,7 +28733,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "profileId", "unmappedSite", "subaccountId", "sortOrder", "sortField", "searchString", "pageToken", "maxResults", "ids", "directorySiteIds", "campaignIds", "approved", "adWordsSite", "acceptsPublisherPaidPlacements", "acceptsInterstitialPlacements", "acceptsInStreamVideoPlacements"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -28016,7 +28786,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -28028,7 +28798,6 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -28038,7 +28807,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -28049,7 +28818,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -28058,13 +28827,13 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -28076,7 +28845,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SiteListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -28084,7 +28853,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *unmapped site* query property to the given value. /// /// - /// Select only sites that have not been mapped to a directory site. + /// Select only sites that have not been mapped to a directory site. pub fn unmapped_site(mut self, new_value: bool) -> SiteListCall<'a, C, NC, A> { self._unmapped_site = Some(new_value); self @@ -28092,7 +28861,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *subaccount id* query property to the given value. /// /// - /// Select only sites with this subaccount ID. + /// Select only sites with this subaccount ID. pub fn subaccount_id(mut self, new_value: &str) -> SiteListCall<'a, C, NC, A> { self._subaccount_id = Some(new_value.to_string()); self @@ -28100,7 +28869,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> SiteListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -28108,7 +28877,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> SiteListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -28116,7 +28885,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name, ID or keyName. Wildcards (*) are allowed. For example, "site*2015" will return objects with names like "site June 2015", "site April 2015" or simply "site 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "site" will match objects with name "my site", "site 2015" or simply "site". + /// Allows searching for objects by name, ID or keyName. Wildcards (*) are allowed. For example, "site*2015" will return objects with names like "site June 2015", "site April 2015" or simply "site 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "site" will match objects with name "my site", "site 2015" or simply "site". pub fn search_string(mut self, new_value: &str) -> SiteListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -28124,7 +28893,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> SiteListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -28132,7 +28901,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> SiteListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -28141,7 +28910,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only sites with these IDs. + /// Select only sites with these IDs. pub fn add_ids(mut self, new_value: &str) -> SiteListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -28150,7 +28919,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only sites with these directory site IDs. + /// Select only sites with these directory site IDs. pub fn add_directory_site_ids(mut self, new_value: &str) -> SiteListCall<'a, C, NC, A> { self._directory_site_ids.push(new_value.to_string()); self @@ -28159,7 +28928,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only sites with these campaign IDs. + /// Select only sites with these campaign IDs. pub fn add_campaign_ids(mut self, new_value: &str) -> SiteListCall<'a, C, NC, A> { self._campaign_ids.push(new_value.to_string()); self @@ -28167,7 +28936,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *approved* query property to the given value. /// /// - /// Select only approved sites. + /// Select only approved sites. pub fn approved(mut self, new_value: bool) -> SiteListCall<'a, C, NC, A> { self._approved = Some(new_value); self @@ -28175,7 +28944,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *ad words site* query property to the given value. /// /// - /// Select only AdWords sites. + /// Select only AdWords sites. pub fn ad_words_site(mut self, new_value: bool) -> SiteListCall<'a, C, NC, A> { self._ad_words_site = Some(new_value); self @@ -28183,7 +28952,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *accepts publisher paid placements* query property to the given value. /// /// - /// Select only sites that accept publisher paid placements. + /// Select only sites that accept publisher paid placements. pub fn accepts_publisher_paid_placements(mut self, new_value: bool) -> SiteListCall<'a, C, NC, A> { self._accepts_publisher_paid_placements = Some(new_value); self @@ -28191,7 +28960,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *accepts interstitial placements* query property to the given value. /// /// - /// This search filter is no longer supported and will have no effect on the results returned. + /// This search filter is no longer supported and will have no effect on the results returned. pub fn accepts_interstitial_placements(mut self, new_value: bool) -> SiteListCall<'a, C, NC, A> { self._accepts_interstitial_placements = Some(new_value); self @@ -28199,7 +28968,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *accepts in stream video placements* query property to the given value. /// /// - /// This search filter is no longer supported and will have no effect on the results returned. + /// This search filter is no longer supported and will have no effect on the results returned. pub fn accepts_in_stream_video_placements(mut self, new_value: bool) -> SiteListCall<'a, C, NC, A> { self._accepts_in_stream_video_placements = Some(new_value); self @@ -28260,7 +29029,7 @@ impl<'a, C, NC, A> SiteListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Updates an existing site. /// /// A builder for the *update* method supported by a *site* resource. -/// It is not used directly, but through a `SiteMethods`. +/// It is not used directly, but through a `SiteMethods` instance. /// /// # Example /// @@ -28325,7 +29094,7 @@ impl<'a, C, NC, A> SiteUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -28382,7 +29151,7 @@ impl<'a, C, NC, A> SiteUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -28398,7 +29167,6 @@ impl<'a, C, NC, A> SiteUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -28408,7 +29176,7 @@ impl<'a, C, NC, A> SiteUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -28419,7 +29187,7 @@ impl<'a, C, NC, A> SiteUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -28428,13 +29196,13 @@ impl<'a, C, NC, A> SiteUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -28455,7 +29223,7 @@ impl<'a, C, NC, A> SiteUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SiteUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -28516,7 +29284,7 @@ impl<'a, C, NC, A> SiteUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Updates an existing site. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *site* resource. -/// It is not used directly, but through a `SiteMethods`. +/// It is not used directly, but through a `SiteMethods` instance. /// /// # Example /// @@ -28583,7 +29351,7 @@ impl<'a, C, NC, A> SitePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -28640,7 +29408,7 @@ impl<'a, C, NC, A> SitePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -28656,7 +29424,6 @@ impl<'a, C, NC, A> SitePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -28666,7 +29433,7 @@ impl<'a, C, NC, A> SitePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -28677,7 +29444,7 @@ impl<'a, C, NC, A> SitePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -28686,13 +29453,13 @@ impl<'a, C, NC, A> SitePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -28713,7 +29480,7 @@ impl<'a, C, NC, A> SitePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SitePatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -28723,7 +29490,7 @@ impl<'a, C, NC, A> SitePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Site ID. + /// Site ID. pub fn id(mut self, new_value: &str) -> SitePatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -28784,7 +29551,7 @@ impl<'a, C, NC, A> SitePatchCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Gets one floodlight activity by ID. /// /// A builder for the *get* method supported by a *floodlightActivity* resource. -/// It is not used directly, but through a `FloodlightActivityMethods`. +/// It is not used directly, but through a `FloodlightActivityMethods` instance. /// /// # Example /// @@ -28844,7 +29611,7 @@ impl<'a, C, NC, A> FloodlightActivityGetCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -28897,7 +29664,7 @@ impl<'a, C, NC, A> FloodlightActivityGetCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -28909,7 +29676,6 @@ impl<'a, C, NC, A> FloodlightActivityGetCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -28919,7 +29685,7 @@ impl<'a, C, NC, A> FloodlightActivityGetCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -28930,7 +29696,7 @@ impl<'a, C, NC, A> FloodlightActivityGetCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -28939,13 +29705,13 @@ impl<'a, C, NC, A> FloodlightActivityGetCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -28957,7 +29723,7 @@ impl<'a, C, NC, A> FloodlightActivityGetCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -28967,7 +29733,7 @@ impl<'a, C, NC, A> FloodlightActivityGetCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Floodlight activity ID. + /// Floodlight activity ID. pub fn id(mut self, new_value: &str) -> FloodlightActivityGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -29028,7 +29794,7 @@ impl<'a, C, NC, A> FloodlightActivityGetCall<'a, C, NC, A> where NC: hyper::net: /// Retrieves a list of floodlight activities, possibly filtered. /// /// A builder for the *list* method supported by a *floodlightActivity* resource. -/// It is not used directly, but through a `FloodlightActivityMethods`. +/// It is not used directly, but through a `FloodlightActivityMethods` instance. /// /// # Example /// @@ -29159,7 +29925,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "profileId", "tagString", "sortOrder", "sortField", "searchString", "pageToken", "maxResults", "ids", "floodlightConfigurationId", "floodlightActivityGroupType", "floodlightActivityGroupTagString", "floodlightActivityGroupName", "floodlightActivityGroupIds", "advertiserId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -29212,7 +29978,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -29224,7 +29990,6 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -29234,7 +29999,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -29245,7 +30010,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -29254,13 +30019,13 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -29272,7 +30037,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -29280,7 +30045,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *tag string* query property to the given value. /// /// - /// Select only floodlight activities with the specified tag string. + /// Select only floodlight activities with the specified tag string. pub fn tag_string(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, NC, A> { self._tag_string = Some(new_value.to_string()); self @@ -29288,7 +30053,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -29296,7 +30061,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -29304,7 +30069,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "floodlightactivity*2015" will return objects with names like "floodlightactivity June 2015", "floodlightactivity April 2015" or simply "floodlightactivity 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "floodlightactivity" will match objects with name "my floodlightactivity activity", "floodlightactivity 2015" or simply "floodlightactivity". + /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "floodlightactivity*2015" will return objects with names like "floodlightactivity June 2015", "floodlightactivity April 2015" or simply "floodlightactivity 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "floodlightactivity" will match objects with name "my floodlightactivity activity", "floodlightactivity 2015" or simply "floodlightactivity". pub fn search_string(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -29312,7 +30077,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -29320,7 +30085,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> FloodlightActivityListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -29329,7 +30094,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only floodlight activities with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. + /// Select only floodlight activities with the specified IDs. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. pub fn add_ids(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -29337,7 +30102,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *floodlight configuration id* query property to the given value. /// /// - /// Select only floodlight activities for the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. + /// Select only floodlight activities for the specified floodlight configuration ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. pub fn floodlight_configuration_id(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, NC, A> { self._floodlight_configuration_id = Some(new_value.to_string()); self @@ -29345,7 +30110,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *floodlight activity group type* query property to the given value. /// /// - /// Select only floodlight activities with the specified floodlight activity group type. + /// Select only floodlight activities with the specified floodlight activity group type. pub fn floodlight_activity_group_type(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, NC, A> { self._floodlight_activity_group_type = Some(new_value.to_string()); self @@ -29353,7 +30118,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *floodlight activity group tag string* query property to the given value. /// /// - /// Select only floodlight activities with the specified floodlight activity group tag string. + /// Select only floodlight activities with the specified floodlight activity group tag string. pub fn floodlight_activity_group_tag_string(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, NC, A> { self._floodlight_activity_group_tag_string = Some(new_value.to_string()); self @@ -29361,7 +30126,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *floodlight activity group name* query property to the given value. /// /// - /// Select only floodlight activities with the specified floodlight activity group name. + /// Select only floodlight activities with the specified floodlight activity group name. pub fn floodlight_activity_group_name(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, NC, A> { self._floodlight_activity_group_name = Some(new_value.to_string()); self @@ -29370,7 +30135,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only floodlight activities with the specified floodlight activity group IDs. + /// Select only floodlight activities with the specified floodlight activity group IDs. pub fn add_floodlight_activity_group_ids(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, NC, A> { self._floodlight_activity_group_ids.push(new_value.to_string()); self @@ -29378,7 +30143,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *advertiser id* query property to the given value. /// /// - /// Select only floodlight activities for the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. + /// Select only floodlight activities for the specified advertiser ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a non-empty result. pub fn advertiser_id(mut self, new_value: &str) -> FloodlightActivityListCall<'a, C, NC, A> { self._advertiser_id = Some(new_value.to_string()); self @@ -29439,7 +30204,7 @@ impl<'a, C, NC, A> FloodlightActivityListCall<'a, C, NC, A> where NC: hyper::net /// Inserts a new floodlight activity. /// /// A builder for the *insert* method supported by a *floodlightActivity* resource. -/// It is not used directly, but through a `FloodlightActivityMethods`. +/// It is not used directly, but through a `FloodlightActivityMethods` instance. /// /// # Example /// @@ -29504,7 +30269,7 @@ impl<'a, C, NC, A> FloodlightActivityInsertCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -29561,7 +30326,7 @@ impl<'a, C, NC, A> FloodlightActivityInsertCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -29577,7 +30342,6 @@ impl<'a, C, NC, A> FloodlightActivityInsertCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -29587,7 +30351,7 @@ impl<'a, C, NC, A> FloodlightActivityInsertCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -29598,7 +30362,7 @@ impl<'a, C, NC, A> FloodlightActivityInsertCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -29607,13 +30371,13 @@ impl<'a, C, NC, A> FloodlightActivityInsertCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -29634,7 +30398,7 @@ impl<'a, C, NC, A> FloodlightActivityInsertCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -29695,7 +30459,7 @@ impl<'a, C, NC, A> FloodlightActivityInsertCall<'a, C, NC, A> where NC: hyper::n /// Deletes an existing floodlight activity. /// /// A builder for the *delete* method supported by a *floodlightActivity* resource. -/// It is not used directly, but through a `FloodlightActivityMethods`. +/// It is not used directly, but through a `FloodlightActivityMethods` instance. /// /// # Example /// @@ -29755,7 +30519,7 @@ impl<'a, C, NC, A> FloodlightActivityDeleteCall<'a, C, NC, A> where NC: hyper::n for &field in ["profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -29807,7 +30571,7 @@ impl<'a, C, NC, A> FloodlightActivityDeleteCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -29819,7 +30583,6 @@ impl<'a, C, NC, A> FloodlightActivityDeleteCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -29829,7 +30592,7 @@ impl<'a, C, NC, A> FloodlightActivityDeleteCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -29840,12 +30603,12 @@ impl<'a, C, NC, A> FloodlightActivityDeleteCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -29857,7 +30620,7 @@ impl<'a, C, NC, A> FloodlightActivityDeleteCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -29867,7 +30630,7 @@ impl<'a, C, NC, A> FloodlightActivityDeleteCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Floodlight activity ID. + /// Floodlight activity ID. pub fn id(mut self, new_value: &str) -> FloodlightActivityDeleteCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -29928,7 +30691,7 @@ impl<'a, C, NC, A> FloodlightActivityDeleteCall<'a, C, NC, A> where NC: hyper::n /// Updates an existing floodlight activity. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *floodlightActivity* resource. -/// It is not used directly, but through a `FloodlightActivityMethods`. +/// It is not used directly, but through a `FloodlightActivityMethods` instance. /// /// # Example /// @@ -29995,7 +30758,7 @@ impl<'a, C, NC, A> FloodlightActivityPatchCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -30052,7 +30815,7 @@ impl<'a, C, NC, A> FloodlightActivityPatchCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -30068,7 +30831,6 @@ impl<'a, C, NC, A> FloodlightActivityPatchCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -30078,7 +30840,7 @@ impl<'a, C, NC, A> FloodlightActivityPatchCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -30089,7 +30851,7 @@ impl<'a, C, NC, A> FloodlightActivityPatchCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -30098,13 +30860,13 @@ impl<'a, C, NC, A> FloodlightActivityPatchCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -30125,7 +30887,7 @@ impl<'a, C, NC, A> FloodlightActivityPatchCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -30135,7 +30897,7 @@ impl<'a, C, NC, A> FloodlightActivityPatchCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Floodlight activity ID. + /// Floodlight activity ID. pub fn id(mut self, new_value: &str) -> FloodlightActivityPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -30196,7 +30958,7 @@ impl<'a, C, NC, A> FloodlightActivityPatchCall<'a, C, NC, A> where NC: hyper::ne /// Generates a tag for a floodlight activity. /// /// A builder for the *generatetag* method supported by a *floodlightActivity* resource. -/// It is not used directly, but through a `FloodlightActivityMethods`. +/// It is not used directly, but through a `FloodlightActivityMethods` instance. /// /// # Example /// @@ -30259,7 +31021,7 @@ impl<'a, C, NC, A> FloodlightActivityGeneratetagCall<'a, C, NC, A> where NC: hyp for &field in ["alt", "profileId", "floodlightActivityId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -30312,7 +31074,7 @@ impl<'a, C, NC, A> FloodlightActivityGeneratetagCall<'a, C, NC, A> where NC: hyp } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -30324,7 +31086,6 @@ impl<'a, C, NC, A> FloodlightActivityGeneratetagCall<'a, C, NC, A> where NC: hyp dlg.pre_request(); req.send() - }; match req_result { @@ -30334,7 +31095,7 @@ impl<'a, C, NC, A> FloodlightActivityGeneratetagCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -30345,7 +31106,7 @@ impl<'a, C, NC, A> FloodlightActivityGeneratetagCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -30354,13 +31115,13 @@ impl<'a, C, NC, A> FloodlightActivityGeneratetagCall<'a, C, NC, A> where NC: hyp Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -30372,7 +31133,7 @@ impl<'a, C, NC, A> FloodlightActivityGeneratetagCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityGeneratetagCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -30380,7 +31141,7 @@ impl<'a, C, NC, A> FloodlightActivityGeneratetagCall<'a, C, NC, A> where NC: hyp /// Sets the *floodlight activity id* query property to the given value. /// /// - /// Floodlight activity ID for which we want to generate a tag. + /// Floodlight activity ID for which we want to generate a tag. pub fn floodlight_activity_id(mut self, new_value: &str) -> FloodlightActivityGeneratetagCall<'a, C, NC, A> { self._floodlight_activity_id = Some(new_value.to_string()); self @@ -30441,7 +31202,7 @@ impl<'a, C, NC, A> FloodlightActivityGeneratetagCall<'a, C, NC, A> where NC: hyp /// Updates an existing floodlight activity. /// /// A builder for the *update* method supported by a *floodlightActivity* resource. -/// It is not used directly, but through a `FloodlightActivityMethods`. +/// It is not used directly, but through a `FloodlightActivityMethods` instance. /// /// # Example /// @@ -30506,7 +31267,7 @@ impl<'a, C, NC, A> FloodlightActivityUpdateCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -30563,7 +31324,7 @@ impl<'a, C, NC, A> FloodlightActivityUpdateCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -30579,7 +31340,6 @@ impl<'a, C, NC, A> FloodlightActivityUpdateCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -30589,7 +31349,7 @@ impl<'a, C, NC, A> FloodlightActivityUpdateCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -30600,7 +31360,7 @@ impl<'a, C, NC, A> FloodlightActivityUpdateCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -30609,13 +31369,13 @@ impl<'a, C, NC, A> FloodlightActivityUpdateCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -30636,7 +31396,7 @@ impl<'a, C, NC, A> FloodlightActivityUpdateCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightActivityUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -30697,7 +31457,7 @@ impl<'a, C, NC, A> FloodlightActivityUpdateCall<'a, C, NC, A> where NC: hyper::n /// Retrieves a list of regions. /// /// A builder for the *list* method supported by a *region* resource. -/// It is not used directly, but through a `RegionMethods`. +/// It is not used directly, but through a `RegionMethods` instance. /// /// # Example /// @@ -30755,7 +31515,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -30808,7 +31568,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -30820,7 +31580,6 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -30830,7 +31589,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -30841,7 +31600,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -30850,13 +31609,13 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -30868,7 +31627,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> RegionListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -30929,7 +31688,7 @@ impl<'a, C, NC, A> RegionListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Inserts a new creative group. /// /// A builder for the *insert* method supported by a *creativeGroup* resource. -/// It is not used directly, but through a `CreativeGroupMethods`. +/// It is not used directly, but through a `CreativeGroupMethods` instance. /// /// # Example /// @@ -30994,7 +31753,7 @@ impl<'a, C, NC, A> CreativeGroupInsertCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -31051,7 +31810,7 @@ impl<'a, C, NC, A> CreativeGroupInsertCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -31067,7 +31826,6 @@ impl<'a, C, NC, A> CreativeGroupInsertCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -31077,7 +31835,7 @@ impl<'a, C, NC, A> CreativeGroupInsertCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -31088,7 +31846,7 @@ impl<'a, C, NC, A> CreativeGroupInsertCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -31097,13 +31855,13 @@ impl<'a, C, NC, A> CreativeGroupInsertCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -31124,7 +31882,7 @@ impl<'a, C, NC, A> CreativeGroupInsertCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeGroupInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -31185,7 +31943,7 @@ impl<'a, C, NC, A> CreativeGroupInsertCall<'a, C, NC, A> where NC: hyper::net::N /// Gets one creative group by ID. /// /// A builder for the *get* method supported by a *creativeGroup* resource. -/// It is not used directly, but through a `CreativeGroupMethods`. +/// It is not used directly, but through a `CreativeGroupMethods` instance. /// /// # Example /// @@ -31245,7 +32003,7 @@ impl<'a, C, NC, A> CreativeGroupGetCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -31298,7 +32056,7 @@ impl<'a, C, NC, A> CreativeGroupGetCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -31310,7 +32068,6 @@ impl<'a, C, NC, A> CreativeGroupGetCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -31320,7 +32077,7 @@ impl<'a, C, NC, A> CreativeGroupGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -31331,7 +32088,7 @@ impl<'a, C, NC, A> CreativeGroupGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -31340,13 +32097,13 @@ impl<'a, C, NC, A> CreativeGroupGetCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -31358,7 +32115,7 @@ impl<'a, C, NC, A> CreativeGroupGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeGroupGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -31368,7 +32125,7 @@ impl<'a, C, NC, A> CreativeGroupGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative group ID. + /// Creative group ID. pub fn id(mut self, new_value: &str) -> CreativeGroupGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -31429,7 +32186,7 @@ impl<'a, C, NC, A> CreativeGroupGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Updates an existing creative group. /// /// A builder for the *update* method supported by a *creativeGroup* resource. -/// It is not used directly, but through a `CreativeGroupMethods`. +/// It is not used directly, but through a `CreativeGroupMethods` instance. /// /// # Example /// @@ -31494,7 +32251,7 @@ impl<'a, C, NC, A> CreativeGroupUpdateCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -31551,7 +32308,7 @@ impl<'a, C, NC, A> CreativeGroupUpdateCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -31567,7 +32324,6 @@ impl<'a, C, NC, A> CreativeGroupUpdateCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -31577,7 +32333,7 @@ impl<'a, C, NC, A> CreativeGroupUpdateCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -31588,7 +32344,7 @@ impl<'a, C, NC, A> CreativeGroupUpdateCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -31597,13 +32353,13 @@ impl<'a, C, NC, A> CreativeGroupUpdateCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -31624,7 +32380,7 @@ impl<'a, C, NC, A> CreativeGroupUpdateCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeGroupUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -31685,7 +32441,7 @@ impl<'a, C, NC, A> CreativeGroupUpdateCall<'a, C, NC, A> where NC: hyper::net::N /// Retrieves a list of creative groups, possibly filtered. /// /// A builder for the *list* method supported by a *creativeGroup* resource. -/// It is not used directly, but through a `CreativeGroupMethods`. +/// It is not used directly, but through a `CreativeGroupMethods` instance. /// /// # Example /// @@ -31791,7 +32547,7 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "profileId", "sortOrder", "sortField", "searchString", "pageToken", "maxResults", "ids", "groupNumber", "advertiserIds"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -31844,7 +32600,7 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -31856,7 +32612,6 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -31866,7 +32621,7 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -31877,7 +32632,7 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -31886,13 +32641,13 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -31904,7 +32659,7 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -31912,7 +32667,7 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -31920,7 +32675,7 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -31928,7 +32683,7 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for creative groups by name or ID. Wildcards (*) are allowed. For example, "creativegroup*2015" will return creative groups with names like "creativegroup June 2015", "creativegroup April 2015" or simply "creativegroup 2015". Most of the searches also add wild-cards implicitly at the start and the end of the search string. For example, a search string of "creativegroup" will match creative groups with the name "my creativegroup", "creativegroup 2015" or simply "creativegroup". + /// Allows searching for creative groups by name or ID. Wildcards (*) are allowed. For example, "creativegroup*2015" will return creative groups with names like "creativegroup June 2015", "creativegroup April 2015" or simply "creativegroup 2015". Most of the searches also add wild-cards implicitly at the start and the end of the search string. For example, a search string of "creativegroup" will match creative groups with the name "my creativegroup", "creativegroup 2015" or simply "creativegroup". pub fn search_string(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -31936,7 +32691,7 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -31944,7 +32699,7 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> CreativeGroupListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -31953,7 +32708,7 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only creative groups with these IDs. + /// Select only creative groups with these IDs. pub fn add_ids(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -31961,7 +32716,7 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *group number* query property to the given value. /// /// - /// Select only creative groups that belong to this subgroup. + /// Select only creative groups that belong to this subgroup. pub fn group_number(mut self, new_value: i32) -> CreativeGroupListCall<'a, C, NC, A> { self._group_number = Some(new_value); self @@ -31970,7 +32725,7 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only creative groups that belong to these advertisers. + /// Select only creative groups that belong to these advertisers. pub fn add_advertiser_ids(mut self, new_value: &str) -> CreativeGroupListCall<'a, C, NC, A> { self._advertiser_ids.push(new_value.to_string()); self @@ -32031,7 +32786,7 @@ impl<'a, C, NC, A> CreativeGroupListCall<'a, C, NC, A> where NC: hyper::net::Net /// Updates an existing creative group. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *creativeGroup* resource. -/// It is not used directly, but through a `CreativeGroupMethods`. +/// It is not used directly, but through a `CreativeGroupMethods` instance. /// /// # Example /// @@ -32098,7 +32853,7 @@ impl<'a, C, NC, A> CreativeGroupPatchCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -32155,7 +32910,7 @@ impl<'a, C, NC, A> CreativeGroupPatchCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -32171,7 +32926,6 @@ impl<'a, C, NC, A> CreativeGroupPatchCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -32181,7 +32935,7 @@ impl<'a, C, NC, A> CreativeGroupPatchCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -32192,7 +32946,7 @@ impl<'a, C, NC, A> CreativeGroupPatchCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -32201,13 +32955,13 @@ impl<'a, C, NC, A> CreativeGroupPatchCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -32228,7 +32982,7 @@ impl<'a, C, NC, A> CreativeGroupPatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeGroupPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -32238,7 +32992,7 @@ impl<'a, C, NC, A> CreativeGroupPatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative group ID. + /// Creative group ID. pub fn id(mut self, new_value: &str) -> CreativeGroupPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -32299,7 +33053,7 @@ impl<'a, C, NC, A> CreativeGroupPatchCall<'a, C, NC, A> where NC: hyper::net::Ne /// Updates an existing subaccount. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *subaccount* resource. -/// It is not used directly, but through a `SubaccountMethods`. +/// It is not used directly, but through a `SubaccountMethods` instance. /// /// # Example /// @@ -32366,7 +33120,7 @@ impl<'a, C, NC, A> SubaccountPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -32423,7 +33177,7 @@ impl<'a, C, NC, A> SubaccountPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -32439,7 +33193,6 @@ impl<'a, C, NC, A> SubaccountPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -32449,7 +33202,7 @@ impl<'a, C, NC, A> SubaccountPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -32460,7 +33213,7 @@ impl<'a, C, NC, A> SubaccountPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -32469,13 +33222,13 @@ impl<'a, C, NC, A> SubaccountPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -32496,7 +33249,7 @@ impl<'a, C, NC, A> SubaccountPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SubaccountPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -32506,7 +33259,7 @@ impl<'a, C, NC, A> SubaccountPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Subaccount ID. + /// Subaccount ID. pub fn id(mut self, new_value: &str) -> SubaccountPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -32567,7 +33320,7 @@ impl<'a, C, NC, A> SubaccountPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Inserts a new subaccount. /// /// A builder for the *insert* method supported by a *subaccount* resource. -/// It is not used directly, but through a `SubaccountMethods`. +/// It is not used directly, but through a `SubaccountMethods` instance. /// /// # Example /// @@ -32632,7 +33385,7 @@ impl<'a, C, NC, A> SubaccountInsertCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -32689,7 +33442,7 @@ impl<'a, C, NC, A> SubaccountInsertCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -32705,7 +33458,6 @@ impl<'a, C, NC, A> SubaccountInsertCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -32715,7 +33467,7 @@ impl<'a, C, NC, A> SubaccountInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -32726,7 +33478,7 @@ impl<'a, C, NC, A> SubaccountInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -32735,13 +33487,13 @@ impl<'a, C, NC, A> SubaccountInsertCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -32762,7 +33514,7 @@ impl<'a, C, NC, A> SubaccountInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SubaccountInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -32823,7 +33575,7 @@ impl<'a, C, NC, A> SubaccountInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Gets a list of subaccounts, possibly filtered. /// /// A builder for the *list* method supported by a *subaccount* resource. -/// It is not used directly, but through a `SubaccountMethods`. +/// It is not used directly, but through a `SubaccountMethods` instance. /// /// # Example /// @@ -32915,7 +33667,7 @@ impl<'a, C, NC, A> SubaccountListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId", "sortOrder", "sortField", "searchString", "pageToken", "maxResults", "ids"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -32968,7 +33720,7 @@ impl<'a, C, NC, A> SubaccountListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -32980,7 +33732,6 @@ impl<'a, C, NC, A> SubaccountListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -32990,7 +33741,7 @@ impl<'a, C, NC, A> SubaccountListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -33001,7 +33752,7 @@ impl<'a, C, NC, A> SubaccountListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -33010,13 +33761,13 @@ impl<'a, C, NC, A> SubaccountListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -33028,7 +33779,7 @@ impl<'a, C, NC, A> SubaccountListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SubaccountListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -33036,7 +33787,7 @@ impl<'a, C, NC, A> SubaccountListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> SubaccountListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -33044,7 +33795,7 @@ impl<'a, C, NC, A> SubaccountListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> SubaccountListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -33052,7 +33803,7 @@ impl<'a, C, NC, A> SubaccountListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "subaccount*2015" will return objects with names like "subaccount June 2015", "subaccount April 2015" or simply "subaccount 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "subaccount" will match objects with name "my subaccount", "subaccount 2015" or simply "subaccount". + /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "subaccount*2015" will return objects with names like "subaccount June 2015", "subaccount April 2015" or simply "subaccount 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "subaccount" will match objects with name "my subaccount", "subaccount 2015" or simply "subaccount". pub fn search_string(mut self, new_value: &str) -> SubaccountListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -33060,7 +33811,7 @@ impl<'a, C, NC, A> SubaccountListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> SubaccountListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -33068,7 +33819,7 @@ impl<'a, C, NC, A> SubaccountListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> SubaccountListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -33077,7 +33828,7 @@ impl<'a, C, NC, A> SubaccountListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only subaccounts with these IDs. + /// Select only subaccounts with these IDs. pub fn add_ids(mut self, new_value: &str) -> SubaccountListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -33138,7 +33889,7 @@ impl<'a, C, NC, A> SubaccountListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Updates an existing subaccount. /// /// A builder for the *update* method supported by a *subaccount* resource. -/// It is not used directly, but through a `SubaccountMethods`. +/// It is not used directly, but through a `SubaccountMethods` instance. /// /// # Example /// @@ -33203,7 +33954,7 @@ impl<'a, C, NC, A> SubaccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -33260,7 +34011,7 @@ impl<'a, C, NC, A> SubaccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -33276,7 +34027,6 @@ impl<'a, C, NC, A> SubaccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -33286,7 +34036,7 @@ impl<'a, C, NC, A> SubaccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -33297,7 +34047,7 @@ impl<'a, C, NC, A> SubaccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -33306,13 +34056,13 @@ impl<'a, C, NC, A> SubaccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -33333,7 +34083,7 @@ impl<'a, C, NC, A> SubaccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SubaccountUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -33394,7 +34144,7 @@ impl<'a, C, NC, A> SubaccountUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Gets one subaccount by ID. /// /// A builder for the *get* method supported by a *subaccount* resource. -/// It is not used directly, but through a `SubaccountMethods`. +/// It is not used directly, but through a `SubaccountMethods` instance. /// /// # Example /// @@ -33454,7 +34204,7 @@ impl<'a, C, NC, A> SubaccountGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -33507,7 +34257,7 @@ impl<'a, C, NC, A> SubaccountGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -33519,7 +34269,6 @@ impl<'a, C, NC, A> SubaccountGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -33529,7 +34278,7 @@ impl<'a, C, NC, A> SubaccountGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -33540,7 +34289,7 @@ impl<'a, C, NC, A> SubaccountGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -33549,13 +34298,13 @@ impl<'a, C, NC, A> SubaccountGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -33567,7 +34316,7 @@ impl<'a, C, NC, A> SubaccountGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SubaccountGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -33577,7 +34326,7 @@ impl<'a, C, NC, A> SubaccountGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Subaccount ID. + /// Subaccount ID. pub fn id(mut self, new_value: &str) -> SubaccountGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -33638,7 +34387,7 @@ impl<'a, C, NC, A> SubaccountGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Retrieves a list of mobile carriers. /// /// A builder for the *list* method supported by a *mobileCarrier* resource. -/// It is not used directly, but through a `MobileCarrierMethods`. +/// It is not used directly, but through a `MobileCarrierMethods` instance. /// /// # Example /// @@ -33696,7 +34445,7 @@ impl<'a, C, NC, A> MobileCarrierListCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -33749,7 +34498,7 @@ impl<'a, C, NC, A> MobileCarrierListCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -33761,7 +34510,6 @@ impl<'a, C, NC, A> MobileCarrierListCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -33771,7 +34519,7 @@ impl<'a, C, NC, A> MobileCarrierListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -33782,7 +34530,7 @@ impl<'a, C, NC, A> MobileCarrierListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -33791,13 +34539,13 @@ impl<'a, C, NC, A> MobileCarrierListCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -33809,7 +34557,7 @@ impl<'a, C, NC, A> MobileCarrierListCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> MobileCarrierListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -33870,7 +34618,7 @@ impl<'a, C, NC, A> MobileCarrierListCall<'a, C, NC, A> where NC: hyper::net::Net /// Updates an existing floodlight configuration. /// /// A builder for the *update* method supported by a *floodlightConfiguration* resource. -/// It is not used directly, but through a `FloodlightConfigurationMethods`. +/// It is not used directly, but through a `FloodlightConfigurationMethods` instance. /// /// # Example /// @@ -33935,7 +34683,7 @@ impl<'a, C, NC, A> FloodlightConfigurationUpdateCall<'a, C, NC, A> where NC: hyp for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -33992,7 +34740,7 @@ impl<'a, C, NC, A> FloodlightConfigurationUpdateCall<'a, C, NC, A> where NC: hyp } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -34008,7 +34756,6 @@ impl<'a, C, NC, A> FloodlightConfigurationUpdateCall<'a, C, NC, A> where NC: hyp dlg.pre_request(); req.send() - }; match req_result { @@ -34018,7 +34765,7 @@ impl<'a, C, NC, A> FloodlightConfigurationUpdateCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -34029,7 +34776,7 @@ impl<'a, C, NC, A> FloodlightConfigurationUpdateCall<'a, C, NC, A> where NC: hyp continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -34038,13 +34785,13 @@ impl<'a, C, NC, A> FloodlightConfigurationUpdateCall<'a, C, NC, A> where NC: hyp Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -34065,7 +34812,7 @@ impl<'a, C, NC, A> FloodlightConfigurationUpdateCall<'a, C, NC, A> where NC: hyp /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightConfigurationUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -34126,7 +34873,7 @@ impl<'a, C, NC, A> FloodlightConfigurationUpdateCall<'a, C, NC, A> where NC: hyp /// Updates an existing floodlight configuration. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *floodlightConfiguration* resource. -/// It is not used directly, but through a `FloodlightConfigurationMethods`. +/// It is not used directly, but through a `FloodlightConfigurationMethods` instance. /// /// # Example /// @@ -34193,7 +34940,7 @@ impl<'a, C, NC, A> FloodlightConfigurationPatchCall<'a, C, NC, A> where NC: hype for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -34250,7 +34997,7 @@ impl<'a, C, NC, A> FloodlightConfigurationPatchCall<'a, C, NC, A> where NC: hype } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -34266,7 +35013,6 @@ impl<'a, C, NC, A> FloodlightConfigurationPatchCall<'a, C, NC, A> where NC: hype dlg.pre_request(); req.send() - }; match req_result { @@ -34276,7 +35022,7 @@ impl<'a, C, NC, A> FloodlightConfigurationPatchCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -34287,7 +35033,7 @@ impl<'a, C, NC, A> FloodlightConfigurationPatchCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -34296,13 +35042,13 @@ impl<'a, C, NC, A> FloodlightConfigurationPatchCall<'a, C, NC, A> where NC: hype Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -34323,7 +35069,7 @@ impl<'a, C, NC, A> FloodlightConfigurationPatchCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightConfigurationPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -34333,7 +35079,7 @@ impl<'a, C, NC, A> FloodlightConfigurationPatchCall<'a, C, NC, A> where NC: hype /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Floodlight configuration ID. + /// Floodlight configuration ID. pub fn id(mut self, new_value: &str) -> FloodlightConfigurationPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -34394,7 +35140,7 @@ impl<'a, C, NC, A> FloodlightConfigurationPatchCall<'a, C, NC, A> where NC: hype /// Gets one floodlight configuration by ID. /// /// A builder for the *get* method supported by a *floodlightConfiguration* resource. -/// It is not used directly, but through a `FloodlightConfigurationMethods`. +/// It is not used directly, but through a `FloodlightConfigurationMethods` instance. /// /// # Example /// @@ -34454,7 +35200,7 @@ impl<'a, C, NC, A> FloodlightConfigurationGetCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -34507,7 +35253,7 @@ impl<'a, C, NC, A> FloodlightConfigurationGetCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -34519,7 +35265,6 @@ impl<'a, C, NC, A> FloodlightConfigurationGetCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -34529,7 +35274,7 @@ impl<'a, C, NC, A> FloodlightConfigurationGetCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -34540,7 +35285,7 @@ impl<'a, C, NC, A> FloodlightConfigurationGetCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -34549,13 +35294,13 @@ impl<'a, C, NC, A> FloodlightConfigurationGetCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -34567,7 +35312,7 @@ impl<'a, C, NC, A> FloodlightConfigurationGetCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightConfigurationGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -34577,7 +35322,7 @@ impl<'a, C, NC, A> FloodlightConfigurationGetCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Floodlight configuration ID. + /// Floodlight configuration ID. pub fn id(mut self, new_value: &str) -> FloodlightConfigurationGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -34638,7 +35383,7 @@ impl<'a, C, NC, A> FloodlightConfigurationGetCall<'a, C, NC, A> where NC: hyper: /// Retrieves a list of floodlight configurations, possibly filtered. /// /// A builder for the *list* method supported by a *floodlightConfiguration* resource. -/// It is not used directly, but through a `FloodlightConfigurationMethods`. +/// It is not used directly, but through a `FloodlightConfigurationMethods` instance. /// /// # Example /// @@ -34705,7 +35450,7 @@ impl<'a, C, NC, A> FloodlightConfigurationListCall<'a, C, NC, A> where NC: hyper for &field in ["alt", "profileId", "ids"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -34758,7 +35503,7 @@ impl<'a, C, NC, A> FloodlightConfigurationListCall<'a, C, NC, A> where NC: hyper } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -34770,7 +35515,6 @@ impl<'a, C, NC, A> FloodlightConfigurationListCall<'a, C, NC, A> where NC: hyper dlg.pre_request(); req.send() - }; match req_result { @@ -34780,7 +35524,7 @@ impl<'a, C, NC, A> FloodlightConfigurationListCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -34791,7 +35535,7 @@ impl<'a, C, NC, A> FloodlightConfigurationListCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -34800,13 +35544,13 @@ impl<'a, C, NC, A> FloodlightConfigurationListCall<'a, C, NC, A> where NC: hyper Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -34818,7 +35562,7 @@ impl<'a, C, NC, A> FloodlightConfigurationListCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> FloodlightConfigurationListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -34827,7 +35571,7 @@ impl<'a, C, NC, A> FloodlightConfigurationListCall<'a, C, NC, A> where NC: hyper /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Set of IDs of floodlight configurations to retrieve. Required field; otherwise an empty list will be returned. + /// Set of IDs of floodlight configurations to retrieve. Required field; otherwise an empty list will be returned. pub fn add_ids(mut self, new_value: &str) -> FloodlightConfigurationListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -34888,7 +35632,7 @@ impl<'a, C, NC, A> FloodlightConfigurationListCall<'a, C, NC, A> where NC: hyper /// Retrieves a list of operating systems. /// /// A builder for the *list* method supported by a *operatingSystem* resource. -/// It is not used directly, but through a `OperatingSystemMethods`. +/// It is not used directly, but through a `OperatingSystemMethods` instance. /// /// # Example /// @@ -34946,7 +35690,7 @@ impl<'a, C, NC, A> OperatingSystemListCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -34999,7 +35743,7 @@ impl<'a, C, NC, A> OperatingSystemListCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -35011,7 +35755,6 @@ impl<'a, C, NC, A> OperatingSystemListCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -35021,7 +35764,7 @@ impl<'a, C, NC, A> OperatingSystemListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -35032,7 +35775,7 @@ impl<'a, C, NC, A> OperatingSystemListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -35041,13 +35784,13 @@ impl<'a, C, NC, A> OperatingSystemListCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -35059,7 +35802,7 @@ impl<'a, C, NC, A> OperatingSystemListCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> OperatingSystemListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -35120,7 +35863,7 @@ impl<'a, C, NC, A> OperatingSystemListCall<'a, C, NC, A> where NC: hyper::net::N /// Lists files for a user profile. /// /// A builder for the *list* method supported by a *file* resource. -/// It is not used directly, but through a `FileMethods`. +/// It is not used directly, but through a `FileMethods` instance. /// /// # Example /// @@ -35203,7 +35946,7 @@ impl<'a, C, NC, A> FileListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "profileId", "sortOrder", "sortField", "scope", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -35256,7 +35999,7 @@ impl<'a, C, NC, A> FileListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -35268,7 +36011,6 @@ impl<'a, C, NC, A> FileListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -35278,7 +36020,7 @@ impl<'a, C, NC, A> FileListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -35289,7 +36031,7 @@ impl<'a, C, NC, A> FileListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -35298,13 +36040,13 @@ impl<'a, C, NC, A> FileListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -35316,7 +36058,7 @@ impl<'a, C, NC, A> FileListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The DFA profile ID. + /// The DFA profile ID. pub fn profile_id(mut self, new_value: &str) -> FileListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -35324,7 +36066,7 @@ impl<'a, C, NC, A> FileListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is 'DESCENDING'. + /// Order of sorted results, default is 'DESCENDING'. pub fn sort_order(mut self, new_value: &str) -> FileListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -35332,7 +36074,7 @@ impl<'a, C, NC, A> FileListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *sort field* query property to the given value. /// /// - /// The field by which to sort the list. + /// The field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> FileListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -35340,7 +36082,7 @@ impl<'a, C, NC, A> FileListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *scope* query property to the given value. /// /// - /// The scope that defines which results are returned, default is 'MINE'. + /// The scope that defines which results are returned, default is 'MINE'. pub fn scope(mut self, new_value: &str) -> FileListCall<'a, C, NC, A> { self._scope = Some(new_value.to_string()); self @@ -35348,7 +36090,7 @@ impl<'a, C, NC, A> FileListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *page token* query property to the given value. /// /// - /// The value of the nextToken from the previous result page. + /// The value of the nextToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> FileListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -35356,7 +36098,7 @@ impl<'a, C, NC, A> FileListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> FileListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -35422,7 +36164,7 @@ impl<'a, C, NC, A> FileListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// but not the `File` structure that you would usually get. The latter will be a default value. /// /// A builder for the *get* method supported by a *file* resource. -/// It is not used directly, but through a `FileMethods`. +/// It is not used directly, but through a `FileMethods` instance. /// /// # Example /// @@ -35482,7 +36224,7 @@ impl<'a, C, NC, A> FileGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["reportId", "fileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -35551,7 +36293,7 @@ impl<'a, C, NC, A> FileGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -35563,7 +36305,6 @@ impl<'a, C, NC, A> FileGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -35573,7 +36314,7 @@ impl<'a, C, NC, A> FileGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -35584,7 +36325,7 @@ impl<'a, C, NC, A> FileGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = if enable_resource_parsing { let mut json_response = String::new(); @@ -35593,13 +36334,13 @@ impl<'a, C, NC, A> FileGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } } else { (res, Default::default()) }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -35611,7 +36352,7 @@ impl<'a, C, NC, A> FileGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the report. + /// The ID of the report. pub fn report_id(mut self, new_value: &str) -> FileGetCall<'a, C, NC, A> { self._report_id = new_value.to_string(); self @@ -35621,7 +36362,7 @@ impl<'a, C, NC, A> FileGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the report file. + /// The ID of the report file. pub fn file_id(mut self, new_value: &str) -> FileGetCall<'a, C, NC, A> { self._file_id = new_value.to_string(); self @@ -35682,7 +36423,7 @@ impl<'a, C, NC, A> FileGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Retrieves a list of placement groups, possibly filtered. /// /// A builder for the *list* method supported by a *placementGroup* resource. -/// It is not used directly, but through a `PlacementGroupMethods`. +/// It is not used directly, but through a `PlacementGroupMethods` instance. /// /// # Example /// @@ -35847,7 +36588,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "profileId", "sortOrder", "sortField", "siteIds", "searchString", "pricingTypes", "placementStrategyIds", "placementGroupType", "pageToken", "maxResults", "ids", "directorySiteIds", "contentCategoryIds", "campaignIds", "archived", "advertiserIds"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -35900,7 +36641,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -35912,7 +36653,6 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -35922,7 +36662,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -35933,7 +36673,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -35942,13 +36682,13 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -35960,7 +36700,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -35968,7 +36708,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -35976,7 +36716,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -35985,7 +36725,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placement groups that are associated with these sites. + /// Select only placement groups that are associated with these sites. pub fn add_site_ids(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, NC, A> { self._site_ids.push(new_value.to_string()); self @@ -35993,7 +36733,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for placement groups by name or ID. Wildcards (*) are allowed. For example, "placement*2015" will return placement groups with names like "placement group June 2015", "placement group May 2015" or simply "placements 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placementgroup" will match placement groups with name "my placementgroup", "placementgroup 2015" or simply "placementgroup". + /// Allows searching for placement groups by name or ID. Wildcards (*) are allowed. For example, "placement*2015" will return placement groups with names like "placement group June 2015", "placement group May 2015" or simply "placements 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placementgroup" will match placement groups with name "my placementgroup", "placementgroup 2015" or simply "placementgroup". pub fn search_string(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -36002,7 +36742,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placement groups with these pricing types. + /// Select only placement groups with these pricing types. pub fn add_pricing_types(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, NC, A> { self._pricing_types.push(new_value.to_string()); self @@ -36011,7 +36751,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placement groups that are associated with these placement strategies. + /// Select only placement groups that are associated with these placement strategies. pub fn add_placement_strategy_ids(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, NC, A> { self._placement_strategy_ids.push(new_value.to_string()); self @@ -36019,7 +36759,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *placement group type* query property to the given value. /// /// - /// Select only placement groups belonging with this group type. A package is a simple group of placements that acts as a single pricing point for a group of tags. A roadblock is a group of placements that not only acts as a single pricing point but also assumes that all the tags in it will be served at the same time. A roadblock requires one of its assigned placements to be marked as primary for reporting. + /// Select only placement groups belonging with this group type. A package is a simple group of placements that acts as a single pricing point for a group of tags. A roadblock is a group of placements that not only acts as a single pricing point but also assumes that all the tags in it will be served at the same time. A roadblock requires one of its assigned placements to be marked as primary for reporting. pub fn placement_group_type(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, NC, A> { self._placement_group_type = Some(new_value.to_string()); self @@ -36027,7 +36767,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -36035,7 +36775,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> PlacementGroupListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -36044,7 +36784,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placement groups with these IDs. + /// Select only placement groups with these IDs. pub fn add_ids(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -36053,7 +36793,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placement groups that are associated with these directory sites. + /// Select only placement groups that are associated with these directory sites. pub fn add_directory_site_ids(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, NC, A> { self._directory_site_ids.push(new_value.to_string()); self @@ -36062,7 +36802,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placement groups that are associated with these content categories. + /// Select only placement groups that are associated with these content categories. pub fn add_content_category_ids(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, NC, A> { self._content_category_ids.push(new_value.to_string()); self @@ -36071,7 +36811,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placement groups that belong to these campaigns. + /// Select only placement groups that belong to these campaigns. pub fn add_campaign_ids(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, NC, A> { self._campaign_ids.push(new_value.to_string()); self @@ -36079,7 +36819,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Sets the *archived* query property to the given value. /// /// - /// Select only archived placements. Don't set this field to select both archived and non-archived placements. + /// Select only archived placements. Don't set this field to select both archived and non-archived placements. pub fn archived(mut self, new_value: bool) -> PlacementGroupListCall<'a, C, NC, A> { self._archived = Some(new_value); self @@ -36088,7 +36828,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placement groups that belong to these advertisers. + /// Select only placement groups that belong to these advertisers. pub fn add_advertiser_ids(mut self, new_value: &str) -> PlacementGroupListCall<'a, C, NC, A> { self._advertiser_ids.push(new_value.to_string()); self @@ -36149,7 +36889,7 @@ impl<'a, C, NC, A> PlacementGroupListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Updates an existing placement group. /// /// A builder for the *update* method supported by a *placementGroup* resource. -/// It is not used directly, but through a `PlacementGroupMethods`. +/// It is not used directly, but through a `PlacementGroupMethods` instance. /// /// # Example /// @@ -36214,7 +36954,7 @@ impl<'a, C, NC, A> PlacementGroupUpdateCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -36271,7 +37011,7 @@ impl<'a, C, NC, A> PlacementGroupUpdateCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -36287,7 +37027,6 @@ impl<'a, C, NC, A> PlacementGroupUpdateCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -36297,7 +37036,7 @@ impl<'a, C, NC, A> PlacementGroupUpdateCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -36308,7 +37047,7 @@ impl<'a, C, NC, A> PlacementGroupUpdateCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -36317,13 +37056,13 @@ impl<'a, C, NC, A> PlacementGroupUpdateCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -36344,7 +37083,7 @@ impl<'a, C, NC, A> PlacementGroupUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementGroupUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -36405,7 +37144,7 @@ impl<'a, C, NC, A> PlacementGroupUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Inserts a new placement group. /// /// A builder for the *insert* method supported by a *placementGroup* resource. -/// It is not used directly, but through a `PlacementGroupMethods`. +/// It is not used directly, but through a `PlacementGroupMethods` instance. /// /// # Example /// @@ -36470,7 +37209,7 @@ impl<'a, C, NC, A> PlacementGroupInsertCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -36527,7 +37266,7 @@ impl<'a, C, NC, A> PlacementGroupInsertCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -36543,7 +37282,6 @@ impl<'a, C, NC, A> PlacementGroupInsertCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -36553,7 +37291,7 @@ impl<'a, C, NC, A> PlacementGroupInsertCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -36564,7 +37302,7 @@ impl<'a, C, NC, A> PlacementGroupInsertCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -36573,13 +37311,13 @@ impl<'a, C, NC, A> PlacementGroupInsertCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -36600,7 +37338,7 @@ impl<'a, C, NC, A> PlacementGroupInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementGroupInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -36661,7 +37399,7 @@ impl<'a, C, NC, A> PlacementGroupInsertCall<'a, C, NC, A> where NC: hyper::net:: /// Gets one placement group by ID. /// /// A builder for the *get* method supported by a *placementGroup* resource. -/// It is not used directly, but through a `PlacementGroupMethods`. +/// It is not used directly, but through a `PlacementGroupMethods` instance. /// /// # Example /// @@ -36721,7 +37459,7 @@ impl<'a, C, NC, A> PlacementGroupGetCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -36774,7 +37512,7 @@ impl<'a, C, NC, A> PlacementGroupGetCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -36786,7 +37524,6 @@ impl<'a, C, NC, A> PlacementGroupGetCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -36796,7 +37533,7 @@ impl<'a, C, NC, A> PlacementGroupGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -36807,7 +37544,7 @@ impl<'a, C, NC, A> PlacementGroupGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -36816,13 +37553,13 @@ impl<'a, C, NC, A> PlacementGroupGetCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -36834,7 +37571,7 @@ impl<'a, C, NC, A> PlacementGroupGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementGroupGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -36844,7 +37581,7 @@ impl<'a, C, NC, A> PlacementGroupGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Placement group ID. + /// Placement group ID. pub fn id(mut self, new_value: &str) -> PlacementGroupGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -36905,7 +37642,7 @@ impl<'a, C, NC, A> PlacementGroupGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Updates an existing placement group. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *placementGroup* resource. -/// It is not used directly, but through a `PlacementGroupMethods`. +/// It is not used directly, but through a `PlacementGroupMethods` instance. /// /// # Example /// @@ -36972,7 +37709,7 @@ impl<'a, C, NC, A> PlacementGroupPatchCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -37029,7 +37766,7 @@ impl<'a, C, NC, A> PlacementGroupPatchCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -37045,7 +37782,6 @@ impl<'a, C, NC, A> PlacementGroupPatchCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -37055,7 +37791,7 @@ impl<'a, C, NC, A> PlacementGroupPatchCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -37066,7 +37802,7 @@ impl<'a, C, NC, A> PlacementGroupPatchCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -37075,13 +37811,13 @@ impl<'a, C, NC, A> PlacementGroupPatchCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -37102,7 +37838,7 @@ impl<'a, C, NC, A> PlacementGroupPatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementGroupPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -37112,7 +37848,7 @@ impl<'a, C, NC, A> PlacementGroupPatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Placement group ID. + /// Placement group ID. pub fn id(mut self, new_value: &str) -> PlacementGroupPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -37173,7 +37909,7 @@ impl<'a, C, NC, A> PlacementGroupPatchCall<'a, C, NC, A> where NC: hyper::net::N /// Inserts a new creative asset. /// /// A builder for the *insert* method supported by a *creativeAsset* resource. -/// It is not used directly, but through a `CreativeAssetMethods`. +/// It is not used directly, but through a `CreativeAssetMethods` instance. /// /// # Example /// @@ -37242,7 +37978,7 @@ impl<'a, C, NC, A> CreativeAssetInsertCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "profileId", "advertiserId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -37309,7 +38045,7 @@ impl<'a, C, NC, A> CreativeAssetInsertCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -37335,7 +38071,7 @@ impl<'a, C, NC, A> CreativeAssetInsertCall<'a, C, NC, A> where NC: hyper::net::N let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); if size > 104857600 { - return Result::UploadSizeLimitExceeded(size, 104857600) + return Err(Error::UploadSizeLimitExceeded(size, 104857600)) } mp_reader.add_part(&mut request_value_reader, request_size, json_mime_type.clone()) .add_part(&mut reader, size, reader_mime_type.clone()); @@ -37357,7 +38093,6 @@ impl<'a, C, NC, A> CreativeAssetInsertCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - } }; @@ -37368,7 +38103,7 @@ impl<'a, C, NC, A> CreativeAssetInsertCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -37379,13 +38114,13 @@ impl<'a, C, NC, A> CreativeAssetInsertCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } if protocol == "resumable" { let size = reader.seek(io::SeekFrom::End(0)).unwrap(); reader.seek(io::SeekFrom::Start(0)).unwrap(); if size > 104857600 { - return Result::UploadSizeLimitExceeded(size, 104857600) + return Err(Error::UploadSizeLimitExceeded(size, 104857600)) } let mut client = &mut *self.hub.client.borrow_mut(); let upload_result = { @@ -37410,17 +38145,17 @@ impl<'a, C, NC, A> CreativeAssetInsertCall<'a, C, NC, A> where NC: hyper::net::N match upload_result { None => { dlg.finished(false); - return Result::Cancelled + return Err(Error::Cancelled) } Some(Err(err)) => { dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Some(Ok(upload_result)) => { res = upload_result; if !res.status.is_success() { dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } } } @@ -37432,13 +38167,13 @@ impl<'a, C, NC, A> CreativeAssetInsertCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -37454,11 +38189,14 @@ impl<'a, C, NC, A> CreativeAssetInsertCall<'a, C, NC, A> where NC: hyper::net::N where RS: ReadSeek { self.doit(stream, mime_type, "simple") } - /// Upload media in a resumeable fashion. + /// Upload media in a resumable fashion. /// Even if the upload fails or is interrupted, it can be resumed for a /// certain amount of time as the server maintains state temporarily. /// - /// TODO: Write more about how delegation works in this particular case. + /// The delegate will be asked for an `upload_url()`, and if not provided, will be asked to store an upload URL + /// that was provided by the server, using `store_upload_url(...)`. The upload will be done in chunks, the delegate + /// may specify the `chunk_size()` and may cancel the operation before each chunk is uploaded, using + /// `cancel_chunk_upload(...)`. /// /// * *max size*: 100MB /// * *multipart*: yes @@ -37482,7 +38220,7 @@ impl<'a, C, NC, A> CreativeAssetInsertCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeAssetInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -37492,7 +38230,7 @@ impl<'a, C, NC, A> CreativeAssetInsertCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Advertiser ID of this creative. This is a required field. + /// Advertiser ID of this creative. This is a required field. pub fn advertiser_id(mut self, new_value: &str) -> CreativeAssetInsertCall<'a, C, NC, A> { self._advertiser_id = new_value.to_string(); self @@ -37553,7 +38291,7 @@ impl<'a, C, NC, A> CreativeAssetInsertCall<'a, C, NC, A> where NC: hyper::net::N /// Gets one user role permission by ID. /// /// A builder for the *get* method supported by a *userRolePermission* resource. -/// It is not used directly, but through a `UserRolePermissionMethods`. +/// It is not used directly, but through a `UserRolePermissionMethods` instance. /// /// # Example /// @@ -37613,7 +38351,7 @@ impl<'a, C, NC, A> UserRolePermissionGetCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -37666,7 +38404,7 @@ impl<'a, C, NC, A> UserRolePermissionGetCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -37678,7 +38416,6 @@ impl<'a, C, NC, A> UserRolePermissionGetCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -37688,7 +38425,7 @@ impl<'a, C, NC, A> UserRolePermissionGetCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -37699,7 +38436,7 @@ impl<'a, C, NC, A> UserRolePermissionGetCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -37708,13 +38445,13 @@ impl<'a, C, NC, A> UserRolePermissionGetCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -37726,7 +38463,7 @@ impl<'a, C, NC, A> UserRolePermissionGetCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRolePermissionGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -37736,7 +38473,7 @@ impl<'a, C, NC, A> UserRolePermissionGetCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User role permission ID. + /// User role permission ID. pub fn id(mut self, new_value: &str) -> UserRolePermissionGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -37797,7 +38534,7 @@ impl<'a, C, NC, A> UserRolePermissionGetCall<'a, C, NC, A> where NC: hyper::net: /// Gets a list of user role permissions, possibly filtered. /// /// A builder for the *list* method supported by a *userRolePermission* resource. -/// It is not used directly, but through a `UserRolePermissionMethods`. +/// It is not used directly, but through a `UserRolePermissionMethods` instance. /// /// # Example /// @@ -37864,7 +38601,7 @@ impl<'a, C, NC, A> UserRolePermissionListCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "profileId", "ids"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -37917,7 +38654,7 @@ impl<'a, C, NC, A> UserRolePermissionListCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -37929,7 +38666,6 @@ impl<'a, C, NC, A> UserRolePermissionListCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -37939,7 +38675,7 @@ impl<'a, C, NC, A> UserRolePermissionListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -37950,7 +38686,7 @@ impl<'a, C, NC, A> UserRolePermissionListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -37959,13 +38695,13 @@ impl<'a, C, NC, A> UserRolePermissionListCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -37977,7 +38713,7 @@ impl<'a, C, NC, A> UserRolePermissionListCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> UserRolePermissionListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -37986,7 +38722,7 @@ impl<'a, C, NC, A> UserRolePermissionListCall<'a, C, NC, A> where NC: hyper::net /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only user role permissions with these IDs. + /// Select only user role permissions with these IDs. pub fn add_ids(mut self, new_value: &str) -> UserRolePermissionListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -38047,7 +38783,7 @@ impl<'a, C, NC, A> UserRolePermissionListCall<'a, C, NC, A> where NC: hyper::net /// Retrieves the list of account permission groups. /// /// A builder for the *list* method supported by a *accountPermissionGroup* resource. -/// It is not used directly, but through a `AccountPermissionGroupMethods`. +/// It is not used directly, but through a `AccountPermissionGroupMethods` instance. /// /// # Example /// @@ -38105,7 +38841,7 @@ impl<'a, C, NC, A> AccountPermissionGroupListCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -38158,7 +38894,7 @@ impl<'a, C, NC, A> AccountPermissionGroupListCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -38170,7 +38906,6 @@ impl<'a, C, NC, A> AccountPermissionGroupListCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -38180,7 +38915,7 @@ impl<'a, C, NC, A> AccountPermissionGroupListCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -38191,7 +38926,7 @@ impl<'a, C, NC, A> AccountPermissionGroupListCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -38200,13 +38935,13 @@ impl<'a, C, NC, A> AccountPermissionGroupListCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -38218,7 +38953,7 @@ impl<'a, C, NC, A> AccountPermissionGroupListCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountPermissionGroupListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -38279,7 +39014,7 @@ impl<'a, C, NC, A> AccountPermissionGroupListCall<'a, C, NC, A> where NC: hyper: /// Gets one account permission group by ID. /// /// A builder for the *get* method supported by a *accountPermissionGroup* resource. -/// It is not used directly, but through a `AccountPermissionGroupMethods`. +/// It is not used directly, but through a `AccountPermissionGroupMethods` instance. /// /// # Example /// @@ -38339,7 +39074,7 @@ impl<'a, C, NC, A> AccountPermissionGroupGetCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -38392,7 +39127,7 @@ impl<'a, C, NC, A> AccountPermissionGroupGetCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -38404,7 +39139,6 @@ impl<'a, C, NC, A> AccountPermissionGroupGetCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -38414,7 +39148,7 @@ impl<'a, C, NC, A> AccountPermissionGroupGetCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -38425,7 +39159,7 @@ impl<'a, C, NC, A> AccountPermissionGroupGetCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -38434,13 +39168,13 @@ impl<'a, C, NC, A> AccountPermissionGroupGetCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -38452,7 +39186,7 @@ impl<'a, C, NC, A> AccountPermissionGroupGetCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountPermissionGroupGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -38462,7 +39196,7 @@ impl<'a, C, NC, A> AccountPermissionGroupGetCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account permission group ID. + /// Account permission group ID. pub fn id(mut self, new_value: &str) -> AccountPermissionGroupGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -38523,7 +39257,7 @@ impl<'a, C, NC, A> AccountPermissionGroupGetCall<'a, C, NC, A> where NC: hyper:: /// Retrieves a list of content categories, possibly filtered. /// /// A builder for the *list* method supported by a *contentCategory* resource. -/// It is not used directly, but through a `ContentCategoryMethods`. +/// It is not used directly, but through a `ContentCategoryMethods` instance. /// /// # Example /// @@ -38615,7 +39349,7 @@ impl<'a, C, NC, A> ContentCategoryListCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "profileId", "sortOrder", "sortField", "searchString", "pageToken", "maxResults", "ids"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -38668,7 +39402,7 @@ impl<'a, C, NC, A> ContentCategoryListCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -38680,7 +39414,6 @@ impl<'a, C, NC, A> ContentCategoryListCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -38690,7 +39423,7 @@ impl<'a, C, NC, A> ContentCategoryListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -38701,7 +39434,7 @@ impl<'a, C, NC, A> ContentCategoryListCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -38710,13 +39443,13 @@ impl<'a, C, NC, A> ContentCategoryListCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -38728,7 +39461,7 @@ impl<'a, C, NC, A> ContentCategoryListCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> ContentCategoryListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -38736,7 +39469,7 @@ impl<'a, C, NC, A> ContentCategoryListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> ContentCategoryListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -38744,7 +39477,7 @@ impl<'a, C, NC, A> ContentCategoryListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> ContentCategoryListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -38752,7 +39485,7 @@ impl<'a, C, NC, A> ContentCategoryListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "contentcategory*2015" will return objects with names like "contentcategory June 2015", "contentcategory April 2015" or simply "contentcategory 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "contentcategory" will match objects with name "my contentcategory", "contentcategory 2015" or simply "contentcategory". + /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "contentcategory*2015" will return objects with names like "contentcategory June 2015", "contentcategory April 2015" or simply "contentcategory 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "contentcategory" will match objects with name "my contentcategory", "contentcategory 2015" or simply "contentcategory". pub fn search_string(mut self, new_value: &str) -> ContentCategoryListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -38760,7 +39493,7 @@ impl<'a, C, NC, A> ContentCategoryListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> ContentCategoryListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -38768,7 +39501,7 @@ impl<'a, C, NC, A> ContentCategoryListCall<'a, C, NC, A> where NC: hyper::net::N /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> ContentCategoryListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -38777,7 +39510,7 @@ impl<'a, C, NC, A> ContentCategoryListCall<'a, C, NC, A> where NC: hyper::net::N /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only content categories with these IDs. + /// Select only content categories with these IDs. pub fn add_ids(mut self, new_value: &str) -> ContentCategoryListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -38838,7 +39571,7 @@ impl<'a, C, NC, A> ContentCategoryListCall<'a, C, NC, A> where NC: hyper::net::N /// Updates an existing content category. /// /// A builder for the *update* method supported by a *contentCategory* resource. -/// It is not used directly, but through a `ContentCategoryMethods`. +/// It is not used directly, but through a `ContentCategoryMethods` instance. /// /// # Example /// @@ -38903,7 +39636,7 @@ impl<'a, C, NC, A> ContentCategoryUpdateCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -38960,7 +39693,7 @@ impl<'a, C, NC, A> ContentCategoryUpdateCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -38976,7 +39709,6 @@ impl<'a, C, NC, A> ContentCategoryUpdateCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -38986,7 +39718,7 @@ impl<'a, C, NC, A> ContentCategoryUpdateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -38997,7 +39729,7 @@ impl<'a, C, NC, A> ContentCategoryUpdateCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -39006,13 +39738,13 @@ impl<'a, C, NC, A> ContentCategoryUpdateCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -39033,7 +39765,7 @@ impl<'a, C, NC, A> ContentCategoryUpdateCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> ContentCategoryUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -39094,7 +39826,7 @@ impl<'a, C, NC, A> ContentCategoryUpdateCall<'a, C, NC, A> where NC: hyper::net: /// Inserts a new content category. /// /// A builder for the *insert* method supported by a *contentCategory* resource. -/// It is not used directly, but through a `ContentCategoryMethods`. +/// It is not used directly, but through a `ContentCategoryMethods` instance. /// /// # Example /// @@ -39159,7 +39891,7 @@ impl<'a, C, NC, A> ContentCategoryInsertCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -39216,7 +39948,7 @@ impl<'a, C, NC, A> ContentCategoryInsertCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -39232,7 +39964,6 @@ impl<'a, C, NC, A> ContentCategoryInsertCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -39242,7 +39973,7 @@ impl<'a, C, NC, A> ContentCategoryInsertCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -39253,7 +39984,7 @@ impl<'a, C, NC, A> ContentCategoryInsertCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -39262,13 +39993,13 @@ impl<'a, C, NC, A> ContentCategoryInsertCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -39289,7 +40020,7 @@ impl<'a, C, NC, A> ContentCategoryInsertCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> ContentCategoryInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -39350,7 +40081,7 @@ impl<'a, C, NC, A> ContentCategoryInsertCall<'a, C, NC, A> where NC: hyper::net: /// Deletes an existing content category. /// /// A builder for the *delete* method supported by a *contentCategory* resource. -/// It is not used directly, but through a `ContentCategoryMethods`. +/// It is not used directly, but through a `ContentCategoryMethods` instance. /// /// # Example /// @@ -39410,7 +40141,7 @@ impl<'a, C, NC, A> ContentCategoryDeleteCall<'a, C, NC, A> where NC: hyper::net: for &field in ["profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -39462,7 +40193,7 @@ impl<'a, C, NC, A> ContentCategoryDeleteCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -39474,7 +40205,6 @@ impl<'a, C, NC, A> ContentCategoryDeleteCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -39484,7 +40214,7 @@ impl<'a, C, NC, A> ContentCategoryDeleteCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -39495,12 +40225,12 @@ impl<'a, C, NC, A> ContentCategoryDeleteCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -39512,7 +40242,7 @@ impl<'a, C, NC, A> ContentCategoryDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> ContentCategoryDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -39522,7 +40252,7 @@ impl<'a, C, NC, A> ContentCategoryDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Content category ID. + /// Content category ID. pub fn id(mut self, new_value: &str) -> ContentCategoryDeleteCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -39583,7 +40313,7 @@ impl<'a, C, NC, A> ContentCategoryDeleteCall<'a, C, NC, A> where NC: hyper::net: /// Gets one content category by ID. /// /// A builder for the *get* method supported by a *contentCategory* resource. -/// It is not used directly, but through a `ContentCategoryMethods`. +/// It is not used directly, but through a `ContentCategoryMethods` instance. /// /// # Example /// @@ -39643,7 +40373,7 @@ impl<'a, C, NC, A> ContentCategoryGetCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -39696,7 +40426,7 @@ impl<'a, C, NC, A> ContentCategoryGetCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -39708,7 +40438,6 @@ impl<'a, C, NC, A> ContentCategoryGetCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -39718,7 +40447,7 @@ impl<'a, C, NC, A> ContentCategoryGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -39729,7 +40458,7 @@ impl<'a, C, NC, A> ContentCategoryGetCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -39738,13 +40467,13 @@ impl<'a, C, NC, A> ContentCategoryGetCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -39756,7 +40485,7 @@ impl<'a, C, NC, A> ContentCategoryGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> ContentCategoryGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -39766,7 +40495,7 @@ impl<'a, C, NC, A> ContentCategoryGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Content category ID. + /// Content category ID. pub fn id(mut self, new_value: &str) -> ContentCategoryGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -39827,7 +40556,7 @@ impl<'a, C, NC, A> ContentCategoryGetCall<'a, C, NC, A> where NC: hyper::net::Ne /// Updates an existing content category. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *contentCategory* resource. -/// It is not used directly, but through a `ContentCategoryMethods`. +/// It is not used directly, but through a `ContentCategoryMethods` instance. /// /// # Example /// @@ -39894,7 +40623,7 @@ impl<'a, C, NC, A> ContentCategoryPatchCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -39951,7 +40680,7 @@ impl<'a, C, NC, A> ContentCategoryPatchCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -39967,7 +40696,6 @@ impl<'a, C, NC, A> ContentCategoryPatchCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -39977,7 +40705,7 @@ impl<'a, C, NC, A> ContentCategoryPatchCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -39988,7 +40716,7 @@ impl<'a, C, NC, A> ContentCategoryPatchCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -39997,13 +40725,13 @@ impl<'a, C, NC, A> ContentCategoryPatchCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -40024,7 +40752,7 @@ impl<'a, C, NC, A> ContentCategoryPatchCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> ContentCategoryPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -40034,7 +40762,7 @@ impl<'a, C, NC, A> ContentCategoryPatchCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Content category ID. + /// Content category ID. pub fn id(mut self, new_value: &str) -> ContentCategoryPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -40095,7 +40823,7 @@ impl<'a, C, NC, A> ContentCategoryPatchCall<'a, C, NC, A> where NC: hyper::net:: /// Inserts a new creative. /// /// A builder for the *insert* method supported by a *creative* resource. -/// It is not used directly, but through a `CreativeMethods`. +/// It is not used directly, but through a `CreativeMethods` instance. /// /// # Example /// @@ -40160,7 +40888,7 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -40217,7 +40945,7 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -40233,7 +40961,6 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -40243,7 +40970,7 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -40254,7 +40981,7 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -40263,13 +40990,13 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -40290,7 +41017,7 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -40351,7 +41078,7 @@ impl<'a, C, NC, A> CreativeInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Updates an existing creative. /// /// A builder for the *update* method supported by a *creative* resource. -/// It is not used directly, but through a `CreativeMethods`. +/// It is not used directly, but through a `CreativeMethods` instance. /// /// # Example /// @@ -40416,7 +41143,7 @@ impl<'a, C, NC, A> CreativeUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -40473,7 +41200,7 @@ impl<'a, C, NC, A> CreativeUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -40489,7 +41216,6 @@ impl<'a, C, NC, A> CreativeUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -40499,7 +41225,7 @@ impl<'a, C, NC, A> CreativeUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -40510,7 +41236,7 @@ impl<'a, C, NC, A> CreativeUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -40519,13 +41245,13 @@ impl<'a, C, NC, A> CreativeUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -40546,7 +41272,7 @@ impl<'a, C, NC, A> CreativeUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -40607,7 +41333,7 @@ impl<'a, C, NC, A> CreativeUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Gets one creative by ID. /// /// A builder for the *get* method supported by a *creative* resource. -/// It is not used directly, but through a `CreativeMethods`. +/// It is not used directly, but through a `CreativeMethods` instance. /// /// # Example /// @@ -40667,7 +41393,7 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -40720,7 +41446,7 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -40732,7 +41458,6 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -40742,7 +41467,7 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -40753,7 +41478,7 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -40762,13 +41487,13 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -40780,7 +41505,7 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -40790,7 +41515,7 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative ID. + /// Creative ID. pub fn id(mut self, new_value: &str) -> CreativeGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -40851,7 +41576,7 @@ impl<'a, C, NC, A> CreativeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Retrieves a list of creatives, possibly filtered. /// /// A builder for the *list* method supported by a *creative* resource. -/// It is not used directly, but through a `CreativeMethods`. +/// It is not used directly, but through a `CreativeMethods` instance. /// /// # Example /// @@ -41013,7 +41738,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "profileId", "types", "studioCreativeId", "sortOrder", "sortField", "sizeIds", "searchString", "renderingIds", "pageToken", "maxResults", "ids", "creativeFieldIds", "companionCreativeIds", "campaignId", "archived", "advertiserId", "active"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -41066,7 +41791,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -41078,7 +41803,6 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -41088,7 +41812,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -41099,7 +41823,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -41108,13 +41832,13 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -41126,7 +41850,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -41135,7 +41859,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only creatives with these creative types. + /// Select only creatives with these creative types. pub fn add_types(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._types.push(new_value.to_string()); self @@ -41143,7 +41867,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *studio creative id* query property to the given value. /// /// - /// Select only creatives corresponding to this Studio creative ID. + /// Select only creatives corresponding to this Studio creative ID. pub fn studio_creative_id(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._studio_creative_id = Some(new_value.to_string()); self @@ -41151,7 +41875,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -41159,7 +41883,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -41168,7 +41892,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only creatives with these size IDs. + /// Select only creatives with these size IDs. pub fn add_size_ids(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._size_ids.push(new_value.to_string()); self @@ -41176,7 +41900,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "creative*2015" will return objects with names like "creative June 2015", "creative April 2015" or simply "creative 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "creative" will match objects with name "my creative", "creative 2015" or simply "creative". + /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "creative*2015" will return objects with names like "creative June 2015", "creative April 2015" or simply "creative 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "creative" will match objects with name "my creative", "creative 2015" or simply "creative". pub fn search_string(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -41185,7 +41909,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only creatives with these rendering IDs. + /// Select only creatives with these rendering IDs. pub fn add_rendering_ids(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._rendering_ids.push(new_value.to_string()); self @@ -41193,7 +41917,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -41201,7 +41925,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> CreativeListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -41210,7 +41934,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only creatives with these IDs. + /// Select only creatives with these IDs. pub fn add_ids(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -41219,7 +41943,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only creatives with these creative field IDs. + /// Select only creatives with these creative field IDs. pub fn add_creative_field_ids(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._creative_field_ids.push(new_value.to_string()); self @@ -41228,7 +41952,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only in-stream video creatives with these companion IDs. + /// Select only in-stream video creatives with these companion IDs. pub fn add_companion_creative_ids(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._companion_creative_ids.push(new_value.to_string()); self @@ -41236,7 +41960,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *campaign id* query property to the given value. /// /// - /// Select only creatives with this campaign ID. + /// Select only creatives with this campaign ID. pub fn campaign_id(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._campaign_id = Some(new_value.to_string()); self @@ -41244,7 +41968,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *archived* query property to the given value. /// /// - /// Select only archived creatives. Leave blank to select archived and unarchived creatives. + /// Select only archived creatives. Leave blank to select archived and unarchived creatives. pub fn archived(mut self, new_value: bool) -> CreativeListCall<'a, C, NC, A> { self._archived = Some(new_value); self @@ -41252,7 +41976,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *advertiser id* query property to the given value. /// /// - /// Select only creatives with this advertiser ID. + /// Select only creatives with this advertiser ID. pub fn advertiser_id(mut self, new_value: &str) -> CreativeListCall<'a, C, NC, A> { self._advertiser_id = Some(new_value.to_string()); self @@ -41260,7 +41984,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *active* query property to the given value. /// /// - /// Select only active creatives. Leave blank to select active and inactive creatives. + /// Select only active creatives. Leave blank to select active and inactive creatives. pub fn active(mut self, new_value: bool) -> CreativeListCall<'a, C, NC, A> { self._active = Some(new_value); self @@ -41321,7 +42045,7 @@ impl<'a, C, NC, A> CreativeListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Updates an existing creative. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *creative* resource. -/// It is not used directly, but through a `CreativeMethods`. +/// It is not used directly, but through a `CreativeMethods` instance. /// /// # Example /// @@ -41388,7 +42112,7 @@ impl<'a, C, NC, A> CreativePatchCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -41445,7 +42169,7 @@ impl<'a, C, NC, A> CreativePatchCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -41461,7 +42185,6 @@ impl<'a, C, NC, A> CreativePatchCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -41471,7 +42194,7 @@ impl<'a, C, NC, A> CreativePatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -41482,7 +42205,7 @@ impl<'a, C, NC, A> CreativePatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -41491,13 +42214,13 @@ impl<'a, C, NC, A> CreativePatchCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -41518,7 +42241,7 @@ impl<'a, C, NC, A> CreativePatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativePatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -41528,7 +42251,7 @@ impl<'a, C, NC, A> CreativePatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative ID. + /// Creative ID. pub fn id(mut self, new_value: &str) -> CreativePatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -41589,7 +42312,7 @@ impl<'a, C, NC, A> CreativePatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Gets one campaign by ID. /// /// A builder for the *get* method supported by a *campaign* resource. -/// It is not used directly, but through a `CampaignMethods`. +/// It is not used directly, but through a `CampaignMethods` instance. /// /// # Example /// @@ -41649,7 +42372,7 @@ impl<'a, C, NC, A> CampaignGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -41702,7 +42425,7 @@ impl<'a, C, NC, A> CampaignGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -41714,7 +42437,6 @@ impl<'a, C, NC, A> CampaignGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -41724,7 +42446,7 @@ impl<'a, C, NC, A> CampaignGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -41735,7 +42457,7 @@ impl<'a, C, NC, A> CampaignGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -41744,13 +42466,13 @@ impl<'a, C, NC, A> CampaignGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -41762,7 +42484,7 @@ impl<'a, C, NC, A> CampaignGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CampaignGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -41772,7 +42494,7 @@ impl<'a, C, NC, A> CampaignGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Campaign ID. + /// Campaign ID. pub fn id(mut self, new_value: &str) -> CampaignGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -41833,7 +42555,7 @@ impl<'a, C, NC, A> CampaignGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Inserts a new campaign. /// /// A builder for the *insert* method supported by a *campaign* resource. -/// It is not used directly, but through a `CampaignMethods`. +/// It is not used directly, but through a `CampaignMethods` instance. /// /// # Example /// @@ -41902,7 +42624,7 @@ impl<'a, C, NC, A> CampaignInsertCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId", "defaultLandingPageName", "defaultLandingPageUrl"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -41959,7 +42681,7 @@ impl<'a, C, NC, A> CampaignInsertCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -41975,7 +42697,6 @@ impl<'a, C, NC, A> CampaignInsertCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -41985,7 +42706,7 @@ impl<'a, C, NC, A> CampaignInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -41996,7 +42717,7 @@ impl<'a, C, NC, A> CampaignInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -42005,13 +42726,13 @@ impl<'a, C, NC, A> CampaignInsertCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -42032,7 +42753,7 @@ impl<'a, C, NC, A> CampaignInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CampaignInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -42042,7 +42763,7 @@ impl<'a, C, NC, A> CampaignInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Default landing page name for this new campaign. Must be less than 256 characters long. + /// Default landing page name for this new campaign. Must be less than 256 characters long. pub fn default_landing_page_name(mut self, new_value: &str) -> CampaignInsertCall<'a, C, NC, A> { self._default_landing_page_name = new_value.to_string(); self @@ -42052,7 +42773,7 @@ impl<'a, C, NC, A> CampaignInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Default landing page URL for this new campaign. + /// Default landing page URL for this new campaign. pub fn default_landing_page_url(mut self, new_value: &str) -> CampaignInsertCall<'a, C, NC, A> { self._default_landing_page_url = new_value.to_string(); self @@ -42113,7 +42834,7 @@ impl<'a, C, NC, A> CampaignInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Updates an existing campaign. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *campaign* resource. -/// It is not used directly, but through a `CampaignMethods`. +/// It is not used directly, but through a `CampaignMethods` instance. /// /// # Example /// @@ -42180,7 +42901,7 @@ impl<'a, C, NC, A> CampaignPatchCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -42237,7 +42958,7 @@ impl<'a, C, NC, A> CampaignPatchCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -42253,7 +42974,6 @@ impl<'a, C, NC, A> CampaignPatchCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -42263,7 +42983,7 @@ impl<'a, C, NC, A> CampaignPatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -42274,7 +42994,7 @@ impl<'a, C, NC, A> CampaignPatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -42283,13 +43003,13 @@ impl<'a, C, NC, A> CampaignPatchCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -42310,7 +43030,7 @@ impl<'a, C, NC, A> CampaignPatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CampaignPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -42320,7 +43040,7 @@ impl<'a, C, NC, A> CampaignPatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Campaign ID. + /// Campaign ID. pub fn id(mut self, new_value: &str) -> CampaignPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -42381,7 +43101,7 @@ impl<'a, C, NC, A> CampaignPatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Updates an existing campaign. /// /// A builder for the *update* method supported by a *campaign* resource. -/// It is not used directly, but through a `CampaignMethods`. +/// It is not used directly, but through a `CampaignMethods` instance. /// /// # Example /// @@ -42446,7 +43166,7 @@ impl<'a, C, NC, A> CampaignUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -42503,7 +43223,7 @@ impl<'a, C, NC, A> CampaignUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -42519,7 +43239,6 @@ impl<'a, C, NC, A> CampaignUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -42529,7 +43248,7 @@ impl<'a, C, NC, A> CampaignUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -42540,7 +43259,7 @@ impl<'a, C, NC, A> CampaignUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -42549,13 +43268,13 @@ impl<'a, C, NC, A> CampaignUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -42576,7 +43295,7 @@ impl<'a, C, NC, A> CampaignUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CampaignUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -42637,7 +43356,7 @@ impl<'a, C, NC, A> CampaignUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieves a list of campaigns, possibly filtered. /// /// A builder for the *list* method supported by a *campaign* resource. -/// It is not used directly, but through a `CampaignMethods`. +/// It is not used directly, but through a `CampaignMethods` instance. /// /// # Example /// @@ -42776,7 +43495,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "profileId", "subaccountId", "sortOrder", "sortField", "searchString", "pageToken", "overriddenEventTagId", "maxResults", "ids", "excludedIds", "atLeastOneOptimizationActivity", "archived", "advertiserIds", "advertiserGroupIds"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -42829,7 +43548,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -42841,7 +43560,6 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -42851,7 +43569,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -42862,7 +43580,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -42871,13 +43589,13 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -42889,7 +43607,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CampaignListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -42897,7 +43615,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *subaccount id* query property to the given value. /// /// - /// Select only campaigns that belong to this subaccount. + /// Select only campaigns that belong to this subaccount. pub fn subaccount_id(mut self, new_value: &str) -> CampaignListCall<'a, C, NC, A> { self._subaccount_id = Some(new_value.to_string()); self @@ -42905,7 +43623,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> CampaignListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -42913,7 +43631,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> CampaignListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -42921,7 +43639,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for campaigns by name or ID. Wildcards (*) are allowed. For example, "campaign*2015" will return campaigns with names like "campaign June 2015", "campaign April 2015" or simply "campaign 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "campaign" will match campaigns with name "my campaign", "campaign 2015" or simply "campaign". + /// Allows searching for campaigns by name or ID. Wildcards (*) are allowed. For example, "campaign*2015" will return campaigns with names like "campaign June 2015", "campaign April 2015" or simply "campaign 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "campaign" will match campaigns with name "my campaign", "campaign 2015" or simply "campaign". pub fn search_string(mut self, new_value: &str) -> CampaignListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -42929,7 +43647,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> CampaignListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -42937,7 +43655,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *overridden event tag id* query property to the given value. /// /// - /// Select only campaigns that have overridden this event tag ID. + /// Select only campaigns that have overridden this event tag ID. pub fn overridden_event_tag_id(mut self, new_value: &str) -> CampaignListCall<'a, C, NC, A> { self._overridden_event_tag_id = Some(new_value.to_string()); self @@ -42945,7 +43663,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> CampaignListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -42954,7 +43672,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only campaigns with these IDs. + /// Select only campaigns with these IDs. pub fn add_ids(mut self, new_value: &str) -> CampaignListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -42963,7 +43681,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Exclude campaigns with these IDs. + /// Exclude campaigns with these IDs. pub fn add_excluded_ids(mut self, new_value: &str) -> CampaignListCall<'a, C, NC, A> { self._excluded_ids.push(new_value.to_string()); self @@ -42971,7 +43689,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *at least one optimization activity* query property to the given value. /// /// - /// Select only campaigns that have at least one optimization activity. + /// Select only campaigns that have at least one optimization activity. pub fn at_least_one_optimization_activity(mut self, new_value: bool) -> CampaignListCall<'a, C, NC, A> { self._at_least_one_optimization_activity = Some(new_value); self @@ -42979,7 +43697,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *archived* query property to the given value. /// /// - /// Select only archived campaigns. Don't set this field to select both archived and non-archived campaigns. + /// Select only archived campaigns. Don't set this field to select both archived and non-archived campaigns. pub fn archived(mut self, new_value: bool) -> CampaignListCall<'a, C, NC, A> { self._archived = Some(new_value); self @@ -42988,7 +43706,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only campaigns that belong to these advertisers. + /// Select only campaigns that belong to these advertisers. pub fn add_advertiser_ids(mut self, new_value: &str) -> CampaignListCall<'a, C, NC, A> { self._advertiser_ids.push(new_value.to_string()); self @@ -42997,7 +43715,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only campaigns whose advertisers belong to these advertiser groups. + /// Select only campaigns whose advertisers belong to these advertiser groups. pub fn add_advertiser_group_ids(mut self, new_value: &str) -> CampaignListCall<'a, C, NC, A> { self._advertiser_group_ids.push(new_value.to_string()); self @@ -43058,7 +43776,7 @@ impl<'a, C, NC, A> CampaignListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Deletes an existing event tag. /// /// A builder for the *delete* method supported by a *eventTag* resource. -/// It is not used directly, but through a `EventTagMethods`. +/// It is not used directly, but through a `EventTagMethods` instance. /// /// # Example /// @@ -43118,7 +43836,7 @@ impl<'a, C, NC, A> EventTagDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -43170,7 +43888,7 @@ impl<'a, C, NC, A> EventTagDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -43182,7 +43900,6 @@ impl<'a, C, NC, A> EventTagDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -43192,7 +43909,7 @@ impl<'a, C, NC, A> EventTagDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -43203,12 +43920,12 @@ impl<'a, C, NC, A> EventTagDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -43220,7 +43937,7 @@ impl<'a, C, NC, A> EventTagDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> EventTagDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -43230,7 +43947,7 @@ impl<'a, C, NC, A> EventTagDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Event tag ID. + /// Event tag ID. pub fn id(mut self, new_value: &str) -> EventTagDeleteCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -43291,7 +44008,7 @@ impl<'a, C, NC, A> EventTagDeleteCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieves a list of event tags, possibly filtered. /// /// A builder for the *list* method supported by a *eventTag* resource. -/// It is not used directly, but through a `EventTagMethods`. +/// It is not used directly, but through a `EventTagMethods` instance. /// /// # Example /// @@ -43407,7 +44124,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "profileId", "sortOrder", "sortField", "searchString", "ids", "eventTagTypes", "enabled", "definitionsOnly", "campaignId", "advertiserId", "adId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -43460,7 +44177,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -43472,7 +44189,6 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -43482,7 +44198,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -43493,7 +44209,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -43502,13 +44218,13 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -43520,7 +44236,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> EventTagListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -43528,7 +44244,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> EventTagListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -43536,7 +44252,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> EventTagListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -43544,7 +44260,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "eventtag*2015" will return objects with names like "eventtag June 2015", "eventtag April 2015" or simply "eventtag 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "eventtag" will match objects with name "my eventtag", "eventtag 2015" or simply "eventtag". + /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "eventtag*2015" will return objects with names like "eventtag June 2015", "eventtag April 2015" or simply "eventtag 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "eventtag" will match objects with name "my eventtag", "eventtag 2015" or simply "eventtag". pub fn search_string(mut self, new_value: &str) -> EventTagListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -43553,7 +44269,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only event tags with these IDs. + /// Select only event tags with these IDs. pub fn add_ids(mut self, new_value: &str) -> EventTagListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -43562,7 +44278,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only event tags with the specified event tag types. Event tag types can be used to specify whether to use a third-party pixel, a third-party JavaScript URL, or a third-party click-through URL for either impression or click tracking. + /// Select only event tags with the specified event tag types. Event tag types can be used to specify whether to use a third-party pixel, a third-party JavaScript URL, or a third-party click-through URL for either impression or click tracking. pub fn add_event_tag_types(mut self, new_value: &str) -> EventTagListCall<'a, C, NC, A> { self._event_tag_types.push(new_value.to_string()); self @@ -43570,7 +44286,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *enabled* query property to the given value. /// /// - /// Select only enabled event tags. When definitionsOnly is set to true, only the specified advertiser or campaign's event tags' enabledByDefault field is examined. When definitionsOnly is set to false, the specified ad or specified campaign's parent advertiser's or parent campaign's event tags' enabledByDefault and status fields are examined as well. + /// Select only enabled event tags. When definitionsOnly is set to true, only the specified advertiser or campaign's event tags' enabledByDefault field is examined. When definitionsOnly is set to false, the specified ad or specified campaign's parent advertiser's or parent campaign's event tags' enabledByDefault and status fields are examined as well. pub fn enabled(mut self, new_value: bool) -> EventTagListCall<'a, C, NC, A> { self._enabled = Some(new_value); self @@ -43578,7 +44294,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *definitions only* query property to the given value. /// /// - /// Examine only the specified ad or campaign or advertiser's event tags for matching selector criteria. When set to false, the parent advertiser and parent campaign is examined as well. In addition, when set to false, the status field is examined as well along with the enabledByDefault field. + /// Examine only the specified ad or campaign or advertiser's event tags for matching selector criteria. When set to false, the parent advertiser and parent campaign is examined as well. In addition, when set to false, the status field is examined as well along with the enabledByDefault field. pub fn definitions_only(mut self, new_value: bool) -> EventTagListCall<'a, C, NC, A> { self._definitions_only = Some(new_value); self @@ -43586,7 +44302,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *campaign id* query property to the given value. /// /// - /// Select only event tags that belong to this campaign. + /// Select only event tags that belong to this campaign. pub fn campaign_id(mut self, new_value: &str) -> EventTagListCall<'a, C, NC, A> { self._campaign_id = Some(new_value.to_string()); self @@ -43594,7 +44310,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *advertiser id* query property to the given value. /// /// - /// Select only event tags that belong to this advertiser. + /// Select only event tags that belong to this advertiser. pub fn advertiser_id(mut self, new_value: &str) -> EventTagListCall<'a, C, NC, A> { self._advertiser_id = Some(new_value.to_string()); self @@ -43602,7 +44318,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *ad id* query property to the given value. /// /// - /// Select only event tags that belong to this ad. + /// Select only event tags that belong to this ad. pub fn ad_id(mut self, new_value: &str) -> EventTagListCall<'a, C, NC, A> { self._ad_id = Some(new_value.to_string()); self @@ -43663,7 +44379,7 @@ impl<'a, C, NC, A> EventTagListCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Inserts a new event tag. /// /// A builder for the *insert* method supported by a *eventTag* resource. -/// It is not used directly, but through a `EventTagMethods`. +/// It is not used directly, but through a `EventTagMethods` instance. /// /// # Example /// @@ -43728,7 +44444,7 @@ impl<'a, C, NC, A> EventTagInsertCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -43785,7 +44501,7 @@ impl<'a, C, NC, A> EventTagInsertCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -43801,7 +44517,6 @@ impl<'a, C, NC, A> EventTagInsertCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -43811,7 +44526,7 @@ impl<'a, C, NC, A> EventTagInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -43822,7 +44537,7 @@ impl<'a, C, NC, A> EventTagInsertCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -43831,13 +44546,13 @@ impl<'a, C, NC, A> EventTagInsertCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -43858,7 +44573,7 @@ impl<'a, C, NC, A> EventTagInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> EventTagInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -43919,7 +44634,7 @@ impl<'a, C, NC, A> EventTagInsertCall<'a, C, NC, A> where NC: hyper::net::Networ /// Updates an existing event tag. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *eventTag* resource. -/// It is not used directly, but through a `EventTagMethods`. +/// It is not used directly, but through a `EventTagMethods` instance. /// /// # Example /// @@ -43986,7 +44701,7 @@ impl<'a, C, NC, A> EventTagPatchCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -44043,7 +44758,7 @@ impl<'a, C, NC, A> EventTagPatchCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -44059,7 +44774,6 @@ impl<'a, C, NC, A> EventTagPatchCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -44069,7 +44783,7 @@ impl<'a, C, NC, A> EventTagPatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -44080,7 +44794,7 @@ impl<'a, C, NC, A> EventTagPatchCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -44089,13 +44803,13 @@ impl<'a, C, NC, A> EventTagPatchCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -44116,7 +44830,7 @@ impl<'a, C, NC, A> EventTagPatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> EventTagPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -44126,7 +44840,7 @@ impl<'a, C, NC, A> EventTagPatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Event tag ID. + /// Event tag ID. pub fn id(mut self, new_value: &str) -> EventTagPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -44187,7 +44901,7 @@ impl<'a, C, NC, A> EventTagPatchCall<'a, C, NC, A> where NC: hyper::net::Network /// Updates an existing event tag. /// /// A builder for the *update* method supported by a *eventTag* resource. -/// It is not used directly, but through a `EventTagMethods`. +/// It is not used directly, but through a `EventTagMethods` instance. /// /// # Example /// @@ -44252,7 +44966,7 @@ impl<'a, C, NC, A> EventTagUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -44309,7 +45023,7 @@ impl<'a, C, NC, A> EventTagUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -44325,7 +45039,6 @@ impl<'a, C, NC, A> EventTagUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -44335,7 +45048,7 @@ impl<'a, C, NC, A> EventTagUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -44346,7 +45059,7 @@ impl<'a, C, NC, A> EventTagUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -44355,13 +45068,13 @@ impl<'a, C, NC, A> EventTagUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -44382,7 +45095,7 @@ impl<'a, C, NC, A> EventTagUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> EventTagUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -44443,7 +45156,7 @@ impl<'a, C, NC, A> EventTagUpdateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Gets one event tag by ID. /// /// A builder for the *get* method supported by a *eventTag* resource. -/// It is not used directly, but through a `EventTagMethods`. +/// It is not used directly, but through a `EventTagMethods` instance. /// /// # Example /// @@ -44503,7 +45216,7 @@ impl<'a, C, NC, A> EventTagGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -44556,7 +45269,7 @@ impl<'a, C, NC, A> EventTagGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -44568,7 +45281,6 @@ impl<'a, C, NC, A> EventTagGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -44578,7 +45290,7 @@ impl<'a, C, NC, A> EventTagGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -44589,7 +45301,7 @@ impl<'a, C, NC, A> EventTagGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -44598,13 +45310,13 @@ impl<'a, C, NC, A> EventTagGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -44616,7 +45328,7 @@ impl<'a, C, NC, A> EventTagGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> EventTagGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -44626,7 +45338,7 @@ impl<'a, C, NC, A> EventTagGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Event tag ID. + /// Event tag ID. pub fn id(mut self, new_value: &str) -> EventTagGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -44687,7 +45399,7 @@ impl<'a, C, NC, A> EventTagGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Retrieves a list of cities, possibly filtered. /// /// A builder for the *list* method supported by a *city* resource. -/// It is not used directly, but through a `CityMethods`. +/// It is not used directly, but through a `CityMethods` instance. /// /// # Example /// @@ -44777,7 +45489,7 @@ impl<'a, C, NC, A> CityListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "profileId", "regionDartIds", "namePrefix", "dartIds", "countryDartIds"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -44830,7 +45542,7 @@ impl<'a, C, NC, A> CityListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -44842,7 +45554,6 @@ impl<'a, C, NC, A> CityListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -44852,7 +45563,7 @@ impl<'a, C, NC, A> CityListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -44863,7 +45574,7 @@ impl<'a, C, NC, A> CityListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -44872,13 +45583,13 @@ impl<'a, C, NC, A> CityListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -44890,7 +45601,7 @@ impl<'a, C, NC, A> CityListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CityListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -44899,7 +45610,7 @@ impl<'a, C, NC, A> CityListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only cities from these regions. + /// Select only cities from these regions. pub fn add_region_dart_ids(mut self, new_value: &str) -> CityListCall<'a, C, NC, A> { self._region_dart_ids.push(new_value.to_string()); self @@ -44907,7 +45618,7 @@ impl<'a, C, NC, A> CityListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *name prefix* query property to the given value. /// /// - /// Select only cities with names starting with this prefix. + /// Select only cities with names starting with this prefix. pub fn name_prefix(mut self, new_value: &str) -> CityListCall<'a, C, NC, A> { self._name_prefix = Some(new_value.to_string()); self @@ -44916,7 +45627,7 @@ impl<'a, C, NC, A> CityListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only cities with these DART IDs. + /// Select only cities with these DART IDs. pub fn add_dart_ids(mut self, new_value: &str) -> CityListCall<'a, C, NC, A> { self._dart_ids.push(new_value.to_string()); self @@ -44925,7 +45636,7 @@ impl<'a, C, NC, A> CityListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only cities from these countries. + /// Select only cities from these countries. pub fn add_country_dart_ids(mut self, new_value: &str) -> CityListCall<'a, C, NC, A> { self._country_dart_ids.push(new_value.to_string()); self @@ -44986,7 +45697,7 @@ impl<'a, C, NC, A> CityListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Retrieves a list of placement strategies, possibly filtered. /// /// A builder for the *list* method supported by a *placementStrategy* resource. -/// It is not used directly, but through a `PlacementStrategyMethods`. +/// It is not used directly, but through a `PlacementStrategyMethods` instance. /// /// # Example /// @@ -45078,7 +45789,7 @@ impl<'a, C, NC, A> PlacementStrategyListCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "profileId", "sortOrder", "sortField", "searchString", "pageToken", "maxResults", "ids"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -45131,7 +45842,7 @@ impl<'a, C, NC, A> PlacementStrategyListCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -45143,7 +45854,6 @@ impl<'a, C, NC, A> PlacementStrategyListCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -45153,7 +45863,7 @@ impl<'a, C, NC, A> PlacementStrategyListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -45164,7 +45874,7 @@ impl<'a, C, NC, A> PlacementStrategyListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -45173,13 +45883,13 @@ impl<'a, C, NC, A> PlacementStrategyListCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -45191,7 +45901,7 @@ impl<'a, C, NC, A> PlacementStrategyListCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementStrategyListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -45199,7 +45909,7 @@ impl<'a, C, NC, A> PlacementStrategyListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> PlacementStrategyListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -45207,7 +45917,7 @@ impl<'a, C, NC, A> PlacementStrategyListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> PlacementStrategyListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -45215,7 +45925,7 @@ impl<'a, C, NC, A> PlacementStrategyListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "placementstrategy*2015" will return objects with names like "placementstrategy June 2015", "placementstrategy April 2015" or simply "placementstrategy 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placementstrategy" will match objects with name "my placementstrategy", "placementstrategy 2015" or simply "placementstrategy". + /// Allows searching for objects by name or ID. Wildcards (*) are allowed. For example, "placementstrategy*2015" will return objects with names like "placementstrategy June 2015", "placementstrategy April 2015" or simply "placementstrategy 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placementstrategy" will match objects with name "my placementstrategy", "placementstrategy 2015" or simply "placementstrategy". pub fn search_string(mut self, new_value: &str) -> PlacementStrategyListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -45223,7 +45933,7 @@ impl<'a, C, NC, A> PlacementStrategyListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> PlacementStrategyListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -45231,7 +45941,7 @@ impl<'a, C, NC, A> PlacementStrategyListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> PlacementStrategyListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -45240,7 +45950,7 @@ impl<'a, C, NC, A> PlacementStrategyListCall<'a, C, NC, A> where NC: hyper::net: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placement strategies with these IDs. + /// Select only placement strategies with these IDs. pub fn add_ids(mut self, new_value: &str) -> PlacementStrategyListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -45301,7 +46011,7 @@ impl<'a, C, NC, A> PlacementStrategyListCall<'a, C, NC, A> where NC: hyper::net: /// Updates an existing placement strategy. /// /// A builder for the *update* method supported by a *placementStrategy* resource. -/// It is not used directly, but through a `PlacementStrategyMethods`. +/// It is not used directly, but through a `PlacementStrategyMethods` instance. /// /// # Example /// @@ -45366,7 +46076,7 @@ impl<'a, C, NC, A> PlacementStrategyUpdateCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -45423,7 +46133,7 @@ impl<'a, C, NC, A> PlacementStrategyUpdateCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -45439,7 +46149,6 @@ impl<'a, C, NC, A> PlacementStrategyUpdateCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -45449,7 +46158,7 @@ impl<'a, C, NC, A> PlacementStrategyUpdateCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -45460,7 +46169,7 @@ impl<'a, C, NC, A> PlacementStrategyUpdateCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -45469,13 +46178,13 @@ impl<'a, C, NC, A> PlacementStrategyUpdateCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -45496,7 +46205,7 @@ impl<'a, C, NC, A> PlacementStrategyUpdateCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementStrategyUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -45557,7 +46266,7 @@ impl<'a, C, NC, A> PlacementStrategyUpdateCall<'a, C, NC, A> where NC: hyper::ne /// Gets one placement strategy by ID. /// /// A builder for the *get* method supported by a *placementStrategy* resource. -/// It is not used directly, but through a `PlacementStrategyMethods`. +/// It is not used directly, but through a `PlacementStrategyMethods` instance. /// /// # Example /// @@ -45617,7 +46326,7 @@ impl<'a, C, NC, A> PlacementStrategyGetCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -45670,7 +46379,7 @@ impl<'a, C, NC, A> PlacementStrategyGetCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -45682,7 +46391,6 @@ impl<'a, C, NC, A> PlacementStrategyGetCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -45692,7 +46400,7 @@ impl<'a, C, NC, A> PlacementStrategyGetCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -45703,7 +46411,7 @@ impl<'a, C, NC, A> PlacementStrategyGetCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -45712,13 +46420,13 @@ impl<'a, C, NC, A> PlacementStrategyGetCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -45730,7 +46438,7 @@ impl<'a, C, NC, A> PlacementStrategyGetCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementStrategyGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -45740,7 +46448,7 @@ impl<'a, C, NC, A> PlacementStrategyGetCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Placement strategy ID. + /// Placement strategy ID. pub fn id(mut self, new_value: &str) -> PlacementStrategyGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -45801,7 +46509,7 @@ impl<'a, C, NC, A> PlacementStrategyGetCall<'a, C, NC, A> where NC: hyper::net:: /// Deletes an existing placement strategy. /// /// A builder for the *delete* method supported by a *placementStrategy* resource. -/// It is not used directly, but through a `PlacementStrategyMethods`. +/// It is not used directly, but through a `PlacementStrategyMethods` instance. /// /// # Example /// @@ -45861,7 +46569,7 @@ impl<'a, C, NC, A> PlacementStrategyDeleteCall<'a, C, NC, A> where NC: hyper::ne for &field in ["profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -45913,7 +46621,7 @@ impl<'a, C, NC, A> PlacementStrategyDeleteCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -45925,7 +46633,6 @@ impl<'a, C, NC, A> PlacementStrategyDeleteCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -45935,7 +46642,7 @@ impl<'a, C, NC, A> PlacementStrategyDeleteCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -45946,12 +46653,12 @@ impl<'a, C, NC, A> PlacementStrategyDeleteCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -45963,7 +46670,7 @@ impl<'a, C, NC, A> PlacementStrategyDeleteCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementStrategyDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -45973,7 +46680,7 @@ impl<'a, C, NC, A> PlacementStrategyDeleteCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Placement strategy ID. + /// Placement strategy ID. pub fn id(mut self, new_value: &str) -> PlacementStrategyDeleteCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -46034,7 +46741,7 @@ impl<'a, C, NC, A> PlacementStrategyDeleteCall<'a, C, NC, A> where NC: hyper::ne /// Inserts a new placement strategy. /// /// A builder for the *insert* method supported by a *placementStrategy* resource. -/// It is not used directly, but through a `PlacementStrategyMethods`. +/// It is not used directly, but through a `PlacementStrategyMethods` instance. /// /// # Example /// @@ -46099,7 +46806,7 @@ impl<'a, C, NC, A> PlacementStrategyInsertCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -46156,7 +46863,7 @@ impl<'a, C, NC, A> PlacementStrategyInsertCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -46172,7 +46879,6 @@ impl<'a, C, NC, A> PlacementStrategyInsertCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -46182,7 +46888,7 @@ impl<'a, C, NC, A> PlacementStrategyInsertCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -46193,7 +46899,7 @@ impl<'a, C, NC, A> PlacementStrategyInsertCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -46202,13 +46908,13 @@ impl<'a, C, NC, A> PlacementStrategyInsertCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -46229,7 +46935,7 @@ impl<'a, C, NC, A> PlacementStrategyInsertCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementStrategyInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -46290,7 +46996,7 @@ impl<'a, C, NC, A> PlacementStrategyInsertCall<'a, C, NC, A> where NC: hyper::ne /// Updates an existing placement strategy. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *placementStrategy* resource. -/// It is not used directly, but through a `PlacementStrategyMethods`. +/// It is not used directly, but through a `PlacementStrategyMethods` instance. /// /// # Example /// @@ -46357,7 +47063,7 @@ impl<'a, C, NC, A> PlacementStrategyPatchCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -46414,7 +47120,7 @@ impl<'a, C, NC, A> PlacementStrategyPatchCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -46430,7 +47136,6 @@ impl<'a, C, NC, A> PlacementStrategyPatchCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -46440,7 +47145,7 @@ impl<'a, C, NC, A> PlacementStrategyPatchCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -46451,7 +47156,7 @@ impl<'a, C, NC, A> PlacementStrategyPatchCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -46460,13 +47165,13 @@ impl<'a, C, NC, A> PlacementStrategyPatchCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -46487,7 +47192,7 @@ impl<'a, C, NC, A> PlacementStrategyPatchCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementStrategyPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -46497,7 +47202,7 @@ impl<'a, C, NC, A> PlacementStrategyPatchCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Placement strategy ID. + /// Placement strategy ID. pub fn id(mut self, new_value: &str) -> PlacementStrategyPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -46558,7 +47263,7 @@ impl<'a, C, NC, A> PlacementStrategyPatchCall<'a, C, NC, A> where NC: hyper::net /// Retrieves a list of directory sites, possibly filtered. /// /// A builder for the *list* method supported by a *directorySite* resource. -/// It is not used directly, but through a `DirectorySiteMethods`. +/// It is not used directly, but through a `DirectorySiteMethods` instance. /// /// # Example /// @@ -46685,7 +47390,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "profileId", "sortOrder", "sortField", "searchString", "parentId", "pageToken", "maxResults", "ids", "dfp_network_code", "countryId", "active", "acceptsPublisherPaidPlacements", "acceptsInterstitialPlacements", "acceptsInStreamVideoPlacements"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -46738,7 +47443,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -46750,7 +47455,6 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -46760,7 +47464,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -46771,7 +47475,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -46780,13 +47484,13 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -46798,7 +47502,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -46806,7 +47510,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -46814,7 +47518,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -46822,7 +47526,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name, ID or URL. Wildcards (*) are allowed. For example, "directory site*2015" will return objects with names like "directory site June 2015", "directory site April 2015" or simply "directory site 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "directory site" will match objects with name "my directory site", "directory site 2015" or simply "directory site". + /// Allows searching for objects by name, ID or URL. Wildcards (*) are allowed. For example, "directory site*2015" will return objects with names like "directory site June 2015", "directory site April 2015" or simply "directory site 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "directory site" will match objects with name "my directory site", "directory site 2015" or simply "directory site". pub fn search_string(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -46830,7 +47534,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *parent id* query property to the given value. /// /// - /// Select only directory sites with this parent ID. + /// Select only directory sites with this parent ID. pub fn parent_id(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, NC, A> { self._parent_id = Some(new_value.to_string()); self @@ -46838,7 +47542,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -46846,7 +47550,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> DirectorySiteListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -46855,7 +47559,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only directory sites with these IDs. + /// Select only directory sites with these IDs. pub fn add_ids(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -46863,7 +47567,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *dfp_network_code* query property to the given value. /// /// - /// Select only directory sites with this DFP network code. + /// Select only directory sites with this DFP network code. pub fn dfp_network_code(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, NC, A> { self._dfp_network_code = Some(new_value.to_string()); self @@ -46871,7 +47575,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *country id* query property to the given value. /// /// - /// Select only directory sites with this country ID. + /// Select only directory sites with this country ID. pub fn country_id(mut self, new_value: &str) -> DirectorySiteListCall<'a, C, NC, A> { self._country_id = Some(new_value.to_string()); self @@ -46879,7 +47583,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *active* query property to the given value. /// /// - /// Select only active directory sites. Leave blank to retrieve both active and inactive directory sites. + /// Select only active directory sites. Leave blank to retrieve both active and inactive directory sites. pub fn active(mut self, new_value: bool) -> DirectorySiteListCall<'a, C, NC, A> { self._active = Some(new_value); self @@ -46887,7 +47591,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *accepts publisher paid placements* query property to the given value. /// /// - /// Select only directory sites that accept publisher paid placements. This field can be left blank. + /// Select only directory sites that accept publisher paid placements. This field can be left blank. pub fn accepts_publisher_paid_placements(mut self, new_value: bool) -> DirectorySiteListCall<'a, C, NC, A> { self._accepts_publisher_paid_placements = Some(new_value); self @@ -46895,7 +47599,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *accepts interstitial placements* query property to the given value. /// /// - /// This search filter is no longer supported and will have no effect on the results returned. + /// This search filter is no longer supported and will have no effect on the results returned. pub fn accepts_interstitial_placements(mut self, new_value: bool) -> DirectorySiteListCall<'a, C, NC, A> { self._accepts_interstitial_placements = Some(new_value); self @@ -46903,7 +47607,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *accepts in stream video placements* query property to the given value. /// /// - /// This search filter is no longer supported and will have no effect on the results returned. + /// This search filter is no longer supported and will have no effect on the results returned. pub fn accepts_in_stream_video_placements(mut self, new_value: bool) -> DirectorySiteListCall<'a, C, NC, A> { self._accepts_in_stream_video_placements = Some(new_value); self @@ -46964,7 +47668,7 @@ impl<'a, C, NC, A> DirectorySiteListCall<'a, C, NC, A> where NC: hyper::net::Net /// Gets one directory site by ID. /// /// A builder for the *get* method supported by a *directorySite* resource. -/// It is not used directly, but through a `DirectorySiteMethods`. +/// It is not used directly, but through a `DirectorySiteMethods` instance. /// /// # Example /// @@ -47024,7 +47728,7 @@ impl<'a, C, NC, A> DirectorySiteGetCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -47077,7 +47781,7 @@ impl<'a, C, NC, A> DirectorySiteGetCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -47089,7 +47793,6 @@ impl<'a, C, NC, A> DirectorySiteGetCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -47099,7 +47802,7 @@ impl<'a, C, NC, A> DirectorySiteGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -47110,7 +47813,7 @@ impl<'a, C, NC, A> DirectorySiteGetCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -47119,13 +47822,13 @@ impl<'a, C, NC, A> DirectorySiteGetCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -47137,7 +47840,7 @@ impl<'a, C, NC, A> DirectorySiteGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> DirectorySiteGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -47147,7 +47850,7 @@ impl<'a, C, NC, A> DirectorySiteGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Directory site ID. + /// Directory site ID. pub fn id(mut self, new_value: &str) -> DirectorySiteGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -47208,7 +47911,7 @@ impl<'a, C, NC, A> DirectorySiteGetCall<'a, C, NC, A> where NC: hyper::net::Netw /// Inserts a new size. /// /// A builder for the *insert* method supported by a *size* resource. -/// It is not used directly, but through a `SizeMethods`. +/// It is not used directly, but through a `SizeMethods` instance. /// /// # Example /// @@ -47273,7 +47976,7 @@ impl<'a, C, NC, A> SizeInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -47330,7 +48033,7 @@ impl<'a, C, NC, A> SizeInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -47346,7 +48049,6 @@ impl<'a, C, NC, A> SizeInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -47356,7 +48058,7 @@ impl<'a, C, NC, A> SizeInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -47367,7 +48069,7 @@ impl<'a, C, NC, A> SizeInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -47376,13 +48078,13 @@ impl<'a, C, NC, A> SizeInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -47403,7 +48105,7 @@ impl<'a, C, NC, A> SizeInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SizeInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -47464,7 +48166,7 @@ impl<'a, C, NC, A> SizeInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Retrieves a list of sizes, possibly filtered. /// /// A builder for the *list* method supported by a *size* resource. -/// It is not used directly, but through a `SizeMethods`. +/// It is not used directly, but through a `SizeMethods` instance. /// /// # Example /// @@ -47546,7 +48248,7 @@ impl<'a, C, NC, A> SizeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne for &field in ["alt", "profileId", "width", "ids", "iabStandard", "height"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -47599,7 +48301,7 @@ impl<'a, C, NC, A> SizeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -47611,7 +48313,6 @@ impl<'a, C, NC, A> SizeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne dlg.pre_request(); req.send() - }; match req_result { @@ -47621,7 +48322,7 @@ impl<'a, C, NC, A> SizeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -47632,7 +48333,7 @@ impl<'a, C, NC, A> SizeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -47641,13 +48342,13 @@ impl<'a, C, NC, A> SizeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -47659,7 +48360,7 @@ impl<'a, C, NC, A> SizeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SizeListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -47667,7 +48368,7 @@ impl<'a, C, NC, A> SizeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *width* query property to the given value. /// /// - /// Select only sizes with this width. + /// Select only sizes with this width. pub fn width(mut self, new_value: i32) -> SizeListCall<'a, C, NC, A> { self._width = Some(new_value); self @@ -47676,7 +48377,7 @@ impl<'a, C, NC, A> SizeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only sizes with these IDs. + /// Select only sizes with these IDs. pub fn add_ids(mut self, new_value: &str) -> SizeListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -47684,7 +48385,7 @@ impl<'a, C, NC, A> SizeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *iab standard* query property to the given value. /// /// - /// Select only IAB standard sizes. + /// Select only IAB standard sizes. pub fn iab_standard(mut self, new_value: bool) -> SizeListCall<'a, C, NC, A> { self._iab_standard = Some(new_value); self @@ -47692,7 +48393,7 @@ impl<'a, C, NC, A> SizeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Sets the *height* query property to the given value. /// /// - /// Select only sizes with this height. + /// Select only sizes with this height. pub fn height(mut self, new_value: i32) -> SizeListCall<'a, C, NC, A> { self._height = Some(new_value); self @@ -47753,7 +48454,7 @@ impl<'a, C, NC, A> SizeListCall<'a, C, NC, A> where NC: hyper::net::NetworkConne /// Gets one size by ID. /// /// A builder for the *get* method supported by a *size* resource. -/// It is not used directly, but through a `SizeMethods`. +/// It is not used directly, but through a `SizeMethods` instance. /// /// # Example /// @@ -47813,7 +48514,7 @@ impl<'a, C, NC, A> SizeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -47866,7 +48567,7 @@ impl<'a, C, NC, A> SizeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -47878,7 +48579,6 @@ impl<'a, C, NC, A> SizeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec dlg.pre_request(); req.send() - }; match req_result { @@ -47888,7 +48588,7 @@ impl<'a, C, NC, A> SizeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -47899,7 +48599,7 @@ impl<'a, C, NC, A> SizeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -47908,13 +48608,13 @@ impl<'a, C, NC, A> SizeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -47926,7 +48626,7 @@ impl<'a, C, NC, A> SizeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> SizeGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -47936,7 +48636,7 @@ impl<'a, C, NC, A> SizeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Size ID. + /// Size ID. pub fn id(mut self, new_value: &str) -> SizeGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -47997,7 +48697,7 @@ impl<'a, C, NC, A> SizeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConnec /// Gets the account's active ad summary by account ID. /// /// A builder for the *get* method supported by a *accountActiveAdSummary* resource. -/// It is not used directly, but through a `AccountActiveAdSummaryMethods`. +/// It is not used directly, but through a `AccountActiveAdSummaryMethods` instance. /// /// # Example /// @@ -48057,7 +48757,7 @@ impl<'a, C, NC, A> AccountActiveAdSummaryGetCall<'a, C, NC, A> where NC: hyper:: for &field in ["alt", "profileId", "summaryAccountId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -48110,7 +48810,7 @@ impl<'a, C, NC, A> AccountActiveAdSummaryGetCall<'a, C, NC, A> where NC: hyper:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -48122,7 +48822,6 @@ impl<'a, C, NC, A> AccountActiveAdSummaryGetCall<'a, C, NC, A> where NC: hyper:: dlg.pre_request(); req.send() - }; match req_result { @@ -48132,7 +48831,7 @@ impl<'a, C, NC, A> AccountActiveAdSummaryGetCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -48143,7 +48842,7 @@ impl<'a, C, NC, A> AccountActiveAdSummaryGetCall<'a, C, NC, A> where NC: hyper:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -48152,13 +48851,13 @@ impl<'a, C, NC, A> AccountActiveAdSummaryGetCall<'a, C, NC, A> where NC: hyper:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -48170,7 +48869,7 @@ impl<'a, C, NC, A> AccountActiveAdSummaryGetCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountActiveAdSummaryGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -48180,7 +48879,7 @@ impl<'a, C, NC, A> AccountActiveAdSummaryGetCall<'a, C, NC, A> where NC: hyper:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Account ID. + /// Account ID. pub fn summary_account_id(mut self, new_value: &str) -> AccountActiveAdSummaryGetCall<'a, C, NC, A> { self._summary_account_id = new_value.to_string(); self @@ -48241,7 +48940,7 @@ impl<'a, C, NC, A> AccountActiveAdSummaryGetCall<'a, C, NC, A> where NC: hyper:: /// Updates an existing account user profile. /// /// A builder for the *update* method supported by a *accountUserProfile* resource. -/// It is not used directly, but through a `AccountUserProfileMethods`. +/// It is not used directly, but through a `AccountUserProfileMethods` instance. /// /// # Example /// @@ -48306,7 +49005,7 @@ impl<'a, C, NC, A> AccountUserProfileUpdateCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -48363,7 +49062,7 @@ impl<'a, C, NC, A> AccountUserProfileUpdateCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -48379,7 +49078,6 @@ impl<'a, C, NC, A> AccountUserProfileUpdateCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -48389,7 +49087,7 @@ impl<'a, C, NC, A> AccountUserProfileUpdateCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -48400,7 +49098,7 @@ impl<'a, C, NC, A> AccountUserProfileUpdateCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -48409,13 +49107,13 @@ impl<'a, C, NC, A> AccountUserProfileUpdateCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -48436,7 +49134,7 @@ impl<'a, C, NC, A> AccountUserProfileUpdateCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountUserProfileUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -48497,7 +49195,7 @@ impl<'a, C, NC, A> AccountUserProfileUpdateCall<'a, C, NC, A> where NC: hyper::n /// Retrieves a list of account user profiles, possibly filtered. /// /// A builder for the *list* method supported by a *accountUserProfile* resource. -/// It is not used directly, but through a `AccountUserProfileMethods`. +/// It is not used directly, but through a `AccountUserProfileMethods` instance. /// /// # Example /// @@ -48604,7 +49302,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "profileId", "userRoleId", "subaccountId", "sortOrder", "sortField", "searchString", "pageToken", "maxResults", "ids", "active"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -48657,7 +49355,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -48669,7 +49367,6 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -48679,7 +49376,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -48690,7 +49387,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -48699,13 +49396,13 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -48717,7 +49414,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -48725,7 +49422,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *user role id* query property to the given value. /// /// - /// Select only user profiles with the specified user role ID. + /// Select only user profiles with the specified user role ID. pub fn user_role_id(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, NC, A> { self._user_role_id = Some(new_value.to_string()); self @@ -48733,7 +49430,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *subaccount id* query property to the given value. /// /// - /// Select only user profiles with the specified subaccount ID. + /// Select only user profiles with the specified subaccount ID. pub fn subaccount_id(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, NC, A> { self._subaccount_id = Some(new_value.to_string()); self @@ -48741,7 +49438,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -48749,7 +49446,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -48757,7 +49454,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for objects by name, ID or email. Wildcards (*) are allowed. For example, "user profile*2015" will return objects with names like "user profile June 2015", "user profile April 2015" or simply "user profile 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "user profile" will match objects with name "my user profile", "user profile 2015" or simply "user profile". + /// Allows searching for objects by name, ID or email. Wildcards (*) are allowed. For example, "user profile*2015" will return objects with names like "user profile June 2015", "user profile April 2015" or simply "user profile 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "user profile" will match objects with name "my user profile", "user profile 2015" or simply "user profile". pub fn search_string(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -48765,7 +49462,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -48773,7 +49470,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> AccountUserProfileListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -48782,7 +49479,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only user profiles with these IDs. + /// Select only user profiles with these IDs. pub fn add_ids(mut self, new_value: &str) -> AccountUserProfileListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -48790,7 +49487,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *active* query property to the given value. /// /// - /// Select only active user profiles. + /// Select only active user profiles. pub fn active(mut self, new_value: bool) -> AccountUserProfileListCall<'a, C, NC, A> { self._active = Some(new_value); self @@ -48851,7 +49548,7 @@ impl<'a, C, NC, A> AccountUserProfileListCall<'a, C, NC, A> where NC: hyper::net /// Updates an existing account user profile. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *accountUserProfile* resource. -/// It is not used directly, but through a `AccountUserProfileMethods`. +/// It is not used directly, but through a `AccountUserProfileMethods` instance. /// /// # Example /// @@ -48918,7 +49615,7 @@ impl<'a, C, NC, A> AccountUserProfilePatchCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -48975,7 +49672,7 @@ impl<'a, C, NC, A> AccountUserProfilePatchCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -48991,7 +49688,6 @@ impl<'a, C, NC, A> AccountUserProfilePatchCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -49001,7 +49697,7 @@ impl<'a, C, NC, A> AccountUserProfilePatchCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -49012,7 +49708,7 @@ impl<'a, C, NC, A> AccountUserProfilePatchCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -49021,13 +49717,13 @@ impl<'a, C, NC, A> AccountUserProfilePatchCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -49048,7 +49744,7 @@ impl<'a, C, NC, A> AccountUserProfilePatchCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountUserProfilePatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -49058,7 +49754,7 @@ impl<'a, C, NC, A> AccountUserProfilePatchCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID. + /// User profile ID. pub fn id(mut self, new_value: &str) -> AccountUserProfilePatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -49119,7 +49815,7 @@ impl<'a, C, NC, A> AccountUserProfilePatchCall<'a, C, NC, A> where NC: hyper::ne /// Gets one account user profile by ID. /// /// A builder for the *get* method supported by a *accountUserProfile* resource. -/// It is not used directly, but through a `AccountUserProfileMethods`. +/// It is not used directly, but through a `AccountUserProfileMethods` instance. /// /// # Example /// @@ -49179,7 +49875,7 @@ impl<'a, C, NC, A> AccountUserProfileGetCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -49232,7 +49928,7 @@ impl<'a, C, NC, A> AccountUserProfileGetCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -49244,7 +49940,6 @@ impl<'a, C, NC, A> AccountUserProfileGetCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -49254,7 +49949,7 @@ impl<'a, C, NC, A> AccountUserProfileGetCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -49265,7 +49960,7 @@ impl<'a, C, NC, A> AccountUserProfileGetCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -49274,13 +49969,13 @@ impl<'a, C, NC, A> AccountUserProfileGetCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -49292,7 +49987,7 @@ impl<'a, C, NC, A> AccountUserProfileGetCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> AccountUserProfileGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -49302,7 +49997,7 @@ impl<'a, C, NC, A> AccountUserProfileGetCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID. + /// User profile ID. pub fn id(mut self, new_value: &str) -> AccountUserProfileGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -49363,7 +50058,7 @@ impl<'a, C, NC, A> AccountUserProfileGetCall<'a, C, NC, A> where NC: hyper::net: /// Retrieves a list of countries. /// /// A builder for the *list* method supported by a *country* resource. -/// It is not used directly, but through a `CountryMethods`. +/// It is not used directly, but through a `CountryMethods` instance. /// /// # Example /// @@ -49421,7 +50116,7 @@ impl<'a, C, NC, A> CountryListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -49474,7 +50169,7 @@ impl<'a, C, NC, A> CountryListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -49486,7 +50181,6 @@ impl<'a, C, NC, A> CountryListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -49496,7 +50190,7 @@ impl<'a, C, NC, A> CountryListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -49507,7 +50201,7 @@ impl<'a, C, NC, A> CountryListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -49516,13 +50210,13 @@ impl<'a, C, NC, A> CountryListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -49534,7 +50228,7 @@ impl<'a, C, NC, A> CountryListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CountryListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -49595,7 +50289,7 @@ impl<'a, C, NC, A> CountryListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Gets one country by ID. /// /// A builder for the *get* method supported by a *country* resource. -/// It is not used directly, but through a `CountryMethods`. +/// It is not used directly, but through a `CountryMethods` instance. /// /// # Example /// @@ -49655,7 +50349,7 @@ impl<'a, C, NC, A> CountryGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "profileId", "dartId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -49708,7 +50402,7 @@ impl<'a, C, NC, A> CountryGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -49720,7 +50414,6 @@ impl<'a, C, NC, A> CountryGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -49730,7 +50423,7 @@ impl<'a, C, NC, A> CountryGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -49741,7 +50434,7 @@ impl<'a, C, NC, A> CountryGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -49750,13 +50443,13 @@ impl<'a, C, NC, A> CountryGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -49768,7 +50461,7 @@ impl<'a, C, NC, A> CountryGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CountryGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -49778,7 +50471,7 @@ impl<'a, C, NC, A> CountryGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Country DART ID. + /// Country DART ID. pub fn dart_id(mut self, new_value: &str) -> CountryGetCall<'a, C, NC, A> { self._dart_id = new_value.to_string(); self @@ -49839,7 +50532,7 @@ impl<'a, C, NC, A> CountryGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Updates an existing creative field value. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *creativeFieldValue* resource. -/// It is not used directly, but through a `CreativeFieldValueMethods`. +/// It is not used directly, but through a `CreativeFieldValueMethods` instance. /// /// # Example /// @@ -49908,7 +50601,7 @@ impl<'a, C, NC, A> CreativeFieldValuePatchCall<'a, C, NC, A> where NC: hyper::ne for &field in ["alt", "profileId", "creativeFieldId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -49965,7 +50658,7 @@ impl<'a, C, NC, A> CreativeFieldValuePatchCall<'a, C, NC, A> where NC: hyper::ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -49981,7 +50674,6 @@ impl<'a, C, NC, A> CreativeFieldValuePatchCall<'a, C, NC, A> where NC: hyper::ne dlg.pre_request(); req.send() - }; match req_result { @@ -49991,7 +50683,7 @@ impl<'a, C, NC, A> CreativeFieldValuePatchCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -50002,7 +50694,7 @@ impl<'a, C, NC, A> CreativeFieldValuePatchCall<'a, C, NC, A> where NC: hyper::ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -50011,13 +50703,13 @@ impl<'a, C, NC, A> CreativeFieldValuePatchCall<'a, C, NC, A> where NC: hyper::ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -50038,7 +50730,7 @@ impl<'a, C, NC, A> CreativeFieldValuePatchCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldValuePatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -50048,7 +50740,7 @@ impl<'a, C, NC, A> CreativeFieldValuePatchCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative field ID for this creative field value. + /// Creative field ID for this creative field value. pub fn creative_field_id(mut self, new_value: &str) -> CreativeFieldValuePatchCall<'a, C, NC, A> { self._creative_field_id = new_value.to_string(); self @@ -50058,7 +50750,7 @@ impl<'a, C, NC, A> CreativeFieldValuePatchCall<'a, C, NC, A> where NC: hyper::ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative Field Value ID + /// Creative Field Value ID pub fn id(mut self, new_value: &str) -> CreativeFieldValuePatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -50119,7 +50811,7 @@ impl<'a, C, NC, A> CreativeFieldValuePatchCall<'a, C, NC, A> where NC: hyper::ne /// Deletes an existing creative field value. /// /// A builder for the *delete* method supported by a *creativeFieldValue* resource. -/// It is not used directly, but through a `CreativeFieldValueMethods`. +/// It is not used directly, but through a `CreativeFieldValueMethods` instance. /// /// # Example /// @@ -50181,7 +50873,7 @@ impl<'a, C, NC, A> CreativeFieldValueDeleteCall<'a, C, NC, A> where NC: hyper::n for &field in ["profileId", "creativeFieldId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -50233,7 +50925,7 @@ impl<'a, C, NC, A> CreativeFieldValueDeleteCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -50245,7 +50937,6 @@ impl<'a, C, NC, A> CreativeFieldValueDeleteCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -50255,7 +50946,7 @@ impl<'a, C, NC, A> CreativeFieldValueDeleteCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -50266,12 +50957,12 @@ impl<'a, C, NC, A> CreativeFieldValueDeleteCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -50283,7 +50974,7 @@ impl<'a, C, NC, A> CreativeFieldValueDeleteCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldValueDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -50293,7 +50984,7 @@ impl<'a, C, NC, A> CreativeFieldValueDeleteCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative field ID for this creative field value. + /// Creative field ID for this creative field value. pub fn creative_field_id(mut self, new_value: &str) -> CreativeFieldValueDeleteCall<'a, C, NC, A> { self._creative_field_id = new_value.to_string(); self @@ -50303,7 +50994,7 @@ impl<'a, C, NC, A> CreativeFieldValueDeleteCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative Field Value ID + /// Creative Field Value ID pub fn id(mut self, new_value: &str) -> CreativeFieldValueDeleteCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -50364,7 +51055,7 @@ impl<'a, C, NC, A> CreativeFieldValueDeleteCall<'a, C, NC, A> where NC: hyper::n /// Inserts a new creative field value. /// /// A builder for the *insert* method supported by a *creativeFieldValue* resource. -/// It is not used directly, but through a `CreativeFieldValueMethods`. +/// It is not used directly, but through a `CreativeFieldValueMethods` instance. /// /// # Example /// @@ -50431,7 +51122,7 @@ impl<'a, C, NC, A> CreativeFieldValueInsertCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "profileId", "creativeFieldId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -50488,7 +51179,7 @@ impl<'a, C, NC, A> CreativeFieldValueInsertCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -50504,7 +51195,6 @@ impl<'a, C, NC, A> CreativeFieldValueInsertCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -50514,7 +51204,7 @@ impl<'a, C, NC, A> CreativeFieldValueInsertCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -50525,7 +51215,7 @@ impl<'a, C, NC, A> CreativeFieldValueInsertCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -50534,13 +51224,13 @@ impl<'a, C, NC, A> CreativeFieldValueInsertCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -50561,7 +51251,7 @@ impl<'a, C, NC, A> CreativeFieldValueInsertCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldValueInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -50571,7 +51261,7 @@ impl<'a, C, NC, A> CreativeFieldValueInsertCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative field ID for this creative field value. + /// Creative field ID for this creative field value. pub fn creative_field_id(mut self, new_value: &str) -> CreativeFieldValueInsertCall<'a, C, NC, A> { self._creative_field_id = new_value.to_string(); self @@ -50632,7 +51322,7 @@ impl<'a, C, NC, A> CreativeFieldValueInsertCall<'a, C, NC, A> where NC: hyper::n /// Updates an existing creative field value. /// /// A builder for the *update* method supported by a *creativeFieldValue* resource. -/// It is not used directly, but through a `CreativeFieldValueMethods`. +/// It is not used directly, but through a `CreativeFieldValueMethods` instance. /// /// # Example /// @@ -50699,7 +51389,7 @@ impl<'a, C, NC, A> CreativeFieldValueUpdateCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "profileId", "creativeFieldId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -50756,7 +51446,7 @@ impl<'a, C, NC, A> CreativeFieldValueUpdateCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -50772,7 +51462,6 @@ impl<'a, C, NC, A> CreativeFieldValueUpdateCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -50782,7 +51471,7 @@ impl<'a, C, NC, A> CreativeFieldValueUpdateCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -50793,7 +51482,7 @@ impl<'a, C, NC, A> CreativeFieldValueUpdateCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -50802,13 +51491,13 @@ impl<'a, C, NC, A> CreativeFieldValueUpdateCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -50829,7 +51518,7 @@ impl<'a, C, NC, A> CreativeFieldValueUpdateCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldValueUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -50839,7 +51528,7 @@ impl<'a, C, NC, A> CreativeFieldValueUpdateCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative field ID for this creative field value. + /// Creative field ID for this creative field value. pub fn creative_field_id(mut self, new_value: &str) -> CreativeFieldValueUpdateCall<'a, C, NC, A> { self._creative_field_id = new_value.to_string(); self @@ -50900,7 +51589,7 @@ impl<'a, C, NC, A> CreativeFieldValueUpdateCall<'a, C, NC, A> where NC: hyper::n /// Gets one creative field value by ID. /// /// A builder for the *get* method supported by a *creativeFieldValue* resource. -/// It is not used directly, but through a `CreativeFieldValueMethods`. +/// It is not used directly, but through a `CreativeFieldValueMethods` instance. /// /// # Example /// @@ -50962,7 +51651,7 @@ impl<'a, C, NC, A> CreativeFieldValueGetCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "profileId", "creativeFieldId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -51015,7 +51704,7 @@ impl<'a, C, NC, A> CreativeFieldValueGetCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -51027,7 +51716,6 @@ impl<'a, C, NC, A> CreativeFieldValueGetCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -51037,7 +51725,7 @@ impl<'a, C, NC, A> CreativeFieldValueGetCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -51048,7 +51736,7 @@ impl<'a, C, NC, A> CreativeFieldValueGetCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -51057,13 +51745,13 @@ impl<'a, C, NC, A> CreativeFieldValueGetCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -51075,7 +51763,7 @@ impl<'a, C, NC, A> CreativeFieldValueGetCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldValueGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -51085,7 +51773,7 @@ impl<'a, C, NC, A> CreativeFieldValueGetCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative field ID for this creative field value. + /// Creative field ID for this creative field value. pub fn creative_field_id(mut self, new_value: &str) -> CreativeFieldValueGetCall<'a, C, NC, A> { self._creative_field_id = new_value.to_string(); self @@ -51095,7 +51783,7 @@ impl<'a, C, NC, A> CreativeFieldValueGetCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative Field Value ID + /// Creative Field Value ID pub fn id(mut self, new_value: &str) -> CreativeFieldValueGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -51156,7 +51844,7 @@ impl<'a, C, NC, A> CreativeFieldValueGetCall<'a, C, NC, A> where NC: hyper::net: /// Retrieves a list of creative field values, possibly filtered. /// /// A builder for the *list* method supported by a *creativeFieldValue* resource. -/// It is not used directly, but through a `CreativeFieldValueMethods`. +/// It is not used directly, but through a `CreativeFieldValueMethods` instance. /// /// # Example /// @@ -51250,7 +51938,7 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt", "profileId", "creativeFieldId", "sortOrder", "sortField", "searchString", "pageToken", "maxResults", "ids"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -51303,7 +51991,7 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -51315,7 +52003,6 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -51325,7 +52012,7 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -51336,7 +52023,7 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -51345,13 +52032,13 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -51363,7 +52050,7 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> CreativeFieldValueListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -51373,7 +52060,7 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Creative field ID for this creative field value. + /// Creative field ID for this creative field value. pub fn creative_field_id(mut self, new_value: &str) -> CreativeFieldValueListCall<'a, C, NC, A> { self._creative_field_id = new_value.to_string(); self @@ -51381,7 +52068,7 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> CreativeFieldValueListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -51389,7 +52076,7 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> CreativeFieldValueListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -51397,7 +52084,7 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for creative field values by their values. Wildcards (e.g. *) are not allowed. + /// Allows searching for creative field values by their values. Wildcards (e.g. *) are not allowed. pub fn search_string(mut self, new_value: &str) -> CreativeFieldValueListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -51405,7 +52092,7 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> CreativeFieldValueListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -51413,7 +52100,7 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> CreativeFieldValueListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -51422,7 +52109,7 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only creative field values with these IDs. + /// Select only creative field values with these IDs. pub fn add_ids(mut self, new_value: &str) -> CreativeFieldValueListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -51483,7 +52170,7 @@ impl<'a, C, NC, A> CreativeFieldValueListCall<'a, C, NC, A> where NC: hyper::net /// Updates a report. /// /// A builder for the *update* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -51550,7 +52237,7 @@ impl<'a, C, NC, A> ReportUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "profileId", "reportId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -51607,7 +52294,7 @@ impl<'a, C, NC, A> ReportUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -51623,7 +52310,6 @@ impl<'a, C, NC, A> ReportUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -51633,7 +52319,7 @@ impl<'a, C, NC, A> ReportUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -51644,7 +52330,7 @@ impl<'a, C, NC, A> ReportUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -51653,13 +52339,13 @@ impl<'a, C, NC, A> ReportUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -51680,7 +52366,7 @@ impl<'a, C, NC, A> ReportUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The DFA user profile ID. + /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -51690,7 +52376,7 @@ impl<'a, C, NC, A> ReportUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the report. + /// The ID of the report. pub fn report_id(mut self, new_value: &str) -> ReportUpdateCall<'a, C, NC, A> { self._report_id = new_value.to_string(); self @@ -51751,7 +52437,7 @@ impl<'a, C, NC, A> ReportUpdateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Runs a report. /// /// A builder for the *run* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -51816,7 +52502,7 @@ impl<'a, C, NC, A> ReportRunCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "profileId", "reportId", "synchronous"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -51869,7 +52555,7 @@ impl<'a, C, NC, A> ReportRunCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -51881,7 +52567,6 @@ impl<'a, C, NC, A> ReportRunCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -51891,7 +52576,7 @@ impl<'a, C, NC, A> ReportRunCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -51902,7 +52587,7 @@ impl<'a, C, NC, A> ReportRunCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -51911,13 +52596,13 @@ impl<'a, C, NC, A> ReportRunCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -51929,7 +52614,7 @@ impl<'a, C, NC, A> ReportRunCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The DFA profile ID. + /// The DFA profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportRunCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -51939,7 +52624,7 @@ impl<'a, C, NC, A> ReportRunCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the report. + /// The ID of the report. pub fn report_id(mut self, new_value: &str) -> ReportRunCall<'a, C, NC, A> { self._report_id = new_value.to_string(); self @@ -51947,7 +52632,7 @@ impl<'a, C, NC, A> ReportRunCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Sets the *synchronous* query property to the given value. /// /// - /// If set and true, tries to run the report synchronously. + /// If set and true, tries to run the report synchronously. pub fn synchronous(mut self, new_value: bool) -> ReportRunCall<'a, C, NC, A> { self._synchronous = Some(new_value); self @@ -52008,7 +52693,7 @@ impl<'a, C, NC, A> ReportRunCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Updates a report. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -52075,7 +52760,7 @@ impl<'a, C, NC, A> ReportPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "profileId", "reportId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -52132,7 +52817,7 @@ impl<'a, C, NC, A> ReportPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -52148,7 +52833,6 @@ impl<'a, C, NC, A> ReportPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -52158,7 +52842,7 @@ impl<'a, C, NC, A> ReportPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -52169,7 +52853,7 @@ impl<'a, C, NC, A> ReportPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -52178,13 +52862,13 @@ impl<'a, C, NC, A> ReportPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -52205,7 +52889,7 @@ impl<'a, C, NC, A> ReportPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The DFA user profile ID. + /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -52215,7 +52899,7 @@ impl<'a, C, NC, A> ReportPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the report. + /// The ID of the report. pub fn report_id(mut self, new_value: &str) -> ReportPatchCall<'a, C, NC, A> { self._report_id = new_value.to_string(); self @@ -52276,7 +52960,7 @@ impl<'a, C, NC, A> ReportPatchCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Lists files for a report. /// /// A builder for the *files.list* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -52356,7 +53040,7 @@ impl<'a, C, NC, A> ReportFileListCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId", "reportId", "sortOrder", "sortField", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -52409,7 +53093,7 @@ impl<'a, C, NC, A> ReportFileListCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -52421,7 +53105,6 @@ impl<'a, C, NC, A> ReportFileListCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -52431,7 +53114,7 @@ impl<'a, C, NC, A> ReportFileListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -52442,7 +53125,7 @@ impl<'a, C, NC, A> ReportFileListCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -52451,13 +53134,13 @@ impl<'a, C, NC, A> ReportFileListCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -52469,7 +53152,7 @@ impl<'a, C, NC, A> ReportFileListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The DFA profile ID. + /// The DFA profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportFileListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -52479,7 +53162,7 @@ impl<'a, C, NC, A> ReportFileListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the parent report. + /// The ID of the parent report. pub fn report_id(mut self, new_value: &str) -> ReportFileListCall<'a, C, NC, A> { self._report_id = new_value.to_string(); self @@ -52487,7 +53170,7 @@ impl<'a, C, NC, A> ReportFileListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is 'DESCENDING'. + /// Order of sorted results, default is 'DESCENDING'. pub fn sort_order(mut self, new_value: &str) -> ReportFileListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -52495,7 +53178,7 @@ impl<'a, C, NC, A> ReportFileListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *sort field* query property to the given value. /// /// - /// The field by which to sort the list. + /// The field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> ReportFileListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -52503,7 +53186,7 @@ impl<'a, C, NC, A> ReportFileListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *page token* query property to the given value. /// /// - /// The value of the nextToken from the previous result page. + /// The value of the nextToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> ReportFileListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -52511,7 +53194,7 @@ impl<'a, C, NC, A> ReportFileListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> ReportFileListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -52572,7 +53255,7 @@ impl<'a, C, NC, A> ReportFileListCall<'a, C, NC, A> where NC: hyper::net::Networ /// Creates a report. /// /// A builder for the *insert* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -52637,7 +53320,7 @@ impl<'a, C, NC, A> ReportInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -52694,7 +53377,7 @@ impl<'a, C, NC, A> ReportInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -52710,7 +53393,6 @@ impl<'a, C, NC, A> ReportInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -52720,7 +53402,7 @@ impl<'a, C, NC, A> ReportInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -52731,7 +53413,7 @@ impl<'a, C, NC, A> ReportInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -52740,13 +53422,13 @@ impl<'a, C, NC, A> ReportInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -52767,7 +53449,7 @@ impl<'a, C, NC, A> ReportInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The DFA user profile ID. + /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -52828,7 +53510,7 @@ impl<'a, C, NC, A> ReportInsertCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Returns the fields that are compatible to be selected in the respective sections of a report criteria, given the fields already selected in the input report and user permissions. /// /// A builder for the *compatibleFields.query* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -52893,7 +53575,7 @@ impl<'a, C, NC, A> ReportCompatibleFieldQueryCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -52950,7 +53632,7 @@ impl<'a, C, NC, A> ReportCompatibleFieldQueryCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -52966,7 +53648,6 @@ impl<'a, C, NC, A> ReportCompatibleFieldQueryCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -52976,7 +53657,7 @@ impl<'a, C, NC, A> ReportCompatibleFieldQueryCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -52987,7 +53668,7 @@ impl<'a, C, NC, A> ReportCompatibleFieldQueryCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -52996,13 +53677,13 @@ impl<'a, C, NC, A> ReportCompatibleFieldQueryCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -53023,7 +53704,7 @@ impl<'a, C, NC, A> ReportCompatibleFieldQueryCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The DFA user profile ID. + /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportCompatibleFieldQueryCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -53084,7 +53765,7 @@ impl<'a, C, NC, A> ReportCompatibleFieldQueryCall<'a, C, NC, A> where NC: hyper: /// Retrieves a report by its ID. /// /// A builder for the *get* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -53144,7 +53825,7 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "profileId", "reportId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -53197,7 +53878,7 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -53209,7 +53890,6 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -53219,7 +53899,7 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -53230,7 +53910,7 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -53239,13 +53919,13 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -53257,7 +53937,7 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The DFA user profile ID. + /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -53267,7 +53947,7 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the report. + /// The ID of the report. pub fn report_id(mut self, new_value: &str) -> ReportGetCall<'a, C, NC, A> { self._report_id = new_value.to_string(); self @@ -53333,7 +54013,7 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// but not the `File` structure that you would usually get. The latter will be a default value. /// /// A builder for the *files.get* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -53395,7 +54075,7 @@ impl<'a, C, NC, A> ReportFileGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["profileId", "reportId", "fileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -53464,7 +54144,7 @@ impl<'a, C, NC, A> ReportFileGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -53476,7 +54156,6 @@ impl<'a, C, NC, A> ReportFileGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -53486,7 +54165,7 @@ impl<'a, C, NC, A> ReportFileGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -53497,7 +54176,7 @@ impl<'a, C, NC, A> ReportFileGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = if enable_resource_parsing { let mut json_response = String::new(); @@ -53506,13 +54185,13 @@ impl<'a, C, NC, A> ReportFileGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } } else { (res, Default::default()) }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -53524,7 +54203,7 @@ impl<'a, C, NC, A> ReportFileGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The DFA profile ID. + /// The DFA profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportFileGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -53534,7 +54213,7 @@ impl<'a, C, NC, A> ReportFileGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the report. + /// The ID of the report. pub fn report_id(mut self, new_value: &str) -> ReportFileGetCall<'a, C, NC, A> { self._report_id = new_value.to_string(); self @@ -53544,7 +54223,7 @@ impl<'a, C, NC, A> ReportFileGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the report file. + /// The ID of the report file. pub fn file_id(mut self, new_value: &str) -> ReportFileGetCall<'a, C, NC, A> { self._file_id = new_value.to_string(); self @@ -53605,7 +54284,7 @@ impl<'a, C, NC, A> ReportFileGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Deletes a report by its ID. /// /// A builder for the *delete* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -53665,7 +54344,7 @@ impl<'a, C, NC, A> ReportDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["profileId", "reportId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -53717,7 +54396,7 @@ impl<'a, C, NC, A> ReportDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -53729,7 +54408,6 @@ impl<'a, C, NC, A> ReportDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -53739,7 +54417,7 @@ impl<'a, C, NC, A> ReportDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -53750,12 +54428,12 @@ impl<'a, C, NC, A> ReportDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -53767,7 +54445,7 @@ impl<'a, C, NC, A> ReportDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The DFA user profile ID. + /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportDeleteCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -53777,7 +54455,7 @@ impl<'a, C, NC, A> ReportDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the report. + /// The ID of the report. pub fn report_id(mut self, new_value: &str) -> ReportDeleteCall<'a, C, NC, A> { self._report_id = new_value.to_string(); self @@ -53838,7 +54516,7 @@ impl<'a, C, NC, A> ReportDeleteCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Retrieves list of reports. /// /// A builder for the *list* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -53921,7 +54599,7 @@ impl<'a, C, NC, A> ReportListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "profileId", "sortOrder", "sortField", "scope", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -53974,7 +54652,7 @@ impl<'a, C, NC, A> ReportListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -53986,7 +54664,6 @@ impl<'a, C, NC, A> ReportListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -53996,7 +54673,7 @@ impl<'a, C, NC, A> ReportListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -54007,7 +54684,7 @@ impl<'a, C, NC, A> ReportListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -54016,13 +54693,13 @@ impl<'a, C, NC, A> ReportListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -54034,7 +54711,7 @@ impl<'a, C, NC, A> ReportListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The DFA user profile ID. + /// The DFA user profile ID. pub fn profile_id(mut self, new_value: &str) -> ReportListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -54042,7 +54719,7 @@ impl<'a, C, NC, A> ReportListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is 'DESCENDING'. + /// Order of sorted results, default is 'DESCENDING'. pub fn sort_order(mut self, new_value: &str) -> ReportListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -54050,7 +54727,7 @@ impl<'a, C, NC, A> ReportListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *sort field* query property to the given value. /// /// - /// The field by which to sort the list. + /// The field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> ReportListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -54058,7 +54735,7 @@ impl<'a, C, NC, A> ReportListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *scope* query property to the given value. /// /// - /// The scope that defines which results are returned, default is 'MINE'. + /// The scope that defines which results are returned, default is 'MINE'. pub fn scope(mut self, new_value: &str) -> ReportListCall<'a, C, NC, A> { self._scope = Some(new_value.to_string()); self @@ -54066,7 +54743,7 @@ impl<'a, C, NC, A> ReportListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *page token* query property to the given value. /// /// - /// The value of the nextToken from the previous result page. + /// The value of the nextToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> ReportListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -54074,7 +54751,7 @@ impl<'a, C, NC, A> ReportListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> ReportListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -54135,7 +54812,7 @@ impl<'a, C, NC, A> ReportListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Retrieves a list of browsers. /// /// A builder for the *list* method supported by a *browser* resource. -/// It is not used directly, but through a `BrowserMethods`. +/// It is not used directly, but through a `BrowserMethods` instance. /// /// # Example /// @@ -54193,7 +54870,7 @@ impl<'a, C, NC, A> BrowserListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -54246,7 +54923,7 @@ impl<'a, C, NC, A> BrowserListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -54258,7 +54935,6 @@ impl<'a, C, NC, A> BrowserListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo dlg.pre_request(); req.send() - }; match req_result { @@ -54268,7 +54944,7 @@ impl<'a, C, NC, A> BrowserListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -54279,7 +54955,7 @@ impl<'a, C, NC, A> BrowserListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -54288,13 +54964,13 @@ impl<'a, C, NC, A> BrowserListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -54306,7 +54982,7 @@ impl<'a, C, NC, A> BrowserListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> BrowserListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -54367,7 +55043,7 @@ impl<'a, C, NC, A> BrowserListCall<'a, C, NC, A> where NC: hyper::net::NetworkCo /// Updates an existing placement. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *placement* resource. -/// It is not used directly, but through a `PlacementMethods`. +/// It is not used directly, but through a `PlacementMethods` instance. /// /// # Example /// @@ -54434,7 +55110,7 @@ impl<'a, C, NC, A> PlacementPatchCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -54491,7 +55167,7 @@ impl<'a, C, NC, A> PlacementPatchCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -54507,7 +55183,6 @@ impl<'a, C, NC, A> PlacementPatchCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -54517,7 +55192,7 @@ impl<'a, C, NC, A> PlacementPatchCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -54528,7 +55203,7 @@ impl<'a, C, NC, A> PlacementPatchCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -54537,13 +55212,13 @@ impl<'a, C, NC, A> PlacementPatchCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -54564,7 +55239,7 @@ impl<'a, C, NC, A> PlacementPatchCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementPatchCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -54574,7 +55249,7 @@ impl<'a, C, NC, A> PlacementPatchCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Placement ID. + /// Placement ID. pub fn id(mut self, new_value: &str) -> PlacementPatchCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -54635,7 +55310,7 @@ impl<'a, C, NC, A> PlacementPatchCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieves a list of placements, possibly filtered. /// /// A builder for the *list* method supported by a *placement* resource. -/// It is not used directly, but through a `PlacementMethods`. +/// It is not used directly, but through a `PlacementMethods` instance. /// /// # Example /// @@ -54827,7 +55502,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "profileId", "sortOrder", "sortField", "sizeIds", "siteIds", "searchString", "pricingTypes", "placementStrategyIds", "paymentSource", "pageToken", "maxResults", "ids", "groupIds", "directorySiteIds", "contentCategoryIds", "compatibilities", "campaignIds", "archived", "advertiserIds"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -54880,7 +55555,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -54892,7 +55567,6 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -54902,7 +55576,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -54913,7 +55587,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -54922,13 +55596,13 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -54940,7 +55614,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -54948,7 +55622,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *sort order* query property to the given value. /// /// - /// Order of sorted results, default is ASCENDING. + /// Order of sorted results, default is ASCENDING. pub fn sort_order(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -54956,7 +55630,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *sort field* query property to the given value. /// /// - /// Field by which to sort the list. + /// Field by which to sort the list. pub fn sort_field(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._sort_field = Some(new_value.to_string()); self @@ -54965,7 +55639,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placements that are associated with these sizes. + /// Select only placements that are associated with these sizes. pub fn add_size_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._size_ids.push(new_value.to_string()); self @@ -54974,7 +55648,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placements that are associated with these sites. + /// Select only placements that are associated with these sites. pub fn add_site_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._site_ids.push(new_value.to_string()); self @@ -54982,7 +55656,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *search string* query property to the given value. /// /// - /// Allows searching for placements by name or ID. Wildcards (*) are allowed. For example, "placement*2015" will return placements with names like "placement June 2015", "placement May 2015" or simply "placements 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placement" will match placements with name "my placement", "placement 2015" or simply "placement". + /// Allows searching for placements by name or ID. Wildcards (*) are allowed. For example, "placement*2015" will return placements with names like "placement June 2015", "placement May 2015" or simply "placements 2015". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "placement" will match placements with name "my placement", "placement 2015" or simply "placement". pub fn search_string(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._search_string = Some(new_value.to_string()); self @@ -54991,7 +55665,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placements with these pricing types. + /// Select only placements with these pricing types. pub fn add_pricing_types(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._pricing_types.push(new_value.to_string()); self @@ -55000,7 +55674,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placements that are associated with these placement strategies. + /// Select only placements that are associated with these placement strategies. pub fn add_placement_strategy_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._placement_strategy_ids.push(new_value.to_string()); self @@ -55008,7 +55682,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *payment source* query property to the given value. /// /// - /// Select only placements with this payment source. + /// Select only placements with this payment source. pub fn payment_source(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._payment_source = Some(new_value.to_string()); self @@ -55016,7 +55690,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *page token* query property to the given value. /// /// - /// Value of the nextPageToken from the previous result page. + /// Value of the nextPageToken from the previous result page. pub fn page_token(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -55024,7 +55698,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *max results* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn max_results(mut self, new_value: i32) -> PlacementListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -55033,7 +55707,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placements with these IDs. + /// Select only placements with these IDs. pub fn add_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._ids.push(new_value.to_string()); self @@ -55042,7 +55716,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placements that belong to these placement groups. + /// Select only placements that belong to these placement groups. pub fn add_group_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._group_ids.push(new_value.to_string()); self @@ -55051,7 +55725,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placements that are associated with these directory sites. + /// Select only placements that are associated with these directory sites. pub fn add_directory_site_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._directory_site_ids.push(new_value.to_string()); self @@ -55060,7 +55734,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placements that are associated with these content categories. + /// Select only placements that are associated with these content categories. pub fn add_content_category_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._content_category_ids.push(new_value.to_string()); self @@ -55069,7 +55743,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placements that are associated with these compatibilities. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. + /// Select only placements that are associated with these compatibilities. WEB and WEB_INTERSTITIAL refer to rendering either on desktop or on mobile devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. pub fn add_compatibilities(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._compatibilities.push(new_value.to_string()); self @@ -55078,7 +55752,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placements that belong to these campaigns. + /// Select only placements that belong to these campaigns. pub fn add_campaign_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._campaign_ids.push(new_value.to_string()); self @@ -55086,7 +55760,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *archived* query property to the given value. /// /// - /// Select only archived placements. Don't set this field to select both archived and non-archived placements. + /// Select only archived placements. Don't set this field to select both archived and non-archived placements. pub fn archived(mut self, new_value: bool) -> PlacementListCall<'a, C, NC, A> { self._archived = Some(new_value); self @@ -55095,7 +55769,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Select only placements that belong to these advertisers. + /// Select only placements that belong to these advertisers. pub fn add_advertiser_ids(mut self, new_value: &str) -> PlacementListCall<'a, C, NC, A> { self._advertiser_ids.push(new_value.to_string()); self @@ -55156,7 +55830,7 @@ impl<'a, C, NC, A> PlacementListCall<'a, C, NC, A> where NC: hyper::net::Network /// Gets one placement by ID. /// /// A builder for the *get* method supported by a *placement* resource. -/// It is not used directly, but through a `PlacementMethods`. +/// It is not used directly, but through a `PlacementMethods` instance. /// /// # Example /// @@ -55216,7 +55890,7 @@ impl<'a, C, NC, A> PlacementGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "profileId", "id"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -55269,7 +55943,7 @@ impl<'a, C, NC, A> PlacementGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -55281,7 +55955,6 @@ impl<'a, C, NC, A> PlacementGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -55291,7 +55964,7 @@ impl<'a, C, NC, A> PlacementGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -55302,7 +55975,7 @@ impl<'a, C, NC, A> PlacementGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -55311,13 +55984,13 @@ impl<'a, C, NC, A> PlacementGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -55329,7 +56002,7 @@ impl<'a, C, NC, A> PlacementGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementGetCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -55339,7 +56012,7 @@ impl<'a, C, NC, A> PlacementGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Placement ID. + /// Placement ID. pub fn id(mut self, new_value: &str) -> PlacementGetCall<'a, C, NC, A> { self._id = new_value.to_string(); self @@ -55400,7 +56073,7 @@ impl<'a, C, NC, A> PlacementGetCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Inserts a new placement. /// /// A builder for the *insert* method supported by a *placement* resource. -/// It is not used directly, but through a `PlacementMethods`. +/// It is not used directly, but through a `PlacementMethods` instance. /// /// # Example /// @@ -55465,7 +56138,7 @@ impl<'a, C, NC, A> PlacementInsertCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -55522,7 +56195,7 @@ impl<'a, C, NC, A> PlacementInsertCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -55538,7 +56211,6 @@ impl<'a, C, NC, A> PlacementInsertCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -55548,7 +56220,7 @@ impl<'a, C, NC, A> PlacementInsertCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -55559,7 +56231,7 @@ impl<'a, C, NC, A> PlacementInsertCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -55568,13 +56240,13 @@ impl<'a, C, NC, A> PlacementInsertCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -55595,7 +56267,7 @@ impl<'a, C, NC, A> PlacementInsertCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementInsertCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -55656,7 +56328,7 @@ impl<'a, C, NC, A> PlacementInsertCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Updates an existing placement. /// /// A builder for the *update* method supported by a *placement* resource. -/// It is not used directly, but through a `PlacementMethods`. +/// It is not used directly, but through a `PlacementMethods` instance. /// /// # Example /// @@ -55721,7 +56393,7 @@ impl<'a, C, NC, A> PlacementUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "profileId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -55778,7 +56450,7 @@ impl<'a, C, NC, A> PlacementUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -55794,7 +56466,6 @@ impl<'a, C, NC, A> PlacementUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -55804,7 +56475,7 @@ impl<'a, C, NC, A> PlacementUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -55815,7 +56486,7 @@ impl<'a, C, NC, A> PlacementUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -55824,13 +56495,13 @@ impl<'a, C, NC, A> PlacementUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -55851,7 +56522,7 @@ impl<'a, C, NC, A> PlacementUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementUpdateCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -55912,7 +56583,7 @@ impl<'a, C, NC, A> PlacementUpdateCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Generates tags for a placement. /// /// A builder for the *generatetags* method supported by a *placement* resource. -/// It is not used directly, but through a `PlacementMethods`. +/// It is not used directly, but through a `PlacementMethods` instance. /// /// # Example /// @@ -55993,7 +56664,7 @@ impl<'a, C, NC, A> PlacementGeneratetagCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "profileId", "tagFormats", "placementIds", "campaignId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -56046,7 +56717,7 @@ impl<'a, C, NC, A> PlacementGeneratetagCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -56058,7 +56729,6 @@ impl<'a, C, NC, A> PlacementGeneratetagCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -56068,7 +56738,7 @@ impl<'a, C, NC, A> PlacementGeneratetagCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -56079,7 +56749,7 @@ impl<'a, C, NC, A> PlacementGeneratetagCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -56088,13 +56758,13 @@ impl<'a, C, NC, A> PlacementGeneratetagCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -56106,7 +56776,7 @@ impl<'a, C, NC, A> PlacementGeneratetagCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// User profile ID associated with this request. + /// User profile ID associated with this request. pub fn profile_id(mut self, new_value: &str) -> PlacementGeneratetagCall<'a, C, NC, A> { self._profile_id = new_value.to_string(); self @@ -56115,7 +56785,7 @@ impl<'a, C, NC, A> PlacementGeneratetagCall<'a, C, NC, A> where NC: hyper::net:: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Tag formats to generate for these placements. + /// Tag formats to generate for these placements. pub fn add_tag_formats(mut self, new_value: &str) -> PlacementGeneratetagCall<'a, C, NC, A> { self._tag_formats.push(new_value.to_string()); self @@ -56124,7 +56794,7 @@ impl<'a, C, NC, A> PlacementGeneratetagCall<'a, C, NC, A> where NC: hyper::net:: /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Generate tags for these placements. + /// Generate tags for these placements. pub fn add_placement_ids(mut self, new_value: &str) -> PlacementGeneratetagCall<'a, C, NC, A> { self._placement_ids.push(new_value.to_string()); self @@ -56132,7 +56802,7 @@ impl<'a, C, NC, A> PlacementGeneratetagCall<'a, C, NC, A> where NC: hyper::net:: /// Sets the *campaign id* query property to the given value. /// /// - /// Generate placements belonging to this campaign. This is a required field. + /// Generate placements belonging to this campaign. This is a required field. pub fn campaign_id(mut self, new_value: &str) -> PlacementGeneratetagCall<'a, C, NC, A> { self._campaign_id = Some(new_value.to_string()); self diff --git a/gen/dns1_beta1/Cargo.toml b/gen/dns1_beta1/Cargo.toml index 17a68aa89a..4db344278c 100644 --- a/gen/dns1_beta1/Cargo.toml +++ b/gen/dns1_beta1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-dns1_beta1" -version = "0.1.1+20150114" +version = "0.1.2+20150114" authors = ["Sebastian Thiel "] description = "A complete library to interact with dns (protocol v1beta1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dns1_beta1" @@ -16,7 +16,7 @@ keywords = ["dns", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/dns1_beta1/README.md b/gen/dns1_beta1/README.md index 851719e364..277d50e246 100644 --- a/gen/dns1_beta1/README.md +++ b/gen/dns1_beta1/README.md @@ -1,11 +1,11 @@ The `google-dns1_beta1` library allows access to all features of the *Google dns* service. -This documentation was generated from *dns* crate version *0.1.1+20150114*, where *20150114* is the exact revision of the *dns:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *dns* crate version *0.1.2+20150114*, where *20150114* is the exact revision of the *dns:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *dns* *v1_beta1* API can be found at the [official documentation site](https://developers.google.com/cloud-dns). @@ -31,6 +31,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-dns1_beta1/struct.Dns.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-dns1_beta1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-dns1_beta1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-dns1_beta1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -40,6 +42,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-dns1_beta1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -77,7 +81,7 @@ google-dns1_beta1 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-dns1_beta1" as dns1_beta1; -use dns1_beta1::Result; +use dns1_beta1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use dns1_beta1::Dns; @@ -103,15 +107,17 @@ let result = hub.managed_zones().list("project") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -124,7 +130,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-dns1_beta1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-dns1_beta1/trait.ResponseResult.html), it will return that by default. @@ -147,8 +153,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-dns1_beta1/tra ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-dns1_beta1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-dns1_beta1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-dns1_beta1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-dns1_beta1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-dns1_beta1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/dns1_beta1/src/cmn.rs b/gen/dns1_beta1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/dns1_beta1/src/cmn.rs +++ b/gen/dns1_beta1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/dns1_beta1/src/lib.rs b/gen/dns1_beta1/src/lib.rs index 1a53944f11..b5b2618b5e 100644 --- a/gen/dns1_beta1/src/lib.rs +++ b/gen/dns1_beta1/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *dns* crate version *0.1.1+20150114*, where *20150114* is the exact revision of the *dns:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *dns* crate version *0.1.2+20150114*, where *20150114* is the exact revision of the *dns:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *dns* *v1_beta1* API can be found at the //! [official documentation site](https://developers.google.com/cloud-dns). @@ -31,6 +31,8 @@ //! //! * **[Hub](struct.Dns.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -40,6 +42,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -77,7 +81,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-dns1_beta1" as dns1_beta1; -//! use dns1_beta1::Result; +//! use dns1_beta1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -104,15 +108,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -125,7 +131,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -148,8 +154,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -198,7 +205,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -252,7 +259,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-dns1_beta1" as dns1_beta1; -/// use dns1_beta1::Result; +/// use dns1_beta1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -279,15 +286,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -308,7 +317,7 @@ impl<'a, C, NC, A> Dns Dns { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -327,7 +336,7 @@ impl<'a, C, NC, A> Dns } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -355,25 +364,25 @@ impl<'a, C, NC, A> Dns /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ManagedZone { - /// Identifies what kind of resource this is. Value: the fixed string "dns#managedZone". + /// Identifies what kind of resource this is. Value: the fixed string "dns#managedZone". pub kind: Option, - /// A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the managed zone's function. + /// A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the managed zone's function. pub description: Option, - /// Delegate your managed_zone to these virtual name servers; defined by the server (output only) + /// Delegate your managed_zone to these virtual name servers; defined by the server (output only) #[serde(alias="nameServers")] pub name_servers: Option>, - /// The time that this resource was created on the server. This is in RFC3339 text format. Output only. + /// The time that this resource was created on the server. This is in RFC3339 text format. Output only. #[serde(alias="creationTime")] pub creation_time: Option, - /// Unique identifier for the resource; defined by the server (output only) + /// Unique identifier for the resource; defined by the server (output only) pub id: Option, - /// The DNS name of this managed zone, for instance "example.com.". + /// The DNS name of this managed zone, for instance "example.com.". #[serde(alias="dnsName")] pub dns_name: Option, - /// Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet is a set of DNS name servers that all host the same ManagedZones. Most users will leave this field unset. + /// Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet is a set of DNS name servers that all host the same ManagedZones. Most users will leave this field unset. #[serde(alias="nameServerSet")] pub name_server_set: Option, - /// User assigned name for this resource. Must be unique within the project. The name must be 1-32 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes. + /// User assigned name for this resource. Must be unique within the project. The name must be 1-32 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes. pub name: Option, } @@ -393,16 +402,16 @@ impl ResponseResult for ManagedZone {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ResourceRecordSet { - /// As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) + /// As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) pub rrdatas: Option>, - /// Identifies what kind of resource this is. Value: the fixed string "dns#resourceRecordSet". + /// Identifies what kind of resource this is. Value: the fixed string "dns#resourceRecordSet". pub kind: Option, - /// One of A, AAAA, SOA, MX, NS, TXT + /// One of A, AAAA, SOA, MX, NS, TXT #[serde(alias="type")] pub type_: Option, - /// For example, www.example.com. + /// For example, www.example.com. pub name: Option, - /// Number of seconds that this ResourceRecordSet can be cached by resolvers. + /// Number of seconds that this ResourceRecordSet can be cached by resolvers. pub ttl: Option, } @@ -415,24 +424,24 @@ impl Resource for ResourceRecordSet {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Quota { - /// Maximum allowed number of ResourceRecordSets per zone in the project. + /// Maximum allowed number of ResourceRecordSets per zone in the project. #[serde(alias="rrsetsPerManagedZone")] pub rrsets_per_managed_zone: i32, - /// Identifies what kind of resource this is. Value: the fixed string "dns#quota". + /// Identifies what kind of resource this is. Value: the fixed string "dns#quota". pub kind: String, - /// Maximum allowed number of ResourceRecordSets to add per ChangesCreateRequest. + /// Maximum allowed number of ResourceRecordSets to add per ChangesCreateRequest. #[serde(alias="rrsetAdditionsPerChange")] pub rrset_additions_per_change: i32, - /// Maximum allowed size for total rrdata in one ChangesCreateRequest in bytes. + /// Maximum allowed size for total rrdata in one ChangesCreateRequest in bytes. #[serde(alias="totalRrdataSizePerChange")] pub total_rrdata_size_per_change: i32, - /// Maximum allowed number of ResourceRecords per ResourceRecordSet. + /// Maximum allowed number of ResourceRecords per ResourceRecordSet. #[serde(alias="resourceRecordsPerRrset")] pub resource_records_per_rrset: i32, - /// Maximum allowed number of ResourceRecordSets to delete per ChangesCreateRequest. + /// Maximum allowed number of ResourceRecordSets to delete per ChangesCreateRequest. #[serde(alias="rrsetDeletionsPerChange")] pub rrset_deletions_per_change: i32, - /// Maximum allowed number of managed zones in the project. + /// Maximum allowed number of managed zones in the project. #[serde(alias="managedZones")] pub managed_zones: i32, } @@ -451,13 +460,13 @@ impl Part for Quota {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Project { - /// Quotas assigned to this project (output only). + /// Quotas assigned to this project (output only). pub quota: Quota, - /// Identifies what kind of resource this is. Value: the fixed string "dns#project". + /// Identifies what kind of resource this is. Value: the fixed string "dns#project". pub kind: String, - /// User assigned unique identifier for the resource (output only). + /// User assigned unique identifier for the resource (output only). pub id: String, - /// Unique numeric identifier for the resource; defined by the server (output only). + /// Unique numeric identifier for the resource; defined by the server (output only). pub number: String, } @@ -481,9 +490,9 @@ pub struct ChangesListResponse { /// In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a "snapshot" of collections larger than the maximum page size. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Type of resource. + /// Type of resource. pub kind: String, - /// The requested changes. + /// The requested changes. pub changes: Vec, } @@ -506,9 +515,9 @@ pub struct ManagedZonesListResponse { /// In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// Type of resource. + /// Type of resource. pub kind: String, - /// The managed zone resources. + /// The managed zone resources. #[serde(alias="managedZones")] pub managed_zones: Vec, } @@ -529,18 +538,18 @@ impl ResponseResult for ManagedZonesListResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Change { - /// Which ResourceRecordSets to remove? Must match existing data exactly. + /// Which ResourceRecordSets to remove? Must match existing data exactly. pub deletions: Option>, - /// Status of the operation. Can be one of the following: "PENDING" or "DONE" (output only). + /// Status of the operation. Can be one of the following: "PENDING" or "DONE" (output only). pub status: Option, - /// Identifies what kind of resource this is. Value: the fixed string "dns#change". + /// Identifies what kind of resource this is. Value: the fixed string "dns#change". pub kind: Option, - /// The time that this operation was started by the server. This is in RFC3339 text format. + /// The time that this operation was started by the server. This is in RFC3339 text format. #[serde(alias="startTime")] pub start_time: Option, - /// Which ResourceRecordSets to add? + /// Which ResourceRecordSets to add? pub additions: Option>, - /// Unique identifier for the resource; defined by the server (output only). + /// Unique identifier for the resource; defined by the server (output only). pub id: Option, } @@ -565,9 +574,9 @@ pub struct ResourceRecordSetsListResponse { /// In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned will be an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// The resource record set resources. + /// The resource record set resources. pub rrsets: Vec, - /// Type of resource. + /// Type of resource. pub kind: String, } @@ -613,13 +622,19 @@ pub struct ChangeMethods<'a, C, NC, A> hub: &'a Dns, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ChangeMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ChangeMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ChangeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Atomically update the ResourceRecordSet collection. + /// Atomically update the ResourceRecordSet collection. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Identifies the project addressed by this request. + /// * `managedZone` - Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn create(&self, request: &Change, project: &str, managed_zone: &str) -> ChangeCreateCall<'a, C, NC, A> { ChangeCreateCall { hub: self.hub, @@ -634,7 +649,12 @@ impl<'a, C, NC, A> ChangeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Enumerate Changes to a ResourceRecordSet collection. + /// Enumerate Changes to a ResourceRecordSet collection. + /// + /// # Arguments + /// + /// * `project` - Identifies the project addressed by this request. + /// * `managedZone` - Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn list(&self, project: &str, managed_zone: &str) -> ChangeListCall<'a, C, NC, A> { ChangeListCall { hub: self.hub, @@ -652,7 +672,13 @@ impl<'a, C, NC, A> ChangeMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Fetch the representation of an existing Change. + /// Fetch the representation of an existing Change. + /// + /// # Arguments + /// + /// * `project` - Identifies the project addressed by this request. + /// * `managedZone` - Identifies the managed zone addressed by this request. Can be the managed zone name or id. + /// * `changeId` - The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse. pub fn get(&self, project: &str, managed_zone: &str, change_id: &str) -> ChangeGetCall<'a, C, NC, A> { ChangeGetCall { hub: self.hub, @@ -702,13 +728,18 @@ pub struct ManagedZoneMethods<'a, C, NC, A> hub: &'a Dns, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ManagedZoneMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ManagedZoneMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ManagedZoneMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Create a new ManagedZone. + /// Create a new ManagedZone. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `project` - Identifies the project addressed by this request. pub fn create(&self, request: &ManagedZone, project: &str) -> ManagedZoneCreateCall<'a, C, NC, A> { ManagedZoneCreateCall { hub: self.hub, @@ -722,7 +753,12 @@ impl<'a, C, NC, A> ManagedZoneMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Delete a previously created ManagedZone. + /// Delete a previously created ManagedZone. + /// + /// # Arguments + /// + /// * `project` - Identifies the project addressed by this request. + /// * `managedZone` - Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn delete(&self, project: &str, managed_zone: &str) -> ManagedZoneDeleteCall<'a, C, NC, A> { ManagedZoneDeleteCall { hub: self.hub, @@ -736,7 +772,12 @@ impl<'a, C, NC, A> ManagedZoneMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Fetch the representation of an existing ManagedZone. + /// Fetch the representation of an existing ManagedZone. + /// + /// # Arguments + /// + /// * `project` - Identifies the project addressed by this request. + /// * `managedZone` - Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn get(&self, project: &str, managed_zone: &str) -> ManagedZoneGetCall<'a, C, NC, A> { ManagedZoneGetCall { hub: self.hub, @@ -750,7 +791,11 @@ impl<'a, C, NC, A> ManagedZoneMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Enumerate ManagedZones that have been created but not yet deleted. + /// Enumerate ManagedZones that have been created but not yet deleted. + /// + /// # Arguments + /// + /// * `project` - Identifies the project addressed by this request. pub fn list(&self, project: &str) -> ManagedZoneListCall<'a, C, NC, A> { ManagedZoneListCall { hub: self.hub, @@ -800,13 +845,18 @@ pub struct ResourceRecordSetMethods<'a, C, NC, A> hub: &'a Dns, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ResourceRecordSetMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ResourceRecordSetMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ResourceRecordSetMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Enumerate ResourceRecordSets that have been created but not yet deleted. + /// Enumerate ResourceRecordSets that have been created but not yet deleted. + /// + /// # Arguments + /// + /// * `project` - Identifies the project addressed by this request. + /// * `managedZone` - Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn list(&self, project: &str, managed_zone: &str) -> ResourceRecordSetListCall<'a, C, NC, A> { ResourceRecordSetListCall { hub: self.hub, @@ -859,13 +909,17 @@ pub struct ProjectMethods<'a, C, NC, A> hub: &'a Dns, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ProjectMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ProjectMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Fetch the representation of an existing Project. + /// Fetch the representation of an existing Project. + /// + /// # Arguments + /// + /// * `project` - Identifies the project addressed by this request. pub fn get(&self, project: &str) -> ProjectGetCall<'a, C, NC, A> { ProjectGetCall { hub: self.hub, @@ -888,7 +942,7 @@ impl<'a, C, NC, A> ProjectMethods<'a, C, NC, A> { /// Atomically update the ResourceRecordSet collection. /// /// A builder for the *create* method supported by a *change* resource. -/// It is not used directly, but through a `ChangeMethods`. +/// It is not used directly, but through a `ChangeMethods` instance. /// /// # Example /// @@ -955,7 +1009,7 @@ impl<'a, C, NC, A> ChangeCreateCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["alt", "project", "managedZone"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1012,7 +1066,7 @@ impl<'a, C, NC, A> ChangeCreateCall<'a, C, NC, A> where NC: hyper::net::NetworkC } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1028,7 +1082,6 @@ impl<'a, C, NC, A> ChangeCreateCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -1038,7 +1091,7 @@ impl<'a, C, NC, A> ChangeCreateCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1049,7 +1102,7 @@ impl<'a, C, NC, A> ChangeCreateCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1058,13 +1111,13 @@ impl<'a, C, NC, A> ChangeCreateCall<'a, C, NC, A> where NC: hyper::net::NetworkC Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1085,7 +1138,7 @@ impl<'a, C, NC, A> ChangeCreateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the project addressed by this request. + /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ChangeCreateCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -1095,7 +1148,7 @@ impl<'a, C, NC, A> ChangeCreateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. + /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn managed_zone(mut self, new_value: &str) -> ChangeCreateCall<'a, C, NC, A> { self._managed_zone = new_value.to_string(); self @@ -1156,7 +1209,7 @@ impl<'a, C, NC, A> ChangeCreateCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Enumerate Changes to a ResourceRecordSet collection. /// /// A builder for the *list* method supported by a *change* resource. -/// It is not used directly, but through a `ChangeMethods`. +/// It is not used directly, but through a `ChangeMethods` instance. /// /// # Example /// @@ -1236,7 +1289,7 @@ impl<'a, C, NC, A> ChangeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "project", "managedZone", "sortOrder", "sortBy", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1289,7 +1342,7 @@ impl<'a, C, NC, A> ChangeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1301,7 +1354,6 @@ impl<'a, C, NC, A> ChangeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -1311,7 +1363,7 @@ impl<'a, C, NC, A> ChangeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1322,7 +1374,7 @@ impl<'a, C, NC, A> ChangeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1331,13 +1383,13 @@ impl<'a, C, NC, A> ChangeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1349,7 +1401,7 @@ impl<'a, C, NC, A> ChangeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the project addressed by this request. + /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ChangeListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -1359,7 +1411,7 @@ impl<'a, C, NC, A> ChangeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. + /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn managed_zone(mut self, new_value: &str) -> ChangeListCall<'a, C, NC, A> { self._managed_zone = new_value.to_string(); self @@ -1367,7 +1419,7 @@ impl<'a, C, NC, A> ChangeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *sort order* query property to the given value. /// /// - /// Sorting order direction: 'ascending' or 'descending'. + /// Sorting order direction: 'ascending' or 'descending'. pub fn sort_order(mut self, new_value: &str) -> ChangeListCall<'a, C, NC, A> { self._sort_order = Some(new_value.to_string()); self @@ -1375,7 +1427,7 @@ impl<'a, C, NC, A> ChangeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *sort by* query property to the given value. /// /// - /// Sorting criterion. The only supported value is change sequence. + /// Sorting criterion. The only supported value is change sequence. pub fn sort_by(mut self, new_value: &str) -> ChangeListCall<'a, C, NC, A> { self._sort_by = Some(new_value.to_string()); self @@ -1383,7 +1435,7 @@ impl<'a, C, NC, A> ChangeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *page token* query property to the given value. /// /// - /// Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request. + /// Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> ChangeListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -1391,7 +1443,7 @@ impl<'a, C, NC, A> ChangeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return. + /// Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return. pub fn max_results(mut self, new_value: i32) -> ChangeListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -1452,7 +1504,7 @@ impl<'a, C, NC, A> ChangeListCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Fetch the representation of an existing Change. /// /// A builder for the *get* method supported by a *change* resource. -/// It is not used directly, but through a `ChangeMethods`. +/// It is not used directly, but through a `ChangeMethods` instance. /// /// # Example /// @@ -1514,7 +1566,7 @@ impl<'a, C, NC, A> ChangeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "project", "managedZone", "changeId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1567,7 +1619,7 @@ impl<'a, C, NC, A> ChangeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1579,7 +1631,6 @@ impl<'a, C, NC, A> ChangeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -1589,7 +1640,7 @@ impl<'a, C, NC, A> ChangeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1600,7 +1651,7 @@ impl<'a, C, NC, A> ChangeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1609,13 +1660,13 @@ impl<'a, C, NC, A> ChangeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1627,7 +1678,7 @@ impl<'a, C, NC, A> ChangeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the project addressed by this request. + /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ChangeGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -1637,7 +1688,7 @@ impl<'a, C, NC, A> ChangeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. + /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn managed_zone(mut self, new_value: &str) -> ChangeGetCall<'a, C, NC, A> { self._managed_zone = new_value.to_string(); self @@ -1647,7 +1698,7 @@ impl<'a, C, NC, A> ChangeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse. + /// The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse. pub fn change_id(mut self, new_value: &str) -> ChangeGetCall<'a, C, NC, A> { self._change_id = new_value.to_string(); self @@ -1708,7 +1759,7 @@ impl<'a, C, NC, A> ChangeGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Create a new ManagedZone. /// /// A builder for the *create* method supported by a *managedZone* resource. -/// It is not used directly, but through a `ManagedZoneMethods`. +/// It is not used directly, but through a `ManagedZoneMethods` instance. /// /// # Example /// @@ -1773,7 +1824,7 @@ impl<'a, C, NC, A> ManagedZoneCreateCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1830,7 +1881,7 @@ impl<'a, C, NC, A> ManagedZoneCreateCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1846,7 +1897,6 @@ impl<'a, C, NC, A> ManagedZoneCreateCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -1856,7 +1906,7 @@ impl<'a, C, NC, A> ManagedZoneCreateCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1867,7 +1917,7 @@ impl<'a, C, NC, A> ManagedZoneCreateCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1876,13 +1926,13 @@ impl<'a, C, NC, A> ManagedZoneCreateCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1903,7 +1953,7 @@ impl<'a, C, NC, A> ManagedZoneCreateCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the project addressed by this request. + /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ManagedZoneCreateCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -1964,7 +2014,7 @@ impl<'a, C, NC, A> ManagedZoneCreateCall<'a, C, NC, A> where NC: hyper::net::Net /// Delete a previously created ManagedZone. /// /// A builder for the *delete* method supported by a *managedZone* resource. -/// It is not used directly, but through a `ManagedZoneMethods`. +/// It is not used directly, but through a `ManagedZoneMethods` instance. /// /// # Example /// @@ -2024,7 +2074,7 @@ impl<'a, C, NC, A> ManagedZoneDeleteCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["project", "managedZone"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2076,7 +2126,7 @@ impl<'a, C, NC, A> ManagedZoneDeleteCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2088,7 +2138,6 @@ impl<'a, C, NC, A> ManagedZoneDeleteCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -2098,7 +2147,7 @@ impl<'a, C, NC, A> ManagedZoneDeleteCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2109,12 +2158,12 @@ impl<'a, C, NC, A> ManagedZoneDeleteCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2126,7 +2175,7 @@ impl<'a, C, NC, A> ManagedZoneDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the project addressed by this request. + /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ManagedZoneDeleteCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -2136,7 +2185,7 @@ impl<'a, C, NC, A> ManagedZoneDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. + /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn managed_zone(mut self, new_value: &str) -> ManagedZoneDeleteCall<'a, C, NC, A> { self._managed_zone = new_value.to_string(); self @@ -2197,7 +2246,7 @@ impl<'a, C, NC, A> ManagedZoneDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Fetch the representation of an existing ManagedZone. /// /// A builder for the *get* method supported by a *managedZone* resource. -/// It is not used directly, but through a `ManagedZoneMethods`. +/// It is not used directly, but through a `ManagedZoneMethods` instance. /// /// # Example /// @@ -2257,7 +2306,7 @@ impl<'a, C, NC, A> ManagedZoneGetCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt", "project", "managedZone"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2310,7 +2359,7 @@ impl<'a, C, NC, A> ManagedZoneGetCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2322,7 +2371,6 @@ impl<'a, C, NC, A> ManagedZoneGetCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -2332,7 +2380,7 @@ impl<'a, C, NC, A> ManagedZoneGetCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2343,7 +2391,7 @@ impl<'a, C, NC, A> ManagedZoneGetCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2352,13 +2400,13 @@ impl<'a, C, NC, A> ManagedZoneGetCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2370,7 +2418,7 @@ impl<'a, C, NC, A> ManagedZoneGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the project addressed by this request. + /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ManagedZoneGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -2380,7 +2428,7 @@ impl<'a, C, NC, A> ManagedZoneGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. + /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn managed_zone(mut self, new_value: &str) -> ManagedZoneGetCall<'a, C, NC, A> { self._managed_zone = new_value.to_string(); self @@ -2441,7 +2489,7 @@ impl<'a, C, NC, A> ManagedZoneGetCall<'a, C, NC, A> where NC: hyper::net::Networ /// Enumerate ManagedZones that have been created but not yet deleted. /// /// A builder for the *list* method supported by a *managedZone* resource. -/// It is not used directly, but through a `ManagedZoneMethods`. +/// It is not used directly, but through a `ManagedZoneMethods` instance. /// /// # Example /// @@ -2509,7 +2557,7 @@ impl<'a, C, NC, A> ManagedZoneListCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "project", "pageToken", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2562,7 +2610,7 @@ impl<'a, C, NC, A> ManagedZoneListCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2574,7 +2622,6 @@ impl<'a, C, NC, A> ManagedZoneListCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -2584,7 +2631,7 @@ impl<'a, C, NC, A> ManagedZoneListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2595,7 +2642,7 @@ impl<'a, C, NC, A> ManagedZoneListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2604,13 +2651,13 @@ impl<'a, C, NC, A> ManagedZoneListCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2622,7 +2669,7 @@ impl<'a, C, NC, A> ManagedZoneListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the project addressed by this request. + /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ManagedZoneListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -2630,7 +2677,7 @@ impl<'a, C, NC, A> ManagedZoneListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *page token* query property to the given value. /// /// - /// Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request. + /// Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> ManagedZoneListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2638,7 +2685,7 @@ impl<'a, C, NC, A> ManagedZoneListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return. + /// Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return. pub fn max_results(mut self, new_value: i32) -> ManagedZoneListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2699,7 +2746,7 @@ impl<'a, C, NC, A> ManagedZoneListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Enumerate ResourceRecordSets that have been created but not yet deleted. /// /// A builder for the *list* method supported by a *resourceRecordSet* resource. -/// It is not used directly, but through a `ResourceRecordSetMethods`. +/// It is not used directly, but through a `ResourceRecordSetMethods` instance. /// /// # Example /// @@ -2779,7 +2826,7 @@ impl<'a, C, NC, A> ResourceRecordSetListCall<'a, C, NC, A> where NC: hyper::net: for &field in ["alt", "project", "managedZone", "type", "pageToken", "name", "maxResults"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2832,7 +2879,7 @@ impl<'a, C, NC, A> ResourceRecordSetListCall<'a, C, NC, A> where NC: hyper::net: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2844,7 +2891,6 @@ impl<'a, C, NC, A> ResourceRecordSetListCall<'a, C, NC, A> where NC: hyper::net: dlg.pre_request(); req.send() - }; match req_result { @@ -2854,7 +2900,7 @@ impl<'a, C, NC, A> ResourceRecordSetListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2865,7 +2911,7 @@ impl<'a, C, NC, A> ResourceRecordSetListCall<'a, C, NC, A> where NC: hyper::net: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2874,13 +2920,13 @@ impl<'a, C, NC, A> ResourceRecordSetListCall<'a, C, NC, A> where NC: hyper::net: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2892,7 +2938,7 @@ impl<'a, C, NC, A> ResourceRecordSetListCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the project addressed by this request. + /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ResourceRecordSetListCall<'a, C, NC, A> { self._project = new_value.to_string(); self @@ -2902,7 +2948,7 @@ impl<'a, C, NC, A> ResourceRecordSetListCall<'a, C, NC, A> where NC: hyper::net: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. + /// Identifies the managed zone addressed by this request. Can be the managed zone name or id. pub fn managed_zone(mut self, new_value: &str) -> ResourceRecordSetListCall<'a, C, NC, A> { self._managed_zone = new_value.to_string(); self @@ -2910,7 +2956,7 @@ impl<'a, C, NC, A> ResourceRecordSetListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *type* query property to the given value. /// /// - /// Restricts the list to return only records of this type. If present, the "name" parameter must also be present. + /// Restricts the list to return only records of this type. If present, the "name" parameter must also be present. pub fn type_(mut self, new_value: &str) -> ResourceRecordSetListCall<'a, C, NC, A> { self._type_ = Some(new_value.to_string()); self @@ -2918,7 +2964,7 @@ impl<'a, C, NC, A> ResourceRecordSetListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *page token* query property to the given value. /// /// - /// Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request. + /// Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request. pub fn page_token(mut self, new_value: &str) -> ResourceRecordSetListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2926,7 +2972,7 @@ impl<'a, C, NC, A> ResourceRecordSetListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *name* query property to the given value. /// /// - /// Restricts the list to return only records with this fully qualified domain name. + /// Restricts the list to return only records with this fully qualified domain name. pub fn name(mut self, new_value: &str) -> ResourceRecordSetListCall<'a, C, NC, A> { self._name = Some(new_value.to_string()); self @@ -2934,7 +2980,7 @@ impl<'a, C, NC, A> ResourceRecordSetListCall<'a, C, NC, A> where NC: hyper::net: /// Sets the *max results* query property to the given value. /// /// - /// Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return. + /// Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return. pub fn max_results(mut self, new_value: i32) -> ResourceRecordSetListCall<'a, C, NC, A> { self._max_results = Some(new_value); self @@ -2995,7 +3041,7 @@ impl<'a, C, NC, A> ResourceRecordSetListCall<'a, C, NC, A> where NC: hyper::net: /// Fetch the representation of an existing Project. /// /// A builder for the *get* method supported by a *project* resource. -/// It is not used directly, but through a `ProjectMethods`. +/// It is not used directly, but through a `ProjectMethods` instance. /// /// # Example /// @@ -3053,7 +3099,7 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon for &field in ["alt", "project"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3106,7 +3152,7 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3118,7 +3164,6 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon dlg.pre_request(); req.send() - }; match req_result { @@ -3128,7 +3173,7 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3139,7 +3184,7 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3148,13 +3193,13 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3166,7 +3211,7 @@ impl<'a, C, NC, A> ProjectGetCall<'a, C, NC, A> where NC: hyper::net::NetworkCon /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Identifies the project addressed by this request. + /// Identifies the project addressed by this request. pub fn project(mut self, new_value: &str) -> ProjectGetCall<'a, C, NC, A> { self._project = new_value.to_string(); self diff --git a/gen/doubleclickbidmanager1/Cargo.toml b/gen/doubleclickbidmanager1/Cargo.toml index f5f85c2a38..1a8cb1b897 100644 --- a/gen/doubleclickbidmanager1/Cargo.toml +++ b/gen/doubleclickbidmanager1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-doubleclickbidmanager1" -version = "0.1.1+20150122" +version = "0.1.2+20150122" authors = ["Sebastian Thiel "] description = "A complete library to interact with DoubleClick Bid Manager (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/doubleclickbidmanager1" @@ -16,7 +16,7 @@ keywords = ["doubleclickbidmanager", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/doubleclickbidmanager1/README.md b/gen/doubleclickbidmanager1/README.md index 6c5b981788..042af776d3 100644 --- a/gen/doubleclickbidmanager1/README.md +++ b/gen/doubleclickbidmanager1/README.md @@ -1,11 +1,11 @@ The `google-doubleclickbidmanager1` library allows access to all features of the *Google DoubleClick Bid Manager* service. -This documentation was generated from *DoubleClick Bid Manager* crate version *0.1.1+20150122*, where *20150122* is the exact revision of the *doubleclickbidmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *DoubleClick Bid Manager* crate version *0.1.2+20150122*, where *20150122* is the exact revision of the *doubleclickbidmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *DoubleClick Bid Manager* *v1* API can be found at the [official documentation site](https://developers.google.com/bid-manager/). @@ -29,6 +29,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-doubleclickbidmanager1/struct.DoubleClickBidManager.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-doubleclickbidmanager1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-doubleclickbidmanager1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-doubleclickbidmanager1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -38,6 +40,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-doubleclickbidmanager1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -73,7 +77,7 @@ google-doubleclickbidmanager1 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-doubleclickbidmanager1" as doubleclickbidmanager1; -use doubleclickbidmanager1::Result; +use doubleclickbidmanager1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use doubleclickbidmanager1::DoubleClickBidManager; @@ -97,15 +101,17 @@ let result = hub.queries().getquery("queryId") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -118,7 +124,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-doubleclickbidmanager1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-doubleclickbidmanager1/trait.ResponseResult.html), it will return that by default. @@ -141,8 +147,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-doubleclickbid ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-doubleclickbidmanager1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-doubleclickbidmanager1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-doubleclickbidmanager1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-doubleclickbidmanager1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-doubleclickbidmanager1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/doubleclickbidmanager1/src/cmn.rs b/gen/doubleclickbidmanager1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/doubleclickbidmanager1/src/cmn.rs +++ b/gen/doubleclickbidmanager1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/doubleclickbidmanager1/src/lib.rs b/gen/doubleclickbidmanager1/src/lib.rs index ac09d67ef6..6e42595d83 100644 --- a/gen/doubleclickbidmanager1/src/lib.rs +++ b/gen/doubleclickbidmanager1/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *DoubleClick Bid Manager* crate version *0.1.1+20150122*, where *20150122* is the exact revision of the *doubleclickbidmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *DoubleClick Bid Manager* crate version *0.1.2+20150122*, where *20150122* is the exact revision of the *doubleclickbidmanager:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *DoubleClick Bid Manager* *v1* API can be found at the //! [official documentation site](https://developers.google.com/bid-manager/). @@ -29,6 +29,8 @@ //! //! * **[Hub](struct.DoubleClickBidManager.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -38,6 +40,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -73,7 +77,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-doubleclickbidmanager1" as doubleclickbidmanager1; -//! use doubleclickbidmanager1::Result; +//! use doubleclickbidmanager1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -98,15 +102,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -119,7 +125,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -142,8 +148,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -192,7 +199,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -216,7 +223,7 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, Re /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-doubleclickbidmanager1" as doubleclickbidmanager1; -/// use doubleclickbidmanager1::Result; +/// use doubleclickbidmanager1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -241,15 +248,17 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, Re /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -270,7 +279,7 @@ impl<'a, C, NC, A> DoubleClickBidManager DoubleClickBidManager { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -286,7 +295,7 @@ impl<'a, C, NC, A> DoubleClickBidManager } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -311,13 +320,13 @@ impl<'a, C, NC, A> DoubleClickBidManager /// #[derive(Default, Clone, Debug, Serialize)] pub struct DownloadLineItemsRequest { - /// Filter type used to filter line items to fetch. + /// Filter type used to filter line items to fetch. #[serde(alias="filterType")] pub filter_type: Option, - /// Ids of the specified filter type used to filter line items to fetch. If omitted, all the line items will be returned. + /// Ids of the specified filter type used to filter line items to fetch. If omitted, all the line items will be returned. #[serde(alias="filterIds")] pub filter_ids: Option>, - /// Format in which the line items will be returned. Default to CSV. + /// Format in which the line items will be returned. Default to CSV. pub format: Option, } @@ -330,7 +339,7 @@ impl RequestValue for DownloadLineItemsRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReportFailure { - /// Error code that shows why the report was not created. + /// Error code that shows why the report was not created. #[serde(alias="errorCode")] pub error_code: String, } @@ -344,17 +353,17 @@ impl Part for ReportFailure {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Parameters { - /// Metrics to include as columns in your report. + /// Metrics to include as columns in your report. pub metrics: Vec, - /// Filters used to match traffic data in your report. + /// Filters used to match traffic data in your report. pub filters: Vec, - /// Report type. + /// Report type. #[serde(alias="type")] pub type_: String, - /// Data is grouped by the filters listed in this field. + /// Data is grouped by the filters listed in this field. #[serde(alias="groupBys")] pub group_bys: Vec, - /// Whether to include data from Invite Media. + /// Whether to include data from Invite Media. #[serde(alias="includeInviteData")] pub include_invite_data: bool, } @@ -368,10 +377,10 @@ impl Part for Parameters {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReportKey { - /// Query ID. + /// Query ID. #[serde(alias="queryId")] pub query_id: String, - /// Report ID. + /// Report ID. #[serde(alias="reportId")] pub report_id: String, } @@ -390,13 +399,13 @@ impl Part for ReportKey {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct UploadLineItemsRequest { - /// Line items in CSV to upload. Refer to Entity Write File Format for more information on file format. + /// Line items in CSV to upload. Refer to Entity Write File Format for more information on file format. #[serde(alias="lineItems")] pub line_items: Option, - /// Set to true to get upload status without actually persisting the line items. + /// Set to true to get upload status without actually persisting the line items. #[serde(alias="dryRun")] pub dry_run: Option, - /// Format the line items are in. Default to CSV. + /// Format the line items are in. Default to CSV. pub format: Option, } @@ -414,9 +423,9 @@ impl RequestValue for UploadLineItemsRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ListQueriesResponse { - /// Identifies what kind of resource this is. Value: the fixed string "doubleclickbidmanager#listQueriesResponse". + /// Identifies what kind of resource this is. Value: the fixed string "doubleclickbidmanager#listQueriesResponse". pub kind: String, - /// Retrieved queries. + /// Retrieved queries. pub queries: Vec, } @@ -429,15 +438,15 @@ impl ResponseResult for ListQueriesResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReportMetadata { - /// Report status. + /// Report status. pub status: ReportStatus, - /// The ending time for the data that is shown in the report. + /// The ending time for the data that is shown in the report. #[serde(alias="reportDataEndTimeMs")] pub report_data_end_time_ms: String, - /// The path to the location in Google Cloud Storage where the report is stored. + /// The path to the location in Google Cloud Storage where the report is stored. #[serde(alias="googleCloudStoragePath")] pub google_cloud_storage_path: String, - /// The starting time for the data that is shown in the report. + /// The starting time for the data that is shown in the report. #[serde(alias="reportDataStartTimeMs")] pub report_data_start_time_ms: String, } @@ -451,15 +460,15 @@ impl Part for ReportMetadata {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct QuerySchedule { - /// Datetime to periodically run the query until. + /// Datetime to periodically run the query until. #[serde(alias="endTimeMs")] pub end_time_ms: String, - /// How often the query is run. + /// How often the query is run. pub frequency: String, - /// Time of day at which a new report will be generated, represented as minutes past midnight. Range is 0 to 1439. Only applies to scheduled reports. + /// Time of day at which a new report will be generated, represented as minutes past midnight. Range is 0 to 1439. Only applies to scheduled reports. #[serde(alias="nextRunMinuteOfDay")] pub next_run_minute_of_day: i32, - /// Canonical timezone code for report generation time. Defaults to America/New_York. + /// Canonical timezone code for report generation time. Defaults to America/New_York. #[serde(alias="nextRunTimezoneCode")] pub next_run_timezone_code: String, } @@ -478,16 +487,16 @@ impl Part for QuerySchedule {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct RunQueryRequest { - /// The ending time for the data that is shown in the report. Note, reportDataEndTimeMs is required if dataRange is CUSTOM_DATES and ignored otherwise. + /// The ending time for the data that is shown in the report. Note, reportDataEndTimeMs is required if dataRange is CUSTOM_DATES and ignored otherwise. #[serde(alias="reportDataEndTimeMs")] pub report_data_end_time_ms: Option, - /// Canonical timezone code for report data time. Defaults to America/New_York. + /// Canonical timezone code for report data time. Defaults to America/New_York. #[serde(alias="timezoneCode")] pub timezone_code: Option, - /// The starting time for the data that is shown in the report. Note, reportDataStartTimeMs is required if dataRange is CUSTOM_DATES and ignored otherwise. + /// The starting time for the data that is shown in the report. Note, reportDataStartTimeMs is required if dataRange is CUSTOM_DATES and ignored otherwise. #[serde(alias="reportDataStartTimeMs")] pub report_data_start_time_ms: Option, - /// Report data range used to generate the report. + /// Report data range used to generate the report. #[serde(alias="dataRange")] pub data_range: Option, } @@ -506,7 +515,7 @@ impl RequestValue for RunQueryRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UploadLineItemsResponse { - /// Status of upload. + /// Status of upload. #[serde(alias="uploadStatus")] pub upload_status: UploadStatus, } @@ -520,36 +529,36 @@ impl ResponseResult for UploadLineItemsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct QueryMetadata { - /// The path to the location in Google Cloud Storage where the latest report is stored. + /// The path to the location in Google Cloud Storage where the latest report is stored. #[serde(alias="googleCloudStoragePathForLatestReport")] pub google_cloud_storage_path_for_latest_report: String, - /// Range of report data. + /// Range of report data. #[serde(alias="dataRange")] pub data_range: String, - /// Whether to send an email notification when a report is ready. Default to false. + /// Whether to send an email notification when a report is ready. Default to false. #[serde(alias="sendNotification")] pub send_notification: bool, /// Locale of the generated reports. Valid values are cs CZECH de GERMAN en ENGLISH es SPANISH fr FRENCH it ITALIAN ja JAPANESE ko KOREAN pl POLISH pt-BR BRAZILIAN_PORTUGUESE ru RUSSIAN tr TURKISH uk UKRAINIAN zh-CN CHINA_CHINESE zh-TW TAIWAN_CHINESE /// /// An locale string not in the list above will generate reports in English. pub locale: String, - /// The path in Google Drive for the latest report. + /// The path in Google Drive for the latest report. #[serde(alias="googleDrivePathForLatestReport")] pub google_drive_path_for_latest_report: String, - /// Format of the generated report. + /// Format of the generated report. pub format: String, - /// List of email addresses which are sent email notifications when the report is finished. Separate from sendNotification. + /// List of email addresses which are sent email notifications when the report is finished. Separate from sendNotification. #[serde(alias="shareEmailAddress")] pub share_email_address: Vec, - /// Number of reports that have been generated for the query. + /// Number of reports that have been generated for the query. #[serde(alias="reportCount")] pub report_count: i32, - /// Whether the latest report is currently running. + /// Whether the latest report is currently running. pub running: bool, - /// The time when the latest report started to run. + /// The time when the latest report started to run. #[serde(alias="latestReportRunTimeMs")] pub latest_report_run_time_ms: String, - /// Query title. It is used to name the reports generated from this query. + /// Query title. It is used to name the reports generated from this query. pub title: String, } @@ -562,14 +571,14 @@ impl Part for QueryMetadata {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReportStatus { - /// If the report failed, this records the cause. + /// If the report failed, this records the cause. pub failure: ReportFailure, - /// The state of the report. + /// The state of the report. pub state: String, - /// The time when this report either completed successfully or failed. + /// The time when this report either completed successfully or failed. #[serde(alias="finishTimeMs")] pub finish_time_ms: String, - /// The file type of the report. + /// The file type of the report. pub format: String, } @@ -587,9 +596,9 @@ impl Part for ReportStatus {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ListReportsResponse { - /// Identifies what kind of resource this is. Value: the fixed string "doubleclickbidmanager#listReportsResponse". + /// Identifies what kind of resource this is. Value: the fixed string "doubleclickbidmanager#listReportsResponse". pub kind: String, - /// Retrieved reports. + /// Retrieved reports. pub reports: Vec, } @@ -602,19 +611,19 @@ impl ResponseResult for ListReportsResponse {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct RowStatus { - /// Whether the entity is persisted. + /// Whether the entity is persisted. pub persisted: bool, - /// Reasons why the entity can't be uploaded. + /// Reasons why the entity can't be uploaded. pub errors: Vec, - /// Entity name. + /// Entity name. #[serde(alias="entityName")] pub entity_name: String, - /// Whether the stored entity is changed as a result of upload. + /// Whether the stored entity is changed as a result of upload. pub changed: bool, - /// Entity Id. + /// Entity Id. #[serde(alias="entityId")] pub entity_id: String, - /// Row number. + /// Row number. #[serde(alias="rowNumber")] pub row_number: i32, } @@ -633,11 +642,11 @@ impl Part for RowStatus {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Report { - /// Report parameters. + /// Report parameters. pub params: Option, - /// Key used to identify a report. + /// Key used to identify a report. pub key: Option, - /// Report metadata. + /// Report metadata. pub metadata: Option, } @@ -656,25 +665,25 @@ impl Resource for Report {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Query { - /// Identifies what kind of resource this is. Value: the fixed string "doubleclickbidmanager#query". + /// Identifies what kind of resource this is. Value: the fixed string "doubleclickbidmanager#query". pub kind: Option, - /// Information on how often and when to run a query. + /// Information on how often and when to run a query. pub schedule: Option, - /// Canonical timezone code for report data time. Defaults to America/New_York. + /// Canonical timezone code for report data time. Defaults to America/New_York. #[serde(alias="timezoneCode")] pub timezone_code: Option, - /// The ending time for the data that is shown in the report. Note, reportDataEndTimeMs is required if metadata.dataRange is CUSTOM_DATES and ignored otherwise. + /// The ending time for the data that is shown in the report. Note, reportDataEndTimeMs is required if metadata.dataRange is CUSTOM_DATES and ignored otherwise. #[serde(alias="reportDataEndTimeMs")] pub report_data_end_time_ms: Option, - /// Query ID. + /// Query ID. #[serde(alias="queryId")] pub query_id: Option, - /// Query parameters. + /// Query parameters. pub params: Option, - /// The starting time for the data that is shown in the report. Note, reportDataStartTimeMs is required if metadata.dataRange is CUSTOM_DATES and ignored otherwise. + /// The starting time for the data that is shown in the report. Note, reportDataStartTimeMs is required if metadata.dataRange is CUSTOM_DATES and ignored otherwise. #[serde(alias="reportDataStartTimeMs")] pub report_data_start_time_ms: Option, - /// Query metadata. + /// Query metadata. pub metadata: Option, } @@ -693,7 +702,7 @@ impl ResponseResult for Query {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct DownloadLineItemsResponse { - /// Retrieved line items in CSV format. Refer to Entity Write File Format for more information on file format. + /// Retrieved line items in CSV format. Refer to Entity Write File Format for more information on file format. #[serde(alias="lineItems")] pub line_items: String, } @@ -707,10 +716,10 @@ impl ResponseResult for DownloadLineItemsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FilterPair { - /// Filter type. + /// Filter type. #[serde(alias="type")] pub type_: String, - /// Filter value. + /// Filter value. pub value: String, } @@ -723,9 +732,9 @@ impl Part for FilterPair {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UploadStatus { - /// Reasons why upload can't be completed. + /// Reasons why upload can't be completed. pub errors: Vec, - /// Per-row upload status. + /// Per-row upload status. #[serde(alias="rowStatus")] pub row_status: Vec, } @@ -772,13 +781,17 @@ pub struct LineitemMethods<'a, C, NC, A> hub: &'a DoubleClickBidManager, } -impl<'a, C, NC, A> ResourceMethodsBuilder for LineitemMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for LineitemMethods<'a, C, NC, A> {} impl<'a, C, NC, A> LineitemMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Uploads line items in CSV format. + /// Uploads line items in CSV format. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn uploadlineitems(&self, request: &UploadLineItemsRequest) -> LineitemUploadlineitemCall<'a, C, NC, A> { LineitemUploadlineitemCall { hub: self.hub, @@ -790,7 +803,11 @@ impl<'a, C, NC, A> LineitemMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves line items in CSV format. + /// Retrieves line items in CSV format. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn downloadlineitems(&self, request: &DownloadLineItemsRequest) -> LineitemDownloadlineitemCall<'a, C, NC, A> { LineitemDownloadlineitemCall { hub: self.hub, @@ -837,13 +854,17 @@ pub struct ReportMethods<'a, C, NC, A> hub: &'a DoubleClickBidManager, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ReportMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ReportMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves stored reports. + /// Retrieves stored reports. + /// + /// # Arguments + /// + /// * `queryId` - Query ID with which the reports are associated. pub fn listreports(&self, query_id: &str) -> ReportListreportCall<'a, C, NC, A> { ReportListreportCall { hub: self.hub, @@ -890,13 +911,13 @@ pub struct QueryMethods<'a, C, NC, A> hub: &'a DoubleClickBidManager, } -impl<'a, C, NC, A> ResourceMethodsBuilder for QueryMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for QueryMethods<'a, C, NC, A> {} impl<'a, C, NC, A> QueryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves stored queries. + /// Retrieves stored queries. pub fn listqueries(&self) -> QueryListqueryCall<'a, C, NC, A> { QueryListqueryCall { hub: self.hub, @@ -907,7 +928,11 @@ impl<'a, C, NC, A> QueryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a stored query. + /// Retrieves a stored query. + /// + /// # Arguments + /// + /// * `queryId` - Query ID to retrieve. pub fn getquery(&self, query_id: &str) -> QueryGetqueryCall<'a, C, NC, A> { QueryGetqueryCall { hub: self.hub, @@ -919,7 +944,11 @@ impl<'a, C, NC, A> QueryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a query. + /// Creates a query. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn createquery(&self, request: &Query) -> QueryCreatequeryCall<'a, C, NC, A> { QueryCreatequeryCall { hub: self.hub, @@ -931,7 +960,11 @@ impl<'a, C, NC, A> QueryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a stored query as well as the associated stored reports. + /// Deletes a stored query as well as the associated stored reports. + /// + /// # Arguments + /// + /// * `queryId` - Query ID to delete. pub fn deletequery(&self, query_id: &str) -> QueryDeletequeryCall<'a, C, NC, A> { QueryDeletequeryCall { hub: self.hub, @@ -943,7 +976,12 @@ impl<'a, C, NC, A> QueryMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Runs a stored query to generate a report. + /// Runs a stored query to generate a report. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `queryId` - Query ID to run. pub fn runquery(&self, request: &RunQueryRequest, query_id: &str) -> QueryRunqueryCall<'a, C, NC, A> { QueryRunqueryCall { hub: self.hub, @@ -966,7 +1004,7 @@ impl<'a, C, NC, A> QueryMethods<'a, C, NC, A> { /// Uploads line items in CSV format. /// /// A builder for the *uploadlineitems* method supported by a *lineitem* resource. -/// It is not used directly, but through a `LineitemMethods`. +/// It is not used directly, but through a `LineitemMethods` instance. /// /// # Example /// @@ -1028,7 +1066,7 @@ impl<'a, C, NC, A> LineitemUploadlineitemCall<'a, C, NC, A> where NC: hyper::net for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1047,7 +1085,7 @@ impl<'a, C, NC, A> LineitemUploadlineitemCall<'a, C, NC, A> where NC: hyper::net Some(value) => params.push(("key", value)), None => { dlg.finished(false); - return Result::MissingAPIKey + return Err(Error::MissingAPIKey) } } @@ -1075,7 +1113,6 @@ impl<'a, C, NC, A> LineitemUploadlineitemCall<'a, C, NC, A> where NC: hyper::net dlg.pre_request(); req.send() - }; match req_result { @@ -1085,7 +1122,7 @@ impl<'a, C, NC, A> LineitemUploadlineitemCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1096,7 +1133,7 @@ impl<'a, C, NC, A> LineitemUploadlineitemCall<'a, C, NC, A> where NC: hyper::net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1105,13 +1142,13 @@ impl<'a, C, NC, A> LineitemUploadlineitemCall<'a, C, NC, A> where NC: hyper::net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1167,7 +1204,7 @@ impl<'a, C, NC, A> LineitemUploadlineitemCall<'a, C, NC, A> where NC: hyper::net /// Retrieves line items in CSV format. /// /// A builder for the *downloadlineitems* method supported by a *lineitem* resource. -/// It is not used directly, but through a `LineitemMethods`. +/// It is not used directly, but through a `LineitemMethods` instance. /// /// # Example /// @@ -1229,7 +1266,7 @@ impl<'a, C, NC, A> LineitemDownloadlineitemCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1248,7 +1285,7 @@ impl<'a, C, NC, A> LineitemDownloadlineitemCall<'a, C, NC, A> where NC: hyper::n Some(value) => params.push(("key", value)), None => { dlg.finished(false); - return Result::MissingAPIKey + return Err(Error::MissingAPIKey) } } @@ -1276,7 +1313,6 @@ impl<'a, C, NC, A> LineitemDownloadlineitemCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -1286,7 +1322,7 @@ impl<'a, C, NC, A> LineitemDownloadlineitemCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1297,7 +1333,7 @@ impl<'a, C, NC, A> LineitemDownloadlineitemCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1306,13 +1342,13 @@ impl<'a, C, NC, A> LineitemDownloadlineitemCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1368,7 +1404,7 @@ impl<'a, C, NC, A> LineitemDownloadlineitemCall<'a, C, NC, A> where NC: hyper::n /// Retrieves stored reports. /// /// A builder for the *listreports* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -1425,7 +1461,7 @@ impl<'a, C, NC, A> ReportListreportCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt", "queryId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1444,7 +1480,7 @@ impl<'a, C, NC, A> ReportListreportCall<'a, C, NC, A> where NC: hyper::net::Netw Some(value) => params.push(("key", value)), None => { dlg.finished(false); - return Result::MissingAPIKey + return Err(Error::MissingAPIKey) } } @@ -1488,7 +1524,6 @@ impl<'a, C, NC, A> ReportListreportCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -1498,7 +1533,7 @@ impl<'a, C, NC, A> ReportListreportCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1509,7 +1544,7 @@ impl<'a, C, NC, A> ReportListreportCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1518,13 +1553,13 @@ impl<'a, C, NC, A> ReportListreportCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1536,7 +1571,7 @@ impl<'a, C, NC, A> ReportListreportCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Query ID with which the reports are associated. + /// Query ID with which the reports are associated. pub fn query_id(mut self, new_value: &str) -> ReportListreportCall<'a, C, NC, A> { self._query_id = new_value.to_string(); self @@ -1581,7 +1616,7 @@ impl<'a, C, NC, A> ReportListreportCall<'a, C, NC, A> where NC: hyper::net::Netw /// Retrieves stored queries. /// /// A builder for the *listqueries* method supported by a *query* resource. -/// It is not used directly, but through a `QueryMethods`. +/// It is not used directly, but through a `QueryMethods` instance. /// /// # Example /// @@ -1636,7 +1671,7 @@ impl<'a, C, NC, A> QueryListqueryCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1655,7 +1690,7 @@ impl<'a, C, NC, A> QueryListqueryCall<'a, C, NC, A> where NC: hyper::net::Networ Some(value) => params.push(("key", value)), None => { dlg.finished(false); - return Result::MissingAPIKey + return Err(Error::MissingAPIKey) } } @@ -1675,7 +1710,6 @@ impl<'a, C, NC, A> QueryListqueryCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -1685,7 +1719,7 @@ impl<'a, C, NC, A> QueryListqueryCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1696,7 +1730,7 @@ impl<'a, C, NC, A> QueryListqueryCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1705,13 +1739,13 @@ impl<'a, C, NC, A> QueryListqueryCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1758,7 +1792,7 @@ impl<'a, C, NC, A> QueryListqueryCall<'a, C, NC, A> where NC: hyper::net::Networ /// Retrieves a stored query. /// /// A builder for the *getquery* method supported by a *query* resource. -/// It is not used directly, but through a `QueryMethods`. +/// It is not used directly, but through a `QueryMethods` instance. /// /// # Example /// @@ -1815,7 +1849,7 @@ impl<'a, C, NC, A> QueryGetqueryCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "queryId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1834,7 +1868,7 @@ impl<'a, C, NC, A> QueryGetqueryCall<'a, C, NC, A> where NC: hyper::net::Network Some(value) => params.push(("key", value)), None => { dlg.finished(false); - return Result::MissingAPIKey + return Err(Error::MissingAPIKey) } } @@ -1878,7 +1912,6 @@ impl<'a, C, NC, A> QueryGetqueryCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -1888,7 +1921,7 @@ impl<'a, C, NC, A> QueryGetqueryCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1899,7 +1932,7 @@ impl<'a, C, NC, A> QueryGetqueryCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1908,13 +1941,13 @@ impl<'a, C, NC, A> QueryGetqueryCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1926,7 +1959,7 @@ impl<'a, C, NC, A> QueryGetqueryCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Query ID to retrieve. + /// Query ID to retrieve. pub fn query_id(mut self, new_value: &str) -> QueryGetqueryCall<'a, C, NC, A> { self._query_id = new_value.to_string(); self @@ -1971,7 +2004,7 @@ impl<'a, C, NC, A> QueryGetqueryCall<'a, C, NC, A> where NC: hyper::net::Network /// Creates a query. /// /// A builder for the *createquery* method supported by a *query* resource. -/// It is not used directly, but through a `QueryMethods`. +/// It is not used directly, but through a `QueryMethods` instance. /// /// # Example /// @@ -2033,7 +2066,7 @@ impl<'a, C, NC, A> QueryCreatequeryCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2052,7 +2085,7 @@ impl<'a, C, NC, A> QueryCreatequeryCall<'a, C, NC, A> where NC: hyper::net::Netw Some(value) => params.push(("key", value)), None => { dlg.finished(false); - return Result::MissingAPIKey + return Err(Error::MissingAPIKey) } } @@ -2080,7 +2113,6 @@ impl<'a, C, NC, A> QueryCreatequeryCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -2090,7 +2122,7 @@ impl<'a, C, NC, A> QueryCreatequeryCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2101,7 +2133,7 @@ impl<'a, C, NC, A> QueryCreatequeryCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2110,13 +2142,13 @@ impl<'a, C, NC, A> QueryCreatequeryCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2172,7 +2204,7 @@ impl<'a, C, NC, A> QueryCreatequeryCall<'a, C, NC, A> where NC: hyper::net::Netw /// Deletes a stored query as well as the associated stored reports. /// /// A builder for the *deletequery* method supported by a *query* resource. -/// It is not used directly, but through a `QueryMethods`. +/// It is not used directly, but through a `QueryMethods` instance. /// /// # Example /// @@ -2229,7 +2261,7 @@ impl<'a, C, NC, A> QueryDeletequeryCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["queryId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2247,7 +2279,7 @@ impl<'a, C, NC, A> QueryDeletequeryCall<'a, C, NC, A> where NC: hyper::net::Netw Some(value) => params.push(("key", value)), None => { dlg.finished(false); - return Result::MissingAPIKey + return Err(Error::MissingAPIKey) } } @@ -2291,7 +2323,6 @@ impl<'a, C, NC, A> QueryDeletequeryCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -2301,7 +2332,7 @@ impl<'a, C, NC, A> QueryDeletequeryCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2312,12 +2343,12 @@ impl<'a, C, NC, A> QueryDeletequeryCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2329,7 +2360,7 @@ impl<'a, C, NC, A> QueryDeletequeryCall<'a, C, NC, A> where NC: hyper::net::Netw /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Query ID to delete. + /// Query ID to delete. pub fn query_id(mut self, new_value: &str) -> QueryDeletequeryCall<'a, C, NC, A> { self._query_id = new_value.to_string(); self @@ -2374,7 +2405,7 @@ impl<'a, C, NC, A> QueryDeletequeryCall<'a, C, NC, A> where NC: hyper::net::Netw /// Runs a stored query to generate a report. /// /// A builder for the *runquery* method supported by a *query* resource. -/// It is not used directly, but through a `QueryMethods`. +/// It is not used directly, but through a `QueryMethods` instance. /// /// # Example /// @@ -2438,7 +2469,7 @@ impl<'a, C, NC, A> QueryRunqueryCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["queryId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2456,7 +2487,7 @@ impl<'a, C, NC, A> QueryRunqueryCall<'a, C, NC, A> where NC: hyper::net::Network Some(value) => params.push(("key", value)), None => { dlg.finished(false); - return Result::MissingAPIKey + return Err(Error::MissingAPIKey) } } @@ -2508,7 +2539,6 @@ impl<'a, C, NC, A> QueryRunqueryCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -2518,7 +2548,7 @@ impl<'a, C, NC, A> QueryRunqueryCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2529,12 +2559,12 @@ impl<'a, C, NC, A> QueryRunqueryCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2555,7 +2585,7 @@ impl<'a, C, NC, A> QueryRunqueryCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Query ID to run. + /// Query ID to run. pub fn query_id(mut self, new_value: &str) -> QueryRunqueryCall<'a, C, NC, A> { self._query_id = new_value.to_string(); self diff --git a/gen/doubleclicksearch2/Cargo.toml b/gen/doubleclicksearch2/Cargo.toml index 0864e3d2cd..deff387881 100644 --- a/gen/doubleclicksearch2/Cargo.toml +++ b/gen/doubleclicksearch2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-doubleclicksearch2" -version = "0.1.1+20150224" +version = "0.1.2+20150224" authors = ["Sebastian Thiel "] description = "A complete library to interact with doubleclicksearch (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/doubleclicksearch2" @@ -16,7 +16,7 @@ keywords = ["doubleclicksearch", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/doubleclicksearch2/README.md b/gen/doubleclicksearch2/README.md index 01e40e0ca2..7b80d1ae05 100644 --- a/gen/doubleclicksearch2/README.md +++ b/gen/doubleclicksearch2/README.md @@ -1,11 +1,11 @@ The `google-doubleclicksearch2` library allows access to all features of the *Google doubleclicksearch* service. -This documentation was generated from *doubleclicksearch* crate version *0.1.1+20150224*, where *20150224* is the exact revision of the *doubleclicksearch:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *doubleclicksearch* crate version *0.1.2+20150224*, where *20150224* is the exact revision of the *doubleclicksearch:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *doubleclicksearch* *v2* API can be found at the [official documentation site](https://developers.google.com/doubleclick-search/). @@ -33,6 +33,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-doubleclicksearch2/struct.Doubleclicksearch.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-doubleclicksearch2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-doubleclicksearch2/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-doubleclicksearch2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -42,6 +44,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-doubleclicksearch2/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -79,7 +83,7 @@ google-doubleclicksearch2 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-doubleclicksearch2" as doubleclicksearch2; -use doubleclicksearch2::Result; +use doubleclicksearch2::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use doubleclicksearch2::Doubleclicksearch; @@ -103,15 +107,17 @@ let result = hub.reports().get_file("reportId", -48) .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -124,7 +130,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-doubleclicksearch2/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-doubleclicksearch2/trait.ResponseResult.html), it will return that by default. @@ -147,8 +153,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-doubleclicksea ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-doubleclicksearch2/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-doubleclicksearch2/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-doubleclicksearch2/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-doubleclicksearch2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-doubleclicksearch2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/doubleclicksearch2/src/cmn.rs b/gen/doubleclicksearch2/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/doubleclicksearch2/src/cmn.rs +++ b/gen/doubleclicksearch2/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/doubleclicksearch2/src/lib.rs b/gen/doubleclicksearch2/src/lib.rs index 71fc8e2536..56e0c1d2f1 100644 --- a/gen/doubleclicksearch2/src/lib.rs +++ b/gen/doubleclicksearch2/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *doubleclicksearch* crate version *0.1.1+20150224*, where *20150224* is the exact revision of the *doubleclicksearch:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *doubleclicksearch* crate version *0.1.2+20150224*, where *20150224* is the exact revision of the *doubleclicksearch:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *doubleclicksearch* *v2* API can be found at the //! [official documentation site](https://developers.google.com/doubleclick-search/). @@ -33,6 +33,8 @@ //! //! * **[Hub](struct.Doubleclicksearch.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -42,6 +44,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -79,7 +83,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-doubleclicksearch2" as doubleclicksearch2; -//! use doubleclicksearch2::Result; +//! use doubleclicksearch2::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -104,15 +108,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -125,7 +131,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -148,8 +154,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -198,7 +205,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -244,7 +251,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-doubleclicksearch2" as doubleclicksearch2; -/// use doubleclicksearch2::Result; +/// use doubleclicksearch2::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -269,15 +276,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -298,7 +307,7 @@ impl<'a, C, NC, A> Doubleclicksearch Doubleclicksearch { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -314,7 +323,7 @@ impl<'a, C, NC, A> Doubleclicksearch } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -334,9 +343,9 @@ impl<'a, C, NC, A> Doubleclicksearch /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomDimension { - /// Custom dimension name. + /// Custom dimension name. pub name: String, - /// Custom dimension value. + /// Custom dimension value. pub value: String, } @@ -349,9 +358,9 @@ impl Part for CustomDimension {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct CustomMetric { - /// Custom metric name. + /// Custom metric name. pub name: String, - /// Custom metric numeric value. + /// Custom metric numeric value. pub value: f64, } @@ -364,78 +373,78 @@ impl Part for CustomMetric {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Conversion { - /// Custom dimensions for the conversion, which can be used to filter data in a report. + /// Custom dimensions for the conversion, which can be used to filter data in a report. #[serde(alias="customDimension")] pub custom_dimension: Vec, - /// DS ad group ID. + /// DS ad group ID. #[serde(alias="adGroupId")] pub ad_group_id: String, - /// The numeric segmentation identifier (for example, DoubleClick Search Floodlight activity ID). + /// The numeric segmentation identifier (for example, DoubleClick Search Floodlight activity ID). #[serde(alias="segmentationId")] pub segmentation_id: String, - /// Attribution model name. + /// Attribution model name. #[serde(alias="attributionModel")] pub attribution_model: String, - /// DS campaign ID. + /// DS campaign ID. #[serde(alias="campaignId")] pub campaign_id: String, - /// The revenue amount of this TRANSACTION conversion, in micros. + /// The revenue amount of this TRANSACTION conversion, in micros. #[serde(alias="revenueMicros")] pub revenue_micros: String, - /// DS advertiser ID. + /// DS advertiser ID. #[serde(alias="advertiserId")] pub advertiser_id: String, - /// The quantity of this conversion, in millis. + /// The quantity of this conversion, in millis. #[serde(alias="quantityMillis")] pub quantity_millis: String, - /// Conversion count in millis. + /// Conversion count in millis. #[serde(alias="countMillis")] pub count_millis: String, - /// DS criterion (keyword) ID. + /// DS criterion (keyword) ID. #[serde(alias="criterionId")] pub criterion_id: String, - /// The time at which the conversion took place, in epoch millis UTC. + /// The time at which the conversion took place, in epoch millis UTC. #[serde(alias="conversionTimestamp")] pub conversion_timestamp: String, - /// The advertiser-provided order id for the conversion. + /// The advertiser-provided order id for the conversion. #[serde(alias="floodlightOrderId")] pub floodlight_order_id: String, - /// The segmentation type of this conversion (for example, FLOODLIGHT). + /// The segmentation type of this conversion (for example, FLOODLIGHT). #[serde(alias="segmentationType")] pub segmentation_type: String, - /// DS click ID for the conversion. + /// DS click ID for the conversion. #[serde(alias="clickId")] pub click_id: String, - /// Custom metrics for the conversion. + /// Custom metrics for the conversion. #[serde(alias="customMetric")] pub custom_metric: Vec, - /// DS conversion ID. + /// DS conversion ID. #[serde(alias="dsConversionId")] pub ds_conversion_id: String, - /// DS engine account ID. + /// DS engine account ID. #[serde(alias="engineAccountId")] pub engine_account_id: String, - /// The time at which the conversion was last modified, in epoch millis UTC. + /// The time at which the conversion was last modified, in epoch millis UTC. #[serde(alias="conversionModifiedTimestamp")] pub conversion_modified_timestamp: String, - /// The currency code for the conversion's revenue. Should be in ISO 4217 alphabetic (3-char) format. + /// The currency code for the conversion's revenue. Should be in ISO 4217 alphabetic (3-char) format. #[serde(alias="currencyCode")] pub currency_code: String, - /// The friendly segmentation identifier (for example, DoubleClick Search Floodlight activity name). + /// The friendly segmentation identifier (for example, DoubleClick Search Floodlight activity name). #[serde(alias="segmentationName")] pub segmentation_name: String, - /// The state of the conversion, that is, either ACTIVE or REMOVED. Note: state DELETED is deprecated. + /// The state of the conversion, that is, either ACTIVE or REMOVED. Note: state DELETED is deprecated. pub state: String, - /// DS ad ID. + /// DS ad ID. #[serde(alias="adId")] pub ad_id: String, - /// DS agency ID. + /// DS agency ID. #[serde(alias="agencyId")] pub agency_id: String, - /// Advertiser-provided ID for the conversion, also known as the order ID. + /// Advertiser-provided ID for the conversion, also known as the order ID. #[serde(alias="conversionId")] pub conversion_id: String, - /// The type of the conversion, that is, either ACTION or TRANSACTION. An ACTION conversion is an action by the user that has no monetarily quantifiable value, while a TRANSACTION conversion is an action that does have a monetarily quantifiable value. Examples are email list signups (ACTION) versus ecommerce purchases (TRANSACTION). + /// The type of the conversion, that is, either ACTION or TRANSACTION. An ACTION conversion is an action by the user that has no monetarily quantifiable value, while a TRANSACTION conversion is an action that does have a monetarily quantifiable value. Examples are email list signups (ACTION) versus ecommerce purchases (TRANSACTION). #[serde(alias="type")] pub type_: String, } @@ -459,9 +468,9 @@ impl Part for ReportRow {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReportFiles { - /// Use this url to download the report file. + /// Use this url to download the report file. pub url: String, - /// The size of this report file in bytes. + /// The size of this report file in bytes. #[serde(alias="byteCount")] pub byte_count: i64, } @@ -476,25 +485,25 @@ impl Part for ReportFiles {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportRequestReportScope { - /// DS advertiser ID. + /// DS advertiser ID. #[serde(alias="advertiserId")] pub advertiser_id: String, - /// DS ad group ID. + /// DS ad group ID. #[serde(alias="adGroupId")] pub ad_group_id: String, - /// DS keyword ID. + /// DS keyword ID. #[serde(alias="keywordId")] pub keyword_id: String, - /// DS ad ID. + /// DS ad ID. #[serde(alias="adId")] pub ad_id: String, - /// DS agency ID. + /// DS agency ID. #[serde(alias="agencyId")] pub agency_id: String, - /// DS engine account ID. + /// DS engine account ID. #[serde(alias="engineAccountId")] pub engine_account_id: String, - /// DS campaign ID. + /// DS campaign ID. #[serde(alias="campaignId")] pub campaign_id: String, } @@ -509,11 +518,11 @@ impl Part for ReportRequestReportScope {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportRequestFilters { - /// Column to perform the filter on. This can be a DoubleClick Search column or a saved column. + /// Column to perform the filter on. This can be a DoubleClick Search column or a saved column. pub column: ReportApiColumnSpec, - /// Operator to use in the filter. See the filter reference for a list of available operators. + /// Operator to use in the filter. See the filter reference for a list of available operators. pub operator: String, - /// A list of values to filter the column value against. + /// A list of values to filter the column value against. pub values: Vec, } @@ -527,9 +536,9 @@ impl Part for ReportRequestFilters {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportRequestOrderBy { - /// Column to perform the sort on. This can be a DoubleClick Search-defined column or a saved column. + /// Column to perform the sort on. This can be a DoubleClick Search-defined column or a saved column. pub column: ReportApiColumnSpec, - /// The sort direction, which is either ascending or descending. + /// The sort direction, which is either ascending or descending. #[serde(alias="sortOrder")] pub sort_order: String, } @@ -544,32 +553,32 @@ impl Part for ReportRequestOrderBy {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportApiColumnSpec { - /// Synchronous report only. Set to true to group by this column. Defaults to false. + /// Synchronous report only. Set to true to group by this column. Defaults to false. #[serde(alias="groupByColumn")] pub group_by_column: bool, - /// Inclusive day in YYYY-MM-DD format. When provided, this overrides the overall time range of the report for this column only. Must be provided together with startDate. + /// Inclusive day in YYYY-MM-DD format. When provided, this overrides the overall time range of the report for this column only. Must be provided together with startDate. #[serde(alias="endDate")] pub end_date: String, - /// Name of a saved column to include in the report. The report must be scoped at advertiser or lower, and this saved column must already be created in the DoubleClick Search UI. + /// Name of a saved column to include in the report. The report must be scoped at advertiser or lower, and this saved column must already be created in the DoubleClick Search UI. #[serde(alias="savedColumnName")] pub saved_column_name: String, /// Segments a report by a custom dimension. The report must be scoped to an advertiser or lower, and the custom dimension must already be set up in DoubleClick Search. The custom dimension name, which appears in DoubleClick Search, is case sensitive. /// If used in a conversion report, returns the value of the specified custom dimension for the given conversion, if set. This column does not segment the conversion report. #[serde(alias="customDimensionName")] pub custom_dimension_name: String, - /// Text used to identify this column in the report output; defaults to columnName or savedColumnName when not specified. This can be used to prevent collisions between DoubleClick Search columns and saved columns with the same name. + /// Text used to identify this column in the report output; defaults to columnName or savedColumnName when not specified. This can be used to prevent collisions between DoubleClick Search columns and saved columns with the same name. #[serde(alias="headerText")] pub header_text: String, - /// Name of a DoubleClick Search column to include in the report. + /// Name of a DoubleClick Search column to include in the report. #[serde(alias="columnName")] pub column_name: String, - /// The platform that is used to provide data for the custom dimension. Acceptable values are "Floodlight". + /// The platform that is used to provide data for the custom dimension. Acceptable values are "Floodlight". #[serde(alias="platformSource")] pub platform_source: String, - /// Inclusive date in YYYY-MM-DD format. When provided, this overrides the overall time range of the report for this column only. Must be provided together with endDate. + /// Inclusive date in YYYY-MM-DD format. When provided, this overrides the overall time range of the report for this column only. Must be provided together with endDate. #[serde(alias="startDate")] pub start_date: String, - /// Name of a custom metric to include in the report. The report must be scoped to an advertiser or lower, and the custom metric must already be set up in DoubleClick Search. The custom metric name, which appears in DoubleClick Search, is case sensitive. + /// Name of a custom metric to include in the report. The report must be scoped to an advertiser or lower, and the custom metric must already be set up in DoubleClick Search. The custom metric name, which appears in DoubleClick Search, is case sensitive. #[serde(alias="customMetricName")] pub custom_metric_name: String, } @@ -583,22 +592,22 @@ impl Part for ReportApiColumnSpec {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Availability { - /// DS advertiser ID. + /// DS advertiser ID. #[serde(alias="advertiserId")] pub advertiser_id: String, - /// The numeric segmentation identifier (for example, DoubleClick Search Floodlight activity ID). + /// The numeric segmentation identifier (for example, DoubleClick Search Floodlight activity ID). #[serde(alias="segmentationId")] pub segmentation_id: String, - /// The segmentation type that this availability is for (its default value is FLOODLIGHT). + /// The segmentation type that this availability is for (its default value is FLOODLIGHT). #[serde(alias="segmentationType")] pub segmentation_type: String, - /// DS agency ID. + /// DS agency ID. #[serde(alias="agencyId")] pub agency_id: String, - /// The friendly segmentation identifier (for example, DoubleClick Search Floodlight activity name). + /// The friendly segmentation identifier (for example, DoubleClick Search Floodlight activity name). #[serde(alias="segmentationName")] pub segmentation_name: String, - /// The time by which all conversions have been uploaded, in epoch millis UTC. + /// The time by which all conversions have been uploaded, in epoch millis UTC. #[serde(alias="availabilityTimestamp")] pub availability_timestamp: String, } @@ -618,44 +627,44 @@ impl Part for Availability {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportRequest { - /// Synchronous report only. A list of columns and directions defining sorting to be performed on the report rows. + /// Synchronous report only. A list of columns and directions defining sorting to be performed on the report rows. #[serde(alias="orderBy")] pub order_by: Option>, - /// The reportScope is a set of IDs that are used to determine which subset of entities will be returned in the report. The full lineage of IDs from the lowest scoped level desired up through agency is required. + /// The reportScope is a set of IDs that are used to determine which subset of entities will be returned in the report. The full lineage of IDs from the lowest scoped level desired up through agency is required. #[serde(alias="reportScope")] pub report_scope: Option, - /// Asynchronous report only. The maximum number of rows per report file. A large report is split into many files based on this field. Acceptable values are 1000000 to 100000000, inclusive. + /// Asynchronous report only. The maximum number of rows per report file. A large report is split into many files based on this field. Acceptable values are 1000000 to 100000000, inclusive. #[serde(alias="maxRowsPerFile")] pub max_rows_per_file: Option, - /// Specifies the currency in which monetary will be returned. Possible values are: usd, agency (valid if the report is scoped to agency or lower), advertiser (valid if the report is scoped to * advertiser or lower), or account (valid if the report is scoped to engine account or lower). + /// Specifies the currency in which monetary will be returned. Possible values are: usd, agency (valid if the report is scoped to agency or lower), advertiser (valid if the report is scoped to * advertiser or lower), or account (valid if the report is scoped to engine account or lower). #[serde(alias="statisticsCurrency")] pub statistics_currency: Option, - /// If metrics are requested in a report, this argument will be used to restrict the metrics to a specific time range. + /// If metrics are requested in a report, this argument will be used to restrict the metrics to a specific time range. #[serde(alias="timeRange")] pub time_range: Option, - /// Synchronous report only. Zero-based index of the first row to return. Acceptable values are 0 to 50000, inclusive. Defaults to 0. + /// Synchronous report only. Zero-based index of the first row to return. Acceptable values are 0 to 50000, inclusive. Defaults to 0. #[serde(alias="startRow")] pub start_row: Option, - /// Synchronous report only. The maxinum number of rows to return; additional rows are dropped. Acceptable values are 0 to 10000, inclusive. Defaults to 10000. + /// Synchronous report only. The maxinum number of rows to return; additional rows are dropped. Acceptable values are 0 to 10000, inclusive. Defaults to 10000. #[serde(alias="rowCount")] pub row_count: Option, - /// Determines the type of rows that are returned in the report. For example, if you specify reportType: keyword, each row in the report will contain data about a keyword. See the Types of Reports reference for the columns that are available for each type. + /// Determines the type of rows that are returned in the report. For example, if you specify reportType: keyword, each row in the report will contain data about a keyword. See the Types of Reports reference for the columns that are available for each type. #[serde(alias="reportType")] pub report_type: Option, - /// The columns to include in the report. This includes both DoubleClick Search columns and saved columns. For DoubleClick Search columns, only the columnName parameter is required. For saved columns only the savedColumnName parameter is required. Both columnName and savedColumnName cannot be set in the same stanza. + /// The columns to include in the report. This includes both DoubleClick Search columns and saved columns. For DoubleClick Search columns, only the columnName parameter is required. For saved columns only the savedColumnName parameter is required. Both columnName and savedColumnName cannot be set in the same stanza. pub columns: Option>, - /// A list of filters to be applied to the report. + /// A list of filters to be applied to the report. pub filters: Option>, - /// Determines if removed entities should be included in the report. Defaults to false. + /// Determines if removed entities should be included in the report. Defaults to false. #[serde(alias="includeRemovedEntities")] pub include_removed_entities: Option, - /// Determines if removed entities should be included in the report. Defaults to false. Deprecated, please use includeRemovedEntities instead. + /// Determines if removed entities should be included in the report. Defaults to false. Deprecated, please use includeRemovedEntities instead. #[serde(alias="includeDeletedEntities")] pub include_deleted_entities: Option, - /// If true, the report would only be created if all the requested stat data are sourced from a single timezone. Defaults to false. + /// If true, the report would only be created if all the requested stat data are sourced from a single timezone. Defaults to false. #[serde(alias="verifySingleTimeZone")] pub verify_single_time_zone: Option, - /// Format that the report should be returned in. Currently csv or tsv is supported. + /// Format that the report should be returned in. Currently csv or tsv is supported. #[serde(alias="downloadFormat")] pub download_format: Option, } @@ -677,27 +686,27 @@ impl RequestValue for ReportRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Report { - /// Asynchronous report only. Contains a list of generated report files once the report has succesfully completed. + /// Asynchronous report only. Contains a list of generated report files once the report has succesfully completed. pub files: Vec, - /// Identifies this as a Report resource. Value: the fixed string doubleclicksearch#report. + /// Identifies this as a Report resource. Value: the fixed string doubleclicksearch#report. pub kind: String, - /// Synchronous report only. Generated report rows. + /// Synchronous report only. Generated report rows. pub rows: Vec, - /// The request that created the report. Optional fields not specified in the original request are filled with default values. + /// The request that created the report. Optional fields not specified in the original request are filled with default values. pub request: ReportRequest, - /// Asynchronous report only. True if and only if the report has completed successfully and the report files are ready to be downloaded. + /// Asynchronous report only. True if and only if the report has completed successfully and the report files are ready to be downloaded. #[serde(alias="isReportReady")] pub is_report_ready: bool, - /// The number of report rows generated by the report, not including headers. + /// The number of report rows generated by the report, not including headers. #[serde(alias="rowCount")] pub row_count: i32, - /// If all statistics of the report are sourced from the same time zone, this would be it. Otherwise the field is unset. + /// If all statistics of the report are sourced from the same time zone, this would be it. Otherwise the field is unset. #[serde(alias="statisticsTimeZone")] pub statistics_time_zone: String, - /// The currency code of all monetary values produced in the report, including values that are set by users (e.g., keyword bid settings) and metrics (e.g., cost and revenue). The currency code of a report is determined by the statisticsCurrency field of the report request. + /// The currency code of all monetary values produced in the report, including values that are set by users (e.g., keyword bid settings) and metrics (e.g., cost and revenue). The currency code of a report is determined by the statisticsCurrency field of the report request. #[serde(alias="statisticsCurrencyCode")] pub statistics_currency_code: String, - /// Asynchronous report only. Id of the report. + /// Asynchronous report only. Id of the report. pub id: String, } @@ -711,16 +720,16 @@ impl ResponseResult for Report {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ReportRequestTimeRange { - /// Inclusive UTC timestamp in RFC format, e.g., 2013-07-16T10:16:23.555Z. See additional references on how changed metrics reports work. + /// Inclusive UTC timestamp in RFC format, e.g., 2013-07-16T10:16:23.555Z. See additional references on how changed metrics reports work. #[serde(alias="changedMetricsSinceTimestamp")] pub changed_metrics_since_timestamp: String, - /// Inclusive date in YYYY-MM-DD format. + /// Inclusive date in YYYY-MM-DD format. #[serde(alias="endDate")] pub end_date: String, - /// Inclusive UTC timestamp in RFC format, e.g., 2013-07-16T10:16:23.555Z. See additional references on how changed attribute reports work. + /// Inclusive UTC timestamp in RFC format, e.g., 2013-07-16T10:16:23.555Z. See additional references on how changed attribute reports work. #[serde(alias="changedAttributesSinceTimestamp")] pub changed_attributes_since_timestamp: String, - /// Inclusive date in YYYY-MM-DD format. + /// Inclusive date in YYYY-MM-DD format. #[serde(alias="startDate")] pub start_date: String, } @@ -740,9 +749,9 @@ impl Part for ReportRequestTimeRange {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SavedColumnList { - /// The saved columns being requested. + /// The saved columns being requested. pub items: Vec, - /// Identifies this as a SavedColumnList resource. Value: the fixed string doubleclicksearch#savedColumnList. + /// Identifies this as a SavedColumnList resource. Value: the fixed string doubleclicksearch#savedColumnList. pub kind: String, } @@ -760,12 +769,12 @@ impl ResponseResult for SavedColumnList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct SavedColumn { - /// The name of the saved column. + /// The name of the saved column. #[serde(alias="savedColumnName")] pub saved_column_name: Option, - /// Identifies this as a SavedColumn resource. Value: the fixed string doubleclicksearch#savedColumn. + /// Identifies this as a SavedColumn resource. Value: the fixed string doubleclicksearch#savedColumn. pub kind: Option, - /// The type of data this saved column will produce. + /// The type of data this saved column will produce. #[serde(alias="type")] pub type_: Option, } @@ -784,7 +793,7 @@ impl Resource for SavedColumn {} /// #[derive(Default, Clone, Debug, Serialize)] pub struct UpdateAvailabilityRequest { - /// The availabilities being requested. + /// The availabilities being requested. pub availabilities: Option>, } @@ -802,7 +811,7 @@ impl RequestValue for UpdateAvailabilityRequest {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct UpdateAvailabilityResponse { - /// The availabilities being returned. + /// The availabilities being returned. pub availabilities: Vec, } @@ -823,9 +832,9 @@ impl ResponseResult for UpdateAvailabilityResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ConversionList { - /// The conversions being requested. + /// The conversions being requested. pub conversion: Option>, - /// Identifies this as a ConversionList resource. Value: the fixed string doubleclicksearch#conversionList. + /// Identifies this as a ConversionList resource. Value: the fixed string doubleclicksearch#conversionList. pub kind: Option, } @@ -872,13 +881,17 @@ pub struct ConversionMethods<'a, C, NC, A> hub: &'a Doubleclicksearch, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ConversionMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ConversionMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ConversionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a batch of new conversions into DoubleClick Search. + /// Inserts a batch of new conversions into DoubleClick Search. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn insert(&self, request: &ConversionList) -> ConversionInsertCall<'a, C, NC, A> { ConversionInsertCall { hub: self.hub, @@ -891,7 +904,17 @@ impl<'a, C, NC, A> ConversionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieves a list of conversions from a DoubleClick Search engine account. + /// Retrieves a list of conversions from a DoubleClick Search engine account. + /// + /// # Arguments + /// + /// * `agencyId` - Numeric ID of the agency. + /// * `advertiserId` - Numeric ID of the advertiser. + /// * `engineAccountId` - Numeric ID of the engine account. + /// * `endDate` - Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. + /// * `rowCount` - The number of conversions to return per call. + /// * `startDate` - First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. + /// * `startRow` - The 0-based starting index for retrieving conversions results. pub fn get(&self, agency_id: &str, advertiser_id: &str, engine_account_id: &str, end_date: i32, row_count: i32, start_date: i32, start_row: u32) -> ConversionGetCall<'a, C, NC, A> { ConversionGetCall { hub: self.hub, @@ -914,7 +937,11 @@ impl<'a, C, NC, A> ConversionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates the availabilities of a batch of floodlight activities in DoubleClick Search. + /// Updates the availabilities of a batch of floodlight activities in DoubleClick Search. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn update_availability(&self, request: &UpdateAvailabilityRequest) -> ConversionUpdateAvailabilityCall<'a, C, NC, A> { ConversionUpdateAvailabilityCall { hub: self.hub, @@ -927,7 +954,18 @@ impl<'a, C, NC, A> ConversionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a batch of conversions in DoubleClick Search. This method supports patch semantics. + /// Updates a batch of conversions in DoubleClick Search. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `advertiserId` - Numeric ID of the advertiser. + /// * `agencyId` - Numeric ID of the agency. + /// * `endDate` - Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. + /// * `engineAccountId` - Numeric ID of the engine account. + /// * `rowCount` - The number of conversions to return per call. + /// * `startDate` - First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. + /// * `startRow` - The 0-based starting index for retrieving conversions results. pub fn patch(&self, request: &ConversionList, advertiser_id: &str, agency_id: &str, end_date: i32, engine_account_id: &str, row_count: i32, start_date: i32, start_row: u32) -> ConversionPatchCall<'a, C, NC, A> { ConversionPatchCall { hub: self.hub, @@ -947,7 +985,11 @@ impl<'a, C, NC, A> ConversionMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates a batch of conversions in DoubleClick Search. + /// Updates a batch of conversions in DoubleClick Search. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn update(&self, request: &ConversionList) -> ConversionUpdateCall<'a, C, NC, A> { ConversionUpdateCall { hub: self.hub, @@ -995,13 +1037,18 @@ pub struct SavedColumnMethods<'a, C, NC, A> hub: &'a Doubleclicksearch, } -impl<'a, C, NC, A> ResourceMethodsBuilder for SavedColumnMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for SavedColumnMethods<'a, C, NC, A> {} impl<'a, C, NC, A> SavedColumnMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Retrieve the list of saved columns for a specified advertiser. + /// Retrieve the list of saved columns for a specified advertiser. + /// + /// # Arguments + /// + /// * `agencyId` - DS ID of the agency. + /// * `advertiserId` - DS ID of the advertiser. pub fn list(&self, agency_id: &str, advertiser_id: &str) -> SavedColumnListCall<'a, C, NC, A> { SavedColumnListCall { hub: self.hub, @@ -1050,13 +1097,18 @@ pub struct ReportMethods<'a, C, NC, A> hub: &'a Doubleclicksearch, } -impl<'a, C, NC, A> ResourceMethodsBuilder for ReportMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for ReportMethods<'a, C, NC, A> {} impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Downloads a report file. + /// Downloads a report file. + /// + /// # Arguments + /// + /// * `reportId` - ID of the report. + /// * `reportFragment` - The index of the report fragment to download. pub fn get_file(&self, report_id: &str, report_fragment: i32) -> ReportGetFileCall<'a, C, NC, A> { ReportGetFileCall { hub: self.hub, @@ -1070,7 +1122,11 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Generates and returns a report immediately. + /// Generates and returns a report immediately. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn generate(&self, request: &ReportRequest) -> ReportGenerateCall<'a, C, NC, A> { ReportGenerateCall { hub: self.hub, @@ -1083,7 +1139,11 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Polls for the status of a report request. + /// Polls for the status of a report request. + /// + /// # Arguments + /// + /// * `reportId` - ID of the report request being polled. pub fn get(&self, report_id: &str) -> ReportGetCall<'a, C, NC, A> { ReportGetCall { hub: self.hub, @@ -1096,7 +1156,11 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Inserts a report request into the reporting system. + /// Inserts a report request into the reporting system. + /// + /// # Arguments + /// + /// * `request` - No description provided. pub fn request(&self, request: &ReportRequest) -> ReportRequestCall<'a, C, NC, A> { ReportRequestCall { hub: self.hub, @@ -1119,7 +1183,7 @@ impl<'a, C, NC, A> ReportMethods<'a, C, NC, A> { /// Inserts a batch of new conversions into DoubleClick Search. /// /// A builder for the *insert* method supported by a *conversion* resource. -/// It is not used directly, but through a `ConversionMethods`. +/// It is not used directly, but through a `ConversionMethods` instance. /// /// # Example /// @@ -1182,7 +1246,7 @@ impl<'a, C, NC, A> ConversionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1215,7 +1279,7 @@ impl<'a, C, NC, A> ConversionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1231,7 +1295,6 @@ impl<'a, C, NC, A> ConversionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -1241,7 +1304,7 @@ impl<'a, C, NC, A> ConversionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1252,7 +1315,7 @@ impl<'a, C, NC, A> ConversionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1261,13 +1324,13 @@ impl<'a, C, NC, A> ConversionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1339,7 +1402,7 @@ impl<'a, C, NC, A> ConversionInsertCall<'a, C, NC, A> where NC: hyper::net::Netw /// Retrieves a list of conversions from a DoubleClick Search engine account. /// /// A builder for the *get* method supported by a *conversion* resource. -/// It is not used directly, but through a `ConversionMethods`. +/// It is not used directly, but through a `ConversionMethods` instance. /// /// # Example /// @@ -1429,7 +1492,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt", "agencyId", "advertiserId", "engineAccountId", "endDate", "rowCount", "startDate", "startRow", "criterionId", "campaignId", "adId", "adGroupId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1482,7 +1545,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1494,7 +1557,6 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -1504,7 +1566,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1515,7 +1577,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1524,13 +1586,13 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1542,7 +1604,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Numeric ID of the agency. + /// Numeric ID of the agency. pub fn agency_id(mut self, new_value: &str) -> ConversionGetCall<'a, C, NC, A> { self._agency_id = new_value.to_string(); self @@ -1552,7 +1614,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Numeric ID of the advertiser. + /// Numeric ID of the advertiser. pub fn advertiser_id(mut self, new_value: &str) -> ConversionGetCall<'a, C, NC, A> { self._advertiser_id = new_value.to_string(); self @@ -1562,7 +1624,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Numeric ID of the engine account. + /// Numeric ID of the engine account. pub fn engine_account_id(mut self, new_value: &str) -> ConversionGetCall<'a, C, NC, A> { self._engine_account_id = new_value.to_string(); self @@ -1572,7 +1634,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. + /// Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. pub fn end_date(mut self, new_value: i32) -> ConversionGetCall<'a, C, NC, A> { self._end_date = new_value; self @@ -1582,7 +1644,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The number of conversions to return per call. + /// The number of conversions to return per call. pub fn row_count(mut self, new_value: i32) -> ConversionGetCall<'a, C, NC, A> { self._row_count = new_value; self @@ -1592,7 +1654,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. + /// First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. pub fn start_date(mut self, new_value: i32) -> ConversionGetCall<'a, C, NC, A> { self._start_date = new_value; self @@ -1602,7 +1664,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The 0-based starting index for retrieving conversions results. + /// The 0-based starting index for retrieving conversions results. pub fn start_row(mut self, new_value: u32) -> ConversionGetCall<'a, C, NC, A> { self._start_row = new_value; self @@ -1610,7 +1672,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *criterion id* query property to the given value. /// /// - /// Numeric ID of the criterion. + /// Numeric ID of the criterion. pub fn criterion_id(mut self, new_value: &str) -> ConversionGetCall<'a, C, NC, A> { self._criterion_id = Some(new_value.to_string()); self @@ -1618,7 +1680,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *campaign id* query property to the given value. /// /// - /// Numeric ID of the campaign. + /// Numeric ID of the campaign. pub fn campaign_id(mut self, new_value: &str) -> ConversionGetCall<'a, C, NC, A> { self._campaign_id = Some(new_value.to_string()); self @@ -1626,7 +1688,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *ad id* query property to the given value. /// /// - /// Numeric ID of the ad. + /// Numeric ID of the ad. pub fn ad_id(mut self, new_value: &str) -> ConversionGetCall<'a, C, NC, A> { self._ad_id = Some(new_value.to_string()); self @@ -1634,7 +1696,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Sets the *ad group id* query property to the given value. /// /// - /// Numeric ID of the ad group. + /// Numeric ID of the ad group. pub fn ad_group_id(mut self, new_value: &str) -> ConversionGetCall<'a, C, NC, A> { self._ad_group_id = Some(new_value.to_string()); self @@ -1695,7 +1757,7 @@ impl<'a, C, NC, A> ConversionGetCall<'a, C, NC, A> where NC: hyper::net::Network /// Updates the availabilities of a batch of floodlight activities in DoubleClick Search. /// /// A builder for the *updateAvailability* method supported by a *conversion* resource. -/// It is not used directly, but through a `ConversionMethods`. +/// It is not used directly, but through a `ConversionMethods` instance. /// /// # Example /// @@ -1758,7 +1820,7 @@ impl<'a, C, NC, A> ConversionUpdateAvailabilityCall<'a, C, NC, A> where NC: hype for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1791,7 +1853,7 @@ impl<'a, C, NC, A> ConversionUpdateAvailabilityCall<'a, C, NC, A> where NC: hype } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1807,7 +1869,6 @@ impl<'a, C, NC, A> ConversionUpdateAvailabilityCall<'a, C, NC, A> where NC: hype dlg.pre_request(); req.send() - }; match req_result { @@ -1817,7 +1878,7 @@ impl<'a, C, NC, A> ConversionUpdateAvailabilityCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1828,7 +1889,7 @@ impl<'a, C, NC, A> ConversionUpdateAvailabilityCall<'a, C, NC, A> where NC: hype continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1837,13 +1898,13 @@ impl<'a, C, NC, A> ConversionUpdateAvailabilityCall<'a, C, NC, A> where NC: hype Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1915,7 +1976,7 @@ impl<'a, C, NC, A> ConversionUpdateAvailabilityCall<'a, C, NC, A> where NC: hype /// Updates a batch of conversions in DoubleClick Search. This method supports patch semantics. /// /// A builder for the *patch* method supported by a *conversion* resource. -/// It is not used directly, but through a `ConversionMethods`. +/// It is not used directly, but through a `ConversionMethods` instance. /// /// # Example /// @@ -1992,7 +2053,7 @@ impl<'a, C, NC, A> ConversionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "advertiserId", "agencyId", "endDate", "engineAccountId", "rowCount", "startDate", "startRow"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2025,7 +2086,7 @@ impl<'a, C, NC, A> ConversionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2041,7 +2102,6 @@ impl<'a, C, NC, A> ConversionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -2051,7 +2111,7 @@ impl<'a, C, NC, A> ConversionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2062,7 +2122,7 @@ impl<'a, C, NC, A> ConversionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2071,13 +2131,13 @@ impl<'a, C, NC, A> ConversionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2098,7 +2158,7 @@ impl<'a, C, NC, A> ConversionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Numeric ID of the advertiser. + /// Numeric ID of the advertiser. pub fn advertiser_id(mut self, new_value: &str) -> ConversionPatchCall<'a, C, NC, A> { self._advertiser_id = new_value.to_string(); self @@ -2108,7 +2168,7 @@ impl<'a, C, NC, A> ConversionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Numeric ID of the agency. + /// Numeric ID of the agency. pub fn agency_id(mut self, new_value: &str) -> ConversionPatchCall<'a, C, NC, A> { self._agency_id = new_value.to_string(); self @@ -2118,7 +2178,7 @@ impl<'a, C, NC, A> ConversionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. + /// Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd. pub fn end_date(mut self, new_value: i32) -> ConversionPatchCall<'a, C, NC, A> { self._end_date = new_value; self @@ -2128,7 +2188,7 @@ impl<'a, C, NC, A> ConversionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Numeric ID of the engine account. + /// Numeric ID of the engine account. pub fn engine_account_id(mut self, new_value: &str) -> ConversionPatchCall<'a, C, NC, A> { self._engine_account_id = new_value.to_string(); self @@ -2138,7 +2198,7 @@ impl<'a, C, NC, A> ConversionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The number of conversions to return per call. + /// The number of conversions to return per call. pub fn row_count(mut self, new_value: i32) -> ConversionPatchCall<'a, C, NC, A> { self._row_count = new_value; self @@ -2148,7 +2208,7 @@ impl<'a, C, NC, A> ConversionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. + /// First date (inclusive) on which to retrieve conversions. Format is yyyymmdd. pub fn start_date(mut self, new_value: i32) -> ConversionPatchCall<'a, C, NC, A> { self._start_date = new_value; self @@ -2158,7 +2218,7 @@ impl<'a, C, NC, A> ConversionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The 0-based starting index for retrieving conversions results. + /// The 0-based starting index for retrieving conversions results. pub fn start_row(mut self, new_value: u32) -> ConversionPatchCall<'a, C, NC, A> { self._start_row = new_value; self @@ -2219,7 +2279,7 @@ impl<'a, C, NC, A> ConversionPatchCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Updates a batch of conversions in DoubleClick Search. /// /// A builder for the *update* method supported by a *conversion* resource. -/// It is not used directly, but through a `ConversionMethods`. +/// It is not used directly, but through a `ConversionMethods` instance. /// /// # Example /// @@ -2282,7 +2342,7 @@ impl<'a, C, NC, A> ConversionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2315,7 +2375,7 @@ impl<'a, C, NC, A> ConversionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2331,7 +2391,6 @@ impl<'a, C, NC, A> ConversionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw dlg.pre_request(); req.send() - }; match req_result { @@ -2341,7 +2400,7 @@ impl<'a, C, NC, A> ConversionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2352,7 +2411,7 @@ impl<'a, C, NC, A> ConversionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2361,13 +2420,13 @@ impl<'a, C, NC, A> ConversionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2439,7 +2498,7 @@ impl<'a, C, NC, A> ConversionUpdateCall<'a, C, NC, A> where NC: hyper::net::Netw /// Retrieve the list of saved columns for a specified advertiser. /// /// A builder for the *list* method supported by a *savedColumn* resource. -/// It is not used directly, but through a `SavedColumnMethods`. +/// It is not used directly, but through a `SavedColumnMethods` instance. /// /// # Example /// @@ -2499,7 +2558,7 @@ impl<'a, C, NC, A> SavedColumnListCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "agencyId", "advertiserId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2552,7 +2611,7 @@ impl<'a, C, NC, A> SavedColumnListCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2564,7 +2623,6 @@ impl<'a, C, NC, A> SavedColumnListCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -2574,7 +2632,7 @@ impl<'a, C, NC, A> SavedColumnListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2585,7 +2643,7 @@ impl<'a, C, NC, A> SavedColumnListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2594,13 +2652,13 @@ impl<'a, C, NC, A> SavedColumnListCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2612,7 +2670,7 @@ impl<'a, C, NC, A> SavedColumnListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// DS ID of the agency. + /// DS ID of the agency. pub fn agency_id(mut self, new_value: &str) -> SavedColumnListCall<'a, C, NC, A> { self._agency_id = new_value.to_string(); self @@ -2622,7 +2680,7 @@ impl<'a, C, NC, A> SavedColumnListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// DS ID of the advertiser. + /// DS ID of the advertiser. pub fn advertiser_id(mut self, new_value: &str) -> SavedColumnListCall<'a, C, NC, A> { self._advertiser_id = new_value.to_string(); self @@ -2686,7 +2744,7 @@ impl<'a, C, NC, A> SavedColumnListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// `.param("alt", "media")`. /// /// A builder for the *getFile* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -2746,7 +2804,7 @@ impl<'a, C, NC, A> ReportGetFileCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["reportId", "reportFragment"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2798,7 +2856,7 @@ impl<'a, C, NC, A> ReportGetFileCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2810,7 +2868,6 @@ impl<'a, C, NC, A> ReportGetFileCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -2820,7 +2877,7 @@ impl<'a, C, NC, A> ReportGetFileCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2831,12 +2888,12 @@ impl<'a, C, NC, A> ReportGetFileCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2848,7 +2905,7 @@ impl<'a, C, NC, A> ReportGetFileCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the report. + /// ID of the report. pub fn report_id(mut self, new_value: &str) -> ReportGetFileCall<'a, C, NC, A> { self._report_id = new_value.to_string(); self @@ -2858,7 +2915,7 @@ impl<'a, C, NC, A> ReportGetFileCall<'a, C, NC, A> where NC: hyper::net::Network /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The index of the report fragment to download. + /// The index of the report fragment to download. pub fn report_fragment(mut self, new_value: i32) -> ReportGetFileCall<'a, C, NC, A> { self._report_fragment = new_value; self @@ -2919,7 +2976,7 @@ impl<'a, C, NC, A> ReportGetFileCall<'a, C, NC, A> where NC: hyper::net::Network /// Generates and returns a report immediately. /// /// A builder for the *generate* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -2982,7 +3039,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3015,7 +3072,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3031,7 +3088,6 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ dlg.pre_request(); req.send() - }; match req_result { @@ -3041,7 +3097,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3052,7 +3108,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3061,13 +3117,13 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3139,7 +3195,7 @@ impl<'a, C, NC, A> ReportGenerateCall<'a, C, NC, A> where NC: hyper::net::Networ /// Polls for the status of a report request. /// /// A builder for the *get* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -3197,7 +3253,7 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn for &field in ["alt", "reportId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3250,7 +3306,7 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3262,7 +3318,6 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn dlg.pre_request(); req.send() - }; match req_result { @@ -3272,7 +3327,7 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3283,7 +3338,7 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3292,13 +3347,13 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3310,7 +3365,7 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// ID of the report request being polled. + /// ID of the report request being polled. pub fn report_id(mut self, new_value: &str) -> ReportGetCall<'a, C, NC, A> { self._report_id = new_value.to_string(); self @@ -3371,7 +3426,7 @@ impl<'a, C, NC, A> ReportGetCall<'a, C, NC, A> where NC: hyper::net::NetworkConn /// Inserts a report request into the reporting system. /// /// A builder for the *request* method supported by a *report* resource. -/// It is not used directly, but through a `ReportMethods`. +/// It is not used directly, but through a `ReportMethods` instance. /// /// # Example /// @@ -3434,7 +3489,7 @@ impl<'a, C, NC, A> ReportRequestCall<'a, C, NC, A> where NC: hyper::net::Network for &field in ["alt"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3467,7 +3522,7 @@ impl<'a, C, NC, A> ReportRequestCall<'a, C, NC, A> where NC: hyper::net::Network } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3483,7 +3538,6 @@ impl<'a, C, NC, A> ReportRequestCall<'a, C, NC, A> where NC: hyper::net::Network dlg.pre_request(); req.send() - }; match req_result { @@ -3493,7 +3547,7 @@ impl<'a, C, NC, A> ReportRequestCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3504,7 +3558,7 @@ impl<'a, C, NC, A> ReportRequestCall<'a, C, NC, A> where NC: hyper::net::Network continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3513,13 +3567,13 @@ impl<'a, C, NC, A> ReportRequestCall<'a, C, NC, A> where NC: hyper::net::Network Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } diff --git a/gen/drive2/Cargo.toml b/gen/drive2/Cargo.toml index f8175ad7c8..0ca49f32ce 100644 --- a/gen/drive2/Cargo.toml +++ b/gen/drive2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-drive2" -version = "0.1.1+20150108" +version = "0.1.2+20150108" authors = ["Sebastian Thiel "] description = "A complete library to interact with drive (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/drive2" diff --git a/gen/drive2/README.md b/gen/drive2/README.md index a88619b777..a4596e00f6 100644 --- a/gen/drive2/README.md +++ b/gen/drive2/README.md @@ -5,7 +5,7 @@ DO NOT EDIT ! --> The `google-drive2` library allows access to all features of the *Google drive* service. -This documentation was generated from *drive* crate version *0.1.1+20150108*, where *20150108* is the exact revision of the *drive:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *drive* crate version *0.1.2+20150108*, where *20150108* is the exact revision of the *drive:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *drive* *v2* API can be found at the [official documentation site](https://developers.google.com/drive/). diff --git a/gen/drive2/src/cmn.rs b/gen/drive2/src/cmn.rs index ca0302086a..2bb3871c0f 100644 --- a/gen/drive2/src/cmn.rs +++ b/gen/drive2/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; diff --git a/gen/drive2/src/lib.rs b/gen/drive2/src/lib.rs index 02b156e93a..0fb102b5a7 100644 --- a/gen/drive2/src/lib.rs +++ b/gen/drive2/src/lib.rs @@ -2,7 +2,7 @@ // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *drive* crate version *0.1.1+20150108*, where *20150108* is the exact revision of the *drive:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *drive* crate version *0.1.2+20150108*, where *20150108* is the exact revision of the *drive:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *drive* *v2* API can be found at the //! [official documentation site](https://developers.google.com/drive/). @@ -411,7 +411,7 @@ impl<'a, C, NC, A> Drive Drive { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -457,7 +457,7 @@ impl<'a, C, NC, A> Drive } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { diff --git a/gen/fitness1/Cargo.toml b/gen/fitness1/Cargo.toml index d0bbc21060..55df907f4d 100644 --- a/gen/fitness1/Cargo.toml +++ b/gen/fitness1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-fitness1" -version = "0.1.1+20150222" +version = "0.1.2+20150222" authors = ["Sebastian Thiel "] description = "A complete library to interact with fitness (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/fitness1" @@ -16,7 +16,7 @@ keywords = ["fitness", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/fitness1/README.md b/gen/fitness1/README.md index f409c0f00b..d89d9f1c30 100644 --- a/gen/fitness1/README.md +++ b/gen/fitness1/README.md @@ -1,11 +1,11 @@ The `google-fitness1` library allows access to all features of the *Google fitness* service. -This documentation was generated from *fitness* crate version *0.1.1+20150222*, where *20150222* is the exact revision of the *fitness:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *fitness* crate version *0.1.2+20150222*, where *20150222* is the exact revision of the *fitness:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *fitness* *v1* API can be found at the [official documentation site](https://developers.google.com/fit/rest/). @@ -25,6 +25,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-fitness1/struct.Fitness.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-fitness1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-fitness1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-fitness1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -34,6 +36,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-fitness1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -72,7 +76,7 @@ extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-fitness1" as fitness1; use fitness1::DataSource; -use fitness1::Result; +use fitness1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use fitness1::Fitness; @@ -101,15 +105,17 @@ let result = hub.users().data_sources_update(&req, "userId", "dataSourceId") .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -122,7 +128,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-fitness1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-fitness1/trait.ResponseResult.html), it will return that by default. @@ -145,8 +151,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-fitness1/trait ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-fitness1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-fitness1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-fitness1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-fitness1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-fitness1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/fitness1/src/cmn.rs b/gen/fitness1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/fitness1/src/cmn.rs +++ b/gen/fitness1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/fitness1/src/lib.rs b/gen/fitness1/src/lib.rs index c598f3231f..8c7c4c980e 100644 --- a/gen/fitness1/src/lib.rs +++ b/gen/fitness1/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *fitness* crate version *0.1.1+20150222*, where *20150222* is the exact revision of the *fitness:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *fitness* crate version *0.1.2+20150222*, where *20150222* is the exact revision of the *fitness:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *fitness* *v1* API can be found at the //! [official documentation site](https://developers.google.com/fit/rest/). @@ -25,6 +25,8 @@ //! //! * **[Hub](struct.Fitness.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -34,6 +36,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -72,7 +76,7 @@ //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-fitness1" as fitness1; //! use fitness1::DataSource; -//! use fitness1::Result; +//! use fitness1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -102,15 +106,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -123,7 +129,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -146,8 +152,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -196,7 +203,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -263,7 +270,7 @@ impl Default for Scope { /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-fitness1" as fitness1; /// use fitness1::DataSource; -/// use fitness1::Result; +/// use fitness1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -293,15 +300,17 @@ impl Default for Scope { /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -322,7 +331,7 @@ impl<'a, C, NC, A> Fitness Fitness { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -332,7 +341,7 @@ impl<'a, C, NC, A> Fitness } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -352,9 +361,9 @@ impl<'a, C, NC, A> Fitness /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DataType { - /// A field represents one dimension of a data type. + /// A field represents one dimension of a data type. pub field: Vec, - /// Each data type has a unique, namespaced, name. All data types in the com.google namespace are shared as part of the platform. + /// Each data type has a unique, namespaced, name. All data types in the com.google namespace are shared as part of the platform. pub name: String, } @@ -369,10 +378,10 @@ impl Part for DataType {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Value { - /// Floating point value. When this is set, intVal must not be set. + /// Floating point value. When this is set, intVal must not be set. #[serde(alias="fpVal")] pub fp_val: f64, - /// Integer value. When this is set, fpVal must not be set. + /// Integer value. When this is set, fpVal must not be set. #[serde(alias="intVal")] pub int_val: i32, } @@ -392,19 +401,19 @@ impl Part for Value {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Dataset { - /// The smallest start time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the first part of the dataset identifier. + /// The smallest start time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the first part of the dataset identifier. #[serde(alias="minStartTimeNs")] pub min_start_time_ns: Option, - /// This token will be set when a dataset is received in response to a GET request and the dataset is too large to be included in a single response. Provide this value in a subsequent GET request to return the next page of data points within this dataset. + /// This token will be set when a dataset is received in response to a GET request and the dataset is too large to be included in a single response. Provide this value in a subsequent GET request to return the next page of data points within this dataset. #[serde(alias="nextPageToken")] pub next_page_token: Option, - /// The largest end time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the first part of the dataset identifier. + /// The largest end time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the first part of the dataset identifier. #[serde(alias="maxEndTimeNs")] pub max_end_time_ns: Option, - /// The data stream ID of the data source that created the points in this dataset. + /// The data stream ID of the data source that created the points in this dataset. #[serde(alias="dataSourceId")] pub data_source_id: Option, - /// A partial list of data points contained in the dataset, ordered by largest endTimeNanos first. This list is considered complete when retrieving a small dataset and partial when patching a dataset or retrieving a dataset that is too large to include in a single response. + /// A partial list of data points contained in the dataset, ordered by largest endTimeNanos first. This list is considered complete when retrieving a small dataset and partial when patching a dataset or retrieving a dataset that is too large to include in a single response. pub point: Option>, } @@ -423,7 +432,7 @@ impl ResponseResult for Dataset {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ListDataSourcesResponse { - /// A previously created data source. + /// A previously created data source. #[serde(alias="dataSource")] pub data_source: Vec, } @@ -437,14 +446,14 @@ impl ResponseResult for ListDataSourcesResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Application { - /// Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName. + /// Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their developer project number reflected into the Data Source data stream IDs, instead of the packageName. #[serde(alias="packageName")] pub package_name: String, - /// Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data. + /// Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data. pub version: String, - /// The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source. + /// The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who would like to identify which REST created an Application or Data Source. pub name: String, - /// An optional URI that can be used to link back to the application. + /// An optional URI that can be used to link back to the application. #[serde(alias="detailsUrl")] pub details_url: String, } @@ -463,25 +472,25 @@ impl Part for Application {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Session { - /// A timestamp that indicates when the session was last modified. + /// A timestamp that indicates when the session was last modified. #[serde(alias="modifiedTimeMillis")] pub modified_time_millis: Option, - /// An end time, in milliseconds since epoch, inclusive. + /// An end time, in milliseconds since epoch, inclusive. #[serde(alias="endTimeMillis")] pub end_time_millis: Option, - /// A description for this session. + /// A description for this session. pub description: Option, - /// The type of activity this session represents. + /// The type of activity this session represents. #[serde(alias="activityType")] pub activity_type: Option, - /// The application that created the session. + /// The application that created the session. pub application: Option, - /// A start time, in milliseconds since epoch, inclusive. + /// A start time, in milliseconds since epoch, inclusive. #[serde(alias="startTimeMillis")] pub start_time_millis: Option, - /// A client-generated identifier that is unique across all sessions owned by this particular user. + /// A client-generated identifier that is unique across all sessions owned by this particular user. pub id: Option, - /// A human readable name of the session. + /// A human readable name of the session. pub name: Option, } @@ -500,13 +509,13 @@ impl ResponseResult for Session {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ListSessionsResponse { - /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. + /// The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// If includeDeleted is set to true in the request, this list will contain sessions deleted with original end times that are within the startTime and endTime frame. + /// If includeDeleted is set to true in the request, this list will contain sessions deleted with original end times that are within the startTime and endTime frame. #[serde(alias="deletedSession")] pub deleted_session: Vec, - /// Sessions with an end time that is between startTime and endTime of the request. + /// Sessions with an end time that is between startTime and endTime of the request. pub session: Vec, } @@ -525,16 +534,16 @@ impl ResponseResult for ListSessionsResponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Device { - /// End-user visible model name for the device. + /// End-user visible model name for the device. pub model: String, - /// Version string for the device hardware/software. + /// Version string for the device hardware/software. pub version: String, - /// A constant representing the type of the device. + /// A constant representing the type of the device. #[serde(alias="type")] pub type_: String, - /// The serial number or other unique ID for the hardware. This field is obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the uid field in clear and normal form. + /// The serial number or other unique ID for the hardware. This field is obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the uid field in clear and normal form. pub uid: String, - /// Manufacturer of the product/hardware. + /// Manufacturer of the product/hardware. pub manufacturer: String, } @@ -549,11 +558,11 @@ impl Part for Device {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DataTypeField { - /// no description provided + /// no description provided pub optional: bool, - /// Defines the name and format of data. Unlike data type names, field names are not namespaced, and only need to be unique within the data type. + /// Defines the name and format of data. Unlike data type names, field names are not namespaced, and only need to be unique within the data type. pub name: String, - /// The different supported formats for each field in a data type. + /// The different supported formats for each field in a data type. pub format: String, } @@ -570,29 +579,29 @@ impl Part for DataTypeField {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DataPoint { - /// Used for version checking during transformation; that is, a datapoint can only replace another datapoint that has an older computation time stamp. + /// Used for version checking during transformation; that is, a datapoint can only replace another datapoint that has an older computation time stamp. #[serde(alias="computationTimeMillis")] pub computation_time_millis: String, - /// Indicates the last time this data point was modified. Useful only in contexts where we are listing the data changes, rather than representing the current state of the data. + /// Indicates the last time this data point was modified. Useful only in contexts where we are listing the data changes, rather than representing the current state of the data. #[serde(alias="modifiedTimeMillis")] pub modified_time_millis: String, - /// The start time of the interval represented by this data point, in nanoseconds since epoch. + /// The start time of the interval represented by this data point, in nanoseconds since epoch. #[serde(alias="startTimeNanos")] pub start_time_nanos: String, - /// The data type defining the format of the values in this data point. + /// The data type defining the format of the values in this data point. #[serde(alias="dataTypeName")] pub data_type_name: String, /// Values of each data type field for the data point. It is expected that each value corresponding to a data type field will occur in the same order that the field is listed with in the data type specified in a data source. /// /// Only one of integer and floating point fields will be populated, depending on the format enum value within data source's type field. pub value: Vec, - /// The end time of the interval represented by this data point, in nanoseconds since epoch. + /// The end time of the interval represented by this data point, in nanoseconds since epoch. #[serde(alias="endTimeNanos")] pub end_time_nanos: String, - /// If the data point is contained in a dataset for a derived data source, this field will be populated with the data source stream ID that created the data point originally. + /// If the data point is contained in a dataset for a derived data source, this field will be populated with the data source stream ID that created the data point originally. #[serde(alias="originDataSourceId")] pub origin_data_source_id: String, - /// The raw timestamp from the original SensorEvent. + /// The raw timestamp from the original SensorEvent. #[serde(alias="rawTimestampNanos")] pub raw_timestamp_nanos: String, } @@ -618,16 +627,16 @@ impl Part for DataPoint {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct DataSource { - /// Information about an application which feeds sensor data into the platform. + /// Information about an application which feeds sensor data into the platform. pub application: Option, - /// Representation of an integrated device (such as a phone or a wearable) that can hold sensors. + /// Representation of an integrated device (such as a phone or a wearable) that can hold sensors. pub device: Option, - /// An end-user visible name for this data source. + /// An end-user visible name for this data source. pub name: Option, - /// The stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors. + /// The stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors. #[serde(alias="dataStreamName")] pub data_stream_name: Option, - /// The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API. + /// The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API. #[serde(alias="dataType")] pub data_type: Option, /// A unique identifier for the data stream produced by this data source. The identifier includes: @@ -647,7 +656,7 @@ pub struct DataSource { /// Finally, the developer project number is obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the developer project number in clear and normal form. #[serde(alias="dataStreamId")] pub data_stream_id: Option, - /// A constant describing the type of this data source. Indicates whether this data source produces raw or derived data. + /// A constant describing the type of this data source. Indicates whether this data source produces raw or derived data. #[serde(alias="type")] pub type_: Option, } @@ -695,13 +704,19 @@ pub struct UserMethods<'a, C, NC, A> hub: &'a Fitness, } -impl<'a, C, NC, A> ResourceMethodsBuilder for UserMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for UserMethods<'a, C, NC, A> {} impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns a dataset containing all data points whose start and end times overlap with the specified range of the dataset minimum start time and maximum end time. Specifically, any data point whose start time is less than or equal to the dataset end time and whose end time is greater than or equal to the dataset start time. + /// Returns a dataset containing all data points whose start and end times overlap with the specified range of the dataset minimum start time and maximum end time. Specifically, any data point whose start time is less than or equal to the dataset end time and whose end time is greater than or equal to the dataset start time. + /// + /// # Arguments + /// + /// * `userId` - Retrieve a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// * `dataSourceId` - The data stream ID of the data source that created the dataset. + /// * `datasetId` - Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. pub fn data_sources_datasets_get(&self, user_id: &str, data_source_id: &str, dataset_id: &str) -> UserDataSourceDatasetGetCall<'a, C, NC, A> { UserDataSourceDatasetGetCall { hub: self.hub, @@ -718,7 +733,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Creates a new data source that is unique across all data sources belonging to this user. The data stream ID field can be omitted and will be generated by the server with the correct format. The data stream ID is an ordered combination of some fields from the data source. In addition to the data source fields reflected into the data source ID, the developer project number that is authenticated when creating the data source is included. This developer project number is obfuscated when read by any other developer reading public data types. + /// Creates a new data source that is unique across all data sources belonging to this user. The data stream ID field can be omitted and will be generated by the server with the correct format. The data stream ID is an ordered combination of some fields from the data source. In addition to the data source fields reflected into the data source ID, the developer project number that is authenticated when creating the data source is included. This developer project number is obfuscated when read by any other developer reading public data types. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userId` - Create the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn data_sources_create(&self, request: &DataSource, user_id: &str) -> UserDataSourceCreateCall<'a, C, NC, A> { UserDataSourceCreateCall { hub: self.hub, @@ -732,7 +752,13 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Performs an inclusive delete of all data points whose start and end times have any overlap with the time range specified by the dataset ID. For most data types, the entire data point will be deleted. For data types where the time span represents a consistent value (such as com.google.activity.segment), and a data point straddles either end point of the dataset, only the overlapping portion of the data point will be deleted. + /// Performs an inclusive delete of all data points whose start and end times have any overlap with the time range specified by the dataset ID. For most data types, the entire data point will be deleted. For data types where the time span represents a consistent value (such as com.google.activity.segment), and a data point straddles either end point of the dataset, only the overlapping portion of the data point will be deleted. + /// + /// # Arguments + /// + /// * `userId` - Delete a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// * `dataSourceId` - The data stream ID of the data source that created the dataset. + /// * `datasetId` - Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. pub fn data_sources_datasets_delete(&self, user_id: &str, data_source_id: &str, dataset_id: &str) -> UserDataSourceDatasetDeleteCall<'a, C, NC, A> { UserDataSourceDatasetDeleteCall { hub: self.hub, @@ -749,7 +775,14 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Adds data points to a dataset. The dataset need not be previously created. All points within the given dataset will be returned with subsquent calls to retrieve this dataset. Data points can belong to more than one dataset. This method does not use patch semantics. + /// Adds data points to a dataset. The dataset need not be previously created. All points within the given dataset will be returned with subsquent calls to retrieve this dataset. Data points can belong to more than one dataset. This method does not use patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userId` - Patch a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// * `dataSourceId` - The data stream ID of the data source that created the dataset. + /// * `datasetId` - Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. pub fn data_sources_datasets_patch(&self, request: &Dataset, user_id: &str, data_source_id: &str, dataset_id: &str) -> UserDataSourceDatasetPatchCall<'a, C, NC, A> { UserDataSourceDatasetPatchCall { hub: self.hub, @@ -766,7 +799,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Deletes a session specified by the given session ID. + /// Deletes a session specified by the given session ID. + /// + /// # Arguments + /// + /// * `userId` - Delete a session for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// * `sessionId` - The ID of the session to be deleted. pub fn sessions_delete(&self, user_id: &str, session_id: &str) -> UserSessionDeleteCall<'a, C, NC, A> { UserSessionDeleteCall { hub: self.hub, @@ -781,7 +819,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Returns a data source identified by a data stream ID. + /// Returns a data source identified by a data stream ID. + /// + /// # Arguments + /// + /// * `userId` - Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// * `dataSourceId` - The data stream ID of the data source to retrieve. pub fn data_sources_get(&self, user_id: &str, data_source_id: &str) -> UserDataSourceGetCall<'a, C, NC, A> { UserDataSourceGetCall { hub: self.hub, @@ -798,6 +841,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Updates a given data source. It is an error to modify the data source's data stream ID, data type, type, stream name or device information apart from the device version. Changing these fields would require a new unique data stream ID and separate data source. /// /// Data sources are identified by their data stream ID. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userId` - Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// * `dataSourceId` - The data stream ID of the data source to update. pub fn data_sources_update(&self, request: &DataSource, user_id: &str, data_source_id: &str) -> UserDataSourceUpdateCall<'a, C, NC, A> { UserDataSourceUpdateCall { hub: self.hub, @@ -812,7 +861,11 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists sessions previously created. + /// Lists sessions previously created. + /// + /// # Arguments + /// + /// * `userId` - List sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn sessions_list(&self, user_id: &str) -> UserSessionListCall<'a, C, NC, A> { UserSessionListCall { hub: self.hub, @@ -829,7 +882,13 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Updates or insert a given session. + /// Updates or insert a given session. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userId` - Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// * `sessionId` - The ID of the session to be created. pub fn sessions_update(&self, request: &Session, user_id: &str, session_id: &str) -> UserSessionUpdateCall<'a, C, NC, A> { UserSessionUpdateCall { hub: self.hub, @@ -848,6 +907,12 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Updates a given data source. It is an error to modify the data source's data stream ID, data type, type, stream name or device information apart from the device version. Changing these fields would require a new unique data stream ID and separate data source. /// /// Data sources are identified by their data stream ID. This method supports patch semantics. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `userId` - Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// * `dataSourceId` - The data stream ID of the data source to update. pub fn data_sources_patch(&self, request: &DataSource, user_id: &str, data_source_id: &str) -> UserDataSourcePatchCall<'a, C, NC, A> { UserDataSourcePatchCall { hub: self.hub, @@ -862,7 +927,11 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Lists all data sources that are visible to the developer, using the OAuth scopes provided. The list is not exhaustive: the user may have private data sources that are only visible to other developers or calls using other scopes. + /// Lists all data sources that are visible to the developer, using the OAuth scopes provided. The list is not exhaustive: the user may have private data sources that are only visible to other developers or calls using other scopes. + /// + /// # Arguments + /// + /// * `userId` - List data sources for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn data_sources_list(&self, user_id: &str) -> UserDataSourceListCall<'a, C, NC, A> { UserDataSourceListCall { hub: self.hub, @@ -886,7 +955,7 @@ impl<'a, C, NC, A> UserMethods<'a, C, NC, A> { /// Returns a dataset containing all data points whose start and end times overlap with the specified range of the dataset minimum start time and maximum end time. Specifically, any data point whose start time is less than or equal to the dataset end time and whose end time is greater than or equal to the dataset start time. /// /// A builder for the *dataSources.datasets.get* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -958,7 +1027,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetGetCall<'a, C, NC, A> where NC: hyper::n for &field in ["alt", "userId", "dataSourceId", "datasetId", "pageToken", "limit"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1011,7 +1080,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetGetCall<'a, C, NC, A> where NC: hyper::n } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1023,7 +1092,6 @@ impl<'a, C, NC, A> UserDataSourceDatasetGetCall<'a, C, NC, A> where NC: hyper::n dlg.pre_request(); req.send() - }; match req_result { @@ -1033,7 +1101,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetGetCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1044,7 +1112,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetGetCall<'a, C, NC, A> where NC: hyper::n continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1053,13 +1121,13 @@ impl<'a, C, NC, A> UserDataSourceDatasetGetCall<'a, C, NC, A> where NC: hyper::n Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1071,7 +1139,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetGetCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Retrieve a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// Retrieve a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserDataSourceDatasetGetCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -1081,7 +1149,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetGetCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The data stream ID of the data source that created the dataset. + /// The data stream ID of the data source that created the dataset. pub fn data_source_id(mut self, new_value: &str) -> UserDataSourceDatasetGetCall<'a, C, NC, A> { self._data_source_id = new_value.to_string(); self @@ -1091,7 +1159,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetGetCall<'a, C, NC, A> where NC: hyper::n /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. + /// Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. pub fn dataset_id(mut self, new_value: &str) -> UserDataSourceDatasetGetCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -1099,7 +1167,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetGetCall<'a, C, NC, A> where NC: hyper::n /// Sets the *page token* query property to the given value. /// /// - /// The continuation token, which is used to page through large datasets. To get the next page of a dataset, set this parameter to the value of nextPageToken from the previous response. Each subsequent call will yield a partial dataset with data point end timestamps that are strictly smaller than those in the previous partial response. + /// The continuation token, which is used to page through large datasets. To get the next page of a dataset, set this parameter to the value of nextPageToken from the previous response. Each subsequent call will yield a partial dataset with data point end timestamps that are strictly smaller than those in the previous partial response. pub fn page_token(mut self, new_value: &str) -> UserDataSourceDatasetGetCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -1107,7 +1175,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetGetCall<'a, C, NC, A> where NC: hyper::n /// Sets the *limit* query property to the given value. /// /// - /// If specified, no more than this many data points will be included in the dataset. If the there are more data points in the dataset, nextPageToken will be set in the dataset response. + /// If specified, no more than this many data points will be included in the dataset. If the there are more data points in the dataset, nextPageToken will be set in the dataset response. pub fn limit(mut self, new_value: i32) -> UserDataSourceDatasetGetCall<'a, C, NC, A> { self._limit = Some(new_value); self @@ -1168,7 +1236,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetGetCall<'a, C, NC, A> where NC: hyper::n /// Creates a new data source that is unique across all data sources belonging to this user. The data stream ID field can be omitted and will be generated by the server with the correct format. The data stream ID is an ordered combination of some fields from the data source. In addition to the data source fields reflected into the data source ID, the developer project number that is authenticated when creating the data source is included. This developer project number is obfuscated when read by any other developer reading public data types. /// /// A builder for the *dataSources.create* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -1233,7 +1301,7 @@ impl<'a, C, NC, A> UserDataSourceCreateCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "userId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1290,7 +1358,7 @@ impl<'a, C, NC, A> UserDataSourceCreateCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1306,7 +1374,6 @@ impl<'a, C, NC, A> UserDataSourceCreateCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -1316,7 +1383,7 @@ impl<'a, C, NC, A> UserDataSourceCreateCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1327,7 +1394,7 @@ impl<'a, C, NC, A> UserDataSourceCreateCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1336,13 +1403,13 @@ impl<'a, C, NC, A> UserDataSourceCreateCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1363,7 +1430,7 @@ impl<'a, C, NC, A> UserDataSourceCreateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Create the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// Create the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserDataSourceCreateCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -1424,7 +1491,7 @@ impl<'a, C, NC, A> UserDataSourceCreateCall<'a, C, NC, A> where NC: hyper::net:: /// Performs an inclusive delete of all data points whose start and end times have any overlap with the time range specified by the dataset ID. For most data types, the entire data point will be deleted. For data types where the time span represents a consistent value (such as com.google.activity.segment), and a data point straddles either end point of the dataset, only the overlapping portion of the data point will be deleted. /// /// A builder for the *dataSources.datasets.delete* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -1496,7 +1563,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetDeleteCall<'a, C, NC, A> where NC: hyper for &field in ["userId", "dataSourceId", "datasetId", "modifiedTimeMillis", "currentTimeMillis"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1548,7 +1615,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetDeleteCall<'a, C, NC, A> where NC: hyper } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1560,7 +1627,6 @@ impl<'a, C, NC, A> UserDataSourceDatasetDeleteCall<'a, C, NC, A> where NC: hyper dlg.pre_request(); req.send() - }; match req_result { @@ -1570,7 +1636,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetDeleteCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1581,12 +1647,12 @@ impl<'a, C, NC, A> UserDataSourceDatasetDeleteCall<'a, C, NC, A> where NC: hyper continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1598,7 +1664,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetDeleteCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Delete a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// Delete a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserDataSourceDatasetDeleteCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -1608,7 +1674,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetDeleteCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The data stream ID of the data source that created the dataset. + /// The data stream ID of the data source that created the dataset. pub fn data_source_id(mut self, new_value: &str) -> UserDataSourceDatasetDeleteCall<'a, C, NC, A> { self._data_source_id = new_value.to_string(); self @@ -1618,7 +1684,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetDeleteCall<'a, C, NC, A> where NC: hyper /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. + /// Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. pub fn dataset_id(mut self, new_value: &str) -> UserDataSourceDatasetDeleteCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -1626,7 +1692,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetDeleteCall<'a, C, NC, A> where NC: hyper /// Sets the *modified time millis* query property to the given value. /// /// - /// When the operation was performed on the client. + /// When the operation was performed on the client. pub fn modified_time_millis(mut self, new_value: &str) -> UserDataSourceDatasetDeleteCall<'a, C, NC, A> { self._modified_time_millis = Some(new_value.to_string()); self @@ -1634,7 +1700,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetDeleteCall<'a, C, NC, A> where NC: hyper /// Sets the *current time millis* query property to the given value. /// /// - /// The client's current time in milliseconds since epoch. + /// The client's current time in milliseconds since epoch. pub fn current_time_millis(mut self, new_value: &str) -> UserDataSourceDatasetDeleteCall<'a, C, NC, A> { self._current_time_millis = Some(new_value.to_string()); self @@ -1695,7 +1761,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetDeleteCall<'a, C, NC, A> where NC: hyper /// Adds data points to a dataset. The dataset need not be previously created. All points within the given dataset will be returned with subsquent calls to retrieve this dataset. Data points can belong to more than one dataset. This method does not use patch semantics. /// /// A builder for the *dataSources.datasets.patch* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -1769,7 +1835,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetPatchCall<'a, C, NC, A> where NC: hyper: for &field in ["alt", "userId", "dataSourceId", "datasetId", "currentTimeMillis"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -1826,7 +1892,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetPatchCall<'a, C, NC, A> where NC: hyper: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -1842,7 +1908,6 @@ impl<'a, C, NC, A> UserDataSourceDatasetPatchCall<'a, C, NC, A> where NC: hyper: dlg.pre_request(); req.send() - }; match req_result { @@ -1852,7 +1917,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetPatchCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1863,7 +1928,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetPatchCall<'a, C, NC, A> where NC: hyper: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -1872,13 +1937,13 @@ impl<'a, C, NC, A> UserDataSourceDatasetPatchCall<'a, C, NC, A> where NC: hyper: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1899,7 +1964,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetPatchCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Patch a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// Patch a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserDataSourceDatasetPatchCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -1909,7 +1974,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetPatchCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The data stream ID of the data source that created the dataset. + /// The data stream ID of the data source that created the dataset. pub fn data_source_id(mut self, new_value: &str) -> UserDataSourceDatasetPatchCall<'a, C, NC, A> { self._data_source_id = new_value.to_string(); self @@ -1919,7 +1984,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetPatchCall<'a, C, NC, A> where NC: hyper: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. + /// Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. pub fn dataset_id(mut self, new_value: &str) -> UserDataSourceDatasetPatchCall<'a, C, NC, A> { self._dataset_id = new_value.to_string(); self @@ -1927,7 +1992,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetPatchCall<'a, C, NC, A> where NC: hyper: /// Sets the *current time millis* query property to the given value. /// /// - /// The client's current time in milliseconds since epoch. Note that the minStartTimeNs and maxEndTimeNs properties in the request body are in nanoseconds instead of milliseconds. + /// The client's current time in milliseconds since epoch. Note that the minStartTimeNs and maxEndTimeNs properties in the request body are in nanoseconds instead of milliseconds. pub fn current_time_millis(mut self, new_value: &str) -> UserDataSourceDatasetPatchCall<'a, C, NC, A> { self._current_time_millis = Some(new_value.to_string()); self @@ -1988,7 +2053,7 @@ impl<'a, C, NC, A> UserDataSourceDatasetPatchCall<'a, C, NC, A> where NC: hyper: /// Deletes a session specified by the given session ID. /// /// A builder for the *sessions.delete* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -2053,7 +2118,7 @@ impl<'a, C, NC, A> UserSessionDeleteCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["userId", "sessionId", "currentTimeMillis"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2105,7 +2170,7 @@ impl<'a, C, NC, A> UserSessionDeleteCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2117,7 +2182,6 @@ impl<'a, C, NC, A> UserSessionDeleteCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -2127,7 +2191,7 @@ impl<'a, C, NC, A> UserSessionDeleteCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2138,12 +2202,12 @@ impl<'a, C, NC, A> UserSessionDeleteCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2155,7 +2219,7 @@ impl<'a, C, NC, A> UserSessionDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Delete a session for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// Delete a session for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserSessionDeleteCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -2165,7 +2229,7 @@ impl<'a, C, NC, A> UserSessionDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the session to be deleted. + /// The ID of the session to be deleted. pub fn session_id(mut self, new_value: &str) -> UserSessionDeleteCall<'a, C, NC, A> { self._session_id = new_value.to_string(); self @@ -2173,7 +2237,7 @@ impl<'a, C, NC, A> UserSessionDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *current time millis* query property to the given value. /// /// - /// The client's current time in milliseconds since epoch. + /// The client's current time in milliseconds since epoch. pub fn current_time_millis(mut self, new_value: &str) -> UserSessionDeleteCall<'a, C, NC, A> { self._current_time_millis = Some(new_value.to_string()); self @@ -2234,7 +2298,7 @@ impl<'a, C, NC, A> UserSessionDeleteCall<'a, C, NC, A> where NC: hyper::net::Net /// Returns a data source identified by a data stream ID. /// /// A builder for the *dataSources.get* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -2294,7 +2358,7 @@ impl<'a, C, NC, A> UserDataSourceGetCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "userId", "dataSourceId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2347,7 +2411,7 @@ impl<'a, C, NC, A> UserDataSourceGetCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2359,7 +2423,6 @@ impl<'a, C, NC, A> UserDataSourceGetCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -2369,7 +2432,7 @@ impl<'a, C, NC, A> UserDataSourceGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2380,7 +2443,7 @@ impl<'a, C, NC, A> UserDataSourceGetCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2389,13 +2452,13 @@ impl<'a, C, NC, A> UserDataSourceGetCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2407,7 +2470,7 @@ impl<'a, C, NC, A> UserDataSourceGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserDataSourceGetCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -2417,7 +2480,7 @@ impl<'a, C, NC, A> UserDataSourceGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The data stream ID of the data source to retrieve. + /// The data stream ID of the data source to retrieve. pub fn data_source_id(mut self, new_value: &str) -> UserDataSourceGetCall<'a, C, NC, A> { self._data_source_id = new_value.to_string(); self @@ -2480,7 +2543,7 @@ impl<'a, C, NC, A> UserDataSourceGetCall<'a, C, NC, A> where NC: hyper::net::Net /// Data sources are identified by their data stream ID. /// /// A builder for the *dataSources.update* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -2547,7 +2610,7 @@ impl<'a, C, NC, A> UserDataSourceUpdateCall<'a, C, NC, A> where NC: hyper::net:: for &field in ["alt", "userId", "dataSourceId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2604,7 +2667,7 @@ impl<'a, C, NC, A> UserDataSourceUpdateCall<'a, C, NC, A> where NC: hyper::net:: } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2620,7 +2683,6 @@ impl<'a, C, NC, A> UserDataSourceUpdateCall<'a, C, NC, A> where NC: hyper::net:: dlg.pre_request(); req.send() - }; match req_result { @@ -2630,7 +2692,7 @@ impl<'a, C, NC, A> UserDataSourceUpdateCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2641,7 +2703,7 @@ impl<'a, C, NC, A> UserDataSourceUpdateCall<'a, C, NC, A> where NC: hyper::net:: continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2650,13 +2712,13 @@ impl<'a, C, NC, A> UserDataSourceUpdateCall<'a, C, NC, A> where NC: hyper::net:: Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2677,7 +2739,7 @@ impl<'a, C, NC, A> UserDataSourceUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserDataSourceUpdateCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -2687,7 +2749,7 @@ impl<'a, C, NC, A> UserDataSourceUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The data stream ID of the data source to update. + /// The data stream ID of the data source to update. pub fn data_source_id(mut self, new_value: &str) -> UserDataSourceUpdateCall<'a, C, NC, A> { self._data_source_id = new_value.to_string(); self @@ -2748,7 +2810,7 @@ impl<'a, C, NC, A> UserDataSourceUpdateCall<'a, C, NC, A> where NC: hyper::net:: /// Lists sessions previously created. /// /// A builder for the *sessions.list* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -2826,7 +2888,7 @@ impl<'a, C, NC, A> UserSessionListCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "userId", "startTime", "pageToken", "includeDeleted", "endTime"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -2879,7 +2941,7 @@ impl<'a, C, NC, A> UserSessionListCall<'a, C, NC, A> where NC: hyper::net::Netwo } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -2891,7 +2953,6 @@ impl<'a, C, NC, A> UserSessionListCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -2901,7 +2962,7 @@ impl<'a, C, NC, A> UserSessionListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -2912,7 +2973,7 @@ impl<'a, C, NC, A> UserSessionListCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -2921,13 +2982,13 @@ impl<'a, C, NC, A> UserSessionListCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -2939,7 +3000,7 @@ impl<'a, C, NC, A> UserSessionListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// List sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// List sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserSessionListCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -2947,7 +3008,7 @@ impl<'a, C, NC, A> UserSessionListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *start time* query property to the given value. /// /// - /// An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response. + /// An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response. pub fn start_time(mut self, new_value: &str) -> UserSessionListCall<'a, C, NC, A> { self._start_time = Some(new_value.to_string()); self @@ -2955,7 +3016,7 @@ impl<'a, C, NC, A> UserSessionListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *page token* query property to the given value. /// /// - /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of nextPageToken from the previous response. + /// The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of nextPageToken from the previous response. pub fn page_token(mut self, new_value: &str) -> UserSessionListCall<'a, C, NC, A> { self._page_token = Some(new_value.to_string()); self @@ -2963,7 +3024,7 @@ impl<'a, C, NC, A> UserSessionListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *include deleted* query property to the given value. /// /// - /// If true, deleted sessions will be returned. When set to true, sessions returned in this response will only have an ID and will not have any other fields. + /// If true, deleted sessions will be returned. When set to true, sessions returned in this response will only have an ID and will not have any other fields. pub fn include_deleted(mut self, new_value: bool) -> UserSessionListCall<'a, C, NC, A> { self._include_deleted = Some(new_value); self @@ -2971,7 +3032,7 @@ impl<'a, C, NC, A> UserSessionListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *end time* query property to the given value. /// /// - /// An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response. + /// An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response. pub fn end_time(mut self, new_value: &str) -> UserSessionListCall<'a, C, NC, A> { self._end_time = Some(new_value.to_string()); self @@ -3032,7 +3093,7 @@ impl<'a, C, NC, A> UserSessionListCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Updates or insert a given session. /// /// A builder for the *sessions.update* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -3104,7 +3165,7 @@ impl<'a, C, NC, A> UserSessionUpdateCall<'a, C, NC, A> where NC: hyper::net::Net for &field in ["alt", "userId", "sessionId", "currentTimeMillis"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3161,7 +3222,7 @@ impl<'a, C, NC, A> UserSessionUpdateCall<'a, C, NC, A> where NC: hyper::net::Net } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3177,7 +3238,6 @@ impl<'a, C, NC, A> UserSessionUpdateCall<'a, C, NC, A> where NC: hyper::net::Net dlg.pre_request(); req.send() - }; match req_result { @@ -3187,7 +3247,7 @@ impl<'a, C, NC, A> UserSessionUpdateCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3198,7 +3258,7 @@ impl<'a, C, NC, A> UserSessionUpdateCall<'a, C, NC, A> where NC: hyper::net::Net continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3207,13 +3267,13 @@ impl<'a, C, NC, A> UserSessionUpdateCall<'a, C, NC, A> where NC: hyper::net::Net Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3234,7 +3294,7 @@ impl<'a, C, NC, A> UserSessionUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserSessionUpdateCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -3244,7 +3304,7 @@ impl<'a, C, NC, A> UserSessionUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The ID of the session to be created. + /// The ID of the session to be created. pub fn session_id(mut self, new_value: &str) -> UserSessionUpdateCall<'a, C, NC, A> { self._session_id = new_value.to_string(); self @@ -3252,7 +3312,7 @@ impl<'a, C, NC, A> UserSessionUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Sets the *current time millis* query property to the given value. /// /// - /// The client's current time in milliseconds since epoch. + /// The client's current time in milliseconds since epoch. pub fn current_time_millis(mut self, new_value: &str) -> UserSessionUpdateCall<'a, C, NC, A> { self._current_time_millis = Some(new_value.to_string()); self @@ -3315,7 +3375,7 @@ impl<'a, C, NC, A> UserSessionUpdateCall<'a, C, NC, A> where NC: hyper::net::Net /// Data sources are identified by their data stream ID. This method supports patch semantics. /// /// A builder for the *dataSources.patch* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -3382,7 +3442,7 @@ impl<'a, C, NC, A> UserDataSourcePatchCall<'a, C, NC, A> where NC: hyper::net::N for &field in ["alt", "userId", "dataSourceId"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3439,7 +3499,7 @@ impl<'a, C, NC, A> UserDataSourcePatchCall<'a, C, NC, A> where NC: hyper::net::N } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3455,7 +3515,6 @@ impl<'a, C, NC, A> UserDataSourcePatchCall<'a, C, NC, A> where NC: hyper::net::N dlg.pre_request(); req.send() - }; match req_result { @@ -3465,7 +3524,7 @@ impl<'a, C, NC, A> UserDataSourcePatchCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3476,7 +3535,7 @@ impl<'a, C, NC, A> UserDataSourcePatchCall<'a, C, NC, A> where NC: hyper::net::N continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3485,13 +3544,13 @@ impl<'a, C, NC, A> UserDataSourcePatchCall<'a, C, NC, A> where NC: hyper::net::N Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3512,7 +3571,7 @@ impl<'a, C, NC, A> UserDataSourcePatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserDataSourcePatchCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -3522,7 +3581,7 @@ impl<'a, C, NC, A> UserDataSourcePatchCall<'a, C, NC, A> where NC: hyper::net::N /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// The data stream ID of the data source to update. + /// The data stream ID of the data source to update. pub fn data_source_id(mut self, new_value: &str) -> UserDataSourcePatchCall<'a, C, NC, A> { self._data_source_id = new_value.to_string(); self @@ -3583,7 +3642,7 @@ impl<'a, C, NC, A> UserDataSourcePatchCall<'a, C, NC, A> where NC: hyper::net::N /// Lists all data sources that are visible to the developer, using the OAuth scopes provided. The list is not exhaustive: the user may have private data sources that are only visible to other developers or calls using other scopes. /// /// A builder for the *dataSources.list* method supported by a *user* resource. -/// It is not used directly, but through a `UserMethods`. +/// It is not used directly, but through a `UserMethods` instance. /// /// # Example /// @@ -3650,7 +3709,7 @@ impl<'a, C, NC, A> UserDataSourceListCall<'a, C, NC, A> where NC: hyper::net::Ne for &field in ["alt", "userId", "dataTypeName"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -3703,7 +3762,7 @@ impl<'a, C, NC, A> UserDataSourceListCall<'a, C, NC, A> where NC: hyper::net::Ne } if token.is_none() { dlg.finished(false); - return Result::MissingToken + return Err(Error::MissingToken) } let auth_header = Authorization(oauth2::Scheme { token_type: oauth2::TokenType::Bearer, access_token: token.unwrap().access_token }); @@ -3715,7 +3774,6 @@ impl<'a, C, NC, A> UserDataSourceListCall<'a, C, NC, A> where NC: hyper::net::Ne dlg.pre_request(); req.send() - }; match req_result { @@ -3725,7 +3783,7 @@ impl<'a, C, NC, A> UserDataSourceListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -3736,7 +3794,7 @@ impl<'a, C, NC, A> UserDataSourceListCall<'a, C, NC, A> where NC: hyper::net::Ne continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -3745,13 +3803,13 @@ impl<'a, C, NC, A> UserDataSourceListCall<'a, C, NC, A> where NC: hyper::net::Ne Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -3763,7 +3821,7 @@ impl<'a, C, NC, A> UserDataSourceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Even though the property as already been set when instantiating this call, /// we provide this method for API completeness. /// - /// List data sources for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. + /// List data sources for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. pub fn user_id(mut self, new_value: &str) -> UserDataSourceListCall<'a, C, NC, A> { self._user_id = new_value.to_string(); self @@ -3772,7 +3830,7 @@ impl<'a, C, NC, A> UserDataSourceListCall<'a, C, NC, A> where NC: hyper::net::Ne /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// The names of data types to include in the list. If not specified, all data sources will be returned. + /// The names of data types to include in the list. If not specified, all data sources will be returned. pub fn add_data_type_name(mut self, new_value: &str) -> UserDataSourceListCall<'a, C, NC, A> { self._data_type_name.push(new_value.to_string()); self diff --git a/gen/freebase1/Cargo.toml b/gen/freebase1/Cargo.toml index fb84ae23be..5c31942122 100644 --- a/gen/freebase1/Cargo.toml +++ b/gen/freebase1/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-freebase1" -version = "0.1.1+20150313" +version = "0.1.2+20150313" authors = ["Sebastian Thiel "] description = "A complete library to interact with freebase (protocol v1)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/freebase1" @@ -16,7 +16,7 @@ keywords = ["freebase", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/freebase1/README.md b/gen/freebase1/README.md index 51ecb19c00..2fb7208e72 100644 --- a/gen/freebase1/README.md +++ b/gen/freebase1/README.md @@ -1,11 +1,11 @@ The `google-freebase1` library allows access to all features of the *Google freebase* service. -This documentation was generated from *freebase* crate version *0.1.1+20150313*, where *20150313* is the exact revision of the *freebase:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *freebase* crate version *0.1.2+20150313*, where *20150313* is the exact revision of the *freebase:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *freebase* *v1* API can be found at the [official documentation site](https://developers.google.com/freebase/). @@ -29,6 +29,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-freebase1/struct.Freebase.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-freebase1/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-freebase1/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-freebase1/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -38,6 +40,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-freebase1/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -72,7 +76,7 @@ google-freebase1 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-freebase1" as freebase1; -use freebase1::Result; +use freebase1::{Result, Error}; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use freebase1::Freebase; @@ -102,15 +106,17 @@ let result = hub.methods().reconcile() .doit(); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -123,7 +129,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-freebase1/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-freebase1/trait.ResponseResult.html), it will return that by default. @@ -146,8 +152,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-freebase1/trai ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-freebase1/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-freebase1/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-freebase1/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-freebase1/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-freebase1/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/freebase1/src/cmn.rs b/gen/freebase1/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/freebase1/src/cmn.rs +++ b/gen/freebase1/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/freebase1/src/lib.rs b/gen/freebase1/src/lib.rs index b771559353..d6e317c29f 100644 --- a/gen/freebase1/src/lib.rs +++ b/gen/freebase1/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *freebase* crate version *0.1.1+20150313*, where *20150313* is the exact revision of the *freebase:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *freebase* crate version *0.1.2+20150313*, where *20150313* is the exact revision of the *freebase:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *freebase* *v1* API can be found at the //! [official documentation site](https://developers.google.com/freebase/). @@ -29,6 +29,8 @@ //! //! * **[Hub](struct.Freebase.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -38,6 +40,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -72,7 +76,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-freebase1" as freebase1; -//! use freebase1::Result; +//! use freebase1::{Result, Error}; //! # #[test] fn egal() { //! use std::default::Default; //! use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -103,15 +107,17 @@ //! .doit(); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -124,7 +130,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -147,8 +153,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -197,7 +204,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -221,7 +228,7 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, Re /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-freebase1" as freebase1; -/// use freebase1::Result; +/// use freebase1::{Result, Error}; /// # #[test] fn egal() { /// use std::default::Default; /// use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -252,15 +259,17 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, Re /// .doit(); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -281,7 +290,7 @@ impl<'a, C, NC, A> Freebase Freebase { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -291,7 +300,7 @@ impl<'a, C, NC, A> Freebase } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -311,15 +320,15 @@ impl<'a, C, NC, A> Freebase /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReconcileCandidate { - /// Language code that candidate and notable names are displayed in. + /// Language code that candidate and notable names are displayed in. pub lang: String, - /// Percentage likelihood that this candidate is the unique matching entity. Value will be between 0.0 and 1.0 + /// Percentage likelihood that this candidate is the unique matching entity. Value will be between 0.0 and 1.0 pub confidence: f32, - /// Type or profession the candidate is notable for. + /// Type or profession the candidate is notable for. pub notable: ReconcileCandidateNotable, - /// Freebase MID of candidate entity. + /// Freebase MID of candidate entity. pub mid: String, - /// Freebase name of matching entity in specified language. + /// Freebase name of matching entity in specified language. pub name: String, } @@ -332,11 +341,11 @@ impl Part for ReconcileCandidate {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReconcileGetWarning { - /// Code for identifying classes of warnings. + /// Code for identifying classes of warnings. pub reason: String, - /// Warning message to display to the user. + /// Warning message to display to the user. pub message: String, - /// Location of warning in the request e.g. invalid predicate. + /// Location of warning in the request e.g. invalid predicate. pub location: String, } @@ -350,9 +359,9 @@ impl Part for ReconcileGetWarning {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReconcileGetCosts { - /// Total number of hits found. + /// Total number of hits found. pub hits: i32, - /// Total milliseconds spent. + /// Total milliseconds spent. pub ms: i32, } @@ -371,13 +380,13 @@ impl Part for ReconcileGetCosts {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReconcileGet { - /// Server costs for reconciling. + /// Server costs for reconciling. pub costs: ReconcileGetCosts, - /// If filled, then there were recoverable problems that affected the request. For example, some of the properties were ignored because they either are not valid Freebase predicates or are not indexed for reconciliation. The candidates returned should be considered valid results, with the caveat that sections of the request were ignored as specified by the warning text. + /// If filled, then there were recoverable problems that affected the request. For example, some of the properties were ignored because they either are not valid Freebase predicates or are not indexed for reconciliation. The candidates returned should be considered valid results, with the caveat that sections of the request were ignored as specified by the warning text. pub warning: Vec, - /// If filled, then the listed candidates are potential matches, and such should be evaluated by a more discerning algorithm or human. The matches are ordered by confidence. + /// If filled, then the listed candidates are potential matches, and such should be evaluated by a more discerning algorithm or human. The matches are ordered by confidence. pub candidate: Vec, - /// If filled, this entity is guaranteed to match at requested confidence probability (default 99%). + /// If filled, this entity is guaranteed to match at requested confidence probability (default 99%). #[serde(alias="match")] pub match_: ReconcileCandidate, } @@ -391,9 +400,9 @@ impl ResponseResult for ReconcileGet {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ReconcileCandidateNotable { - /// MID of notable category. + /// MID of notable category. pub id: String, - /// Name of notable category in specified language. + /// Name of notable category in specified language. pub name: String, } @@ -440,13 +449,13 @@ pub struct MethodMethods<'a, C, NC, A> hub: &'a Freebase, } -impl<'a, C, NC, A> ResourceMethodsBuilder for MethodMethods<'a, C, NC, A> {} +impl<'a, C, NC, A> MethodsBuilder for MethodMethods<'a, C, NC, A> {} impl<'a, C, NC, A> MethodMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Reconcile entities to Freebase open data. + /// Reconcile entities to Freebase open data. pub fn reconcile(&self) -> MethodReconcileCall<'a, C, NC, A> { MethodReconcileCall { hub: self.hub, @@ -463,7 +472,7 @@ impl<'a, C, NC, A> MethodMethods<'a, C, NC, A> { /// Create a builder to help you perform the following task: /// - /// Search Freebase open data. + /// Search Freebase open data. pub fn search(&self) -> MethodSearchCall<'a, C, NC, A> { MethodSearchCall { hub: self.hub, @@ -507,7 +516,7 @@ impl<'a, C, NC, A> MethodMethods<'a, C, NC, A> { /// Reconcile entities to Freebase open data. /// /// A builder for the *reconcile* method. -/// It is not used directly, but through a `MethodMethods`. +/// It is not used directly, but through a `MethodMethods` instance. /// /// # Example /// @@ -604,7 +613,7 @@ impl<'a, C, NC, A> MethodReconcileCall<'a, C, NC, A> where NC: hyper::net::Netwo for &field in ["alt", "prop", "name", "limit", "lang", "kind", "confidence"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -623,7 +632,7 @@ impl<'a, C, NC, A> MethodReconcileCall<'a, C, NC, A> where NC: hyper::net::Netwo Some(value) => params.push(("key", value)), None => { dlg.finished(false); - return Result::MissingAPIKey + return Err(Error::MissingAPIKey) } } @@ -643,7 +652,6 @@ impl<'a, C, NC, A> MethodReconcileCall<'a, C, NC, A> where NC: hyper::net::Netwo dlg.pre_request(); req.send() - }; match req_result { @@ -653,7 +661,7 @@ impl<'a, C, NC, A> MethodReconcileCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -664,7 +672,7 @@ impl<'a, C, NC, A> MethodReconcileCall<'a, C, NC, A> where NC: hyper::net::Netwo continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = { let mut json_response = String::new(); @@ -673,13 +681,13 @@ impl<'a, C, NC, A> MethodReconcileCall<'a, C, NC, A> where NC: hyper::net::Netwo Ok(decoded) => (res, decoded), Err(err) => { dlg.response_json_decode_error(&json_response, &err); - return Result::JsonDecodeError(err); + return Err(Error::JsonDecodeError(err)); } } }; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -699,7 +707,7 @@ impl<'a, C, NC, A> MethodReconcileCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *name* query property to the given value. /// /// - /// Name of entity. + /// Name of entity. pub fn name(mut self, new_value: &str) -> MethodReconcileCall<'a, C, NC, A> { self._name = Some(new_value.to_string()); self @@ -707,7 +715,7 @@ impl<'a, C, NC, A> MethodReconcileCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *limit* query property to the given value. /// /// - /// Maximum number of candidates to return. + /// Maximum number of candidates to return. pub fn limit(mut self, new_value: i32) -> MethodReconcileCall<'a, C, NC, A> { self._limit = Some(new_value); self @@ -716,7 +724,7 @@ impl<'a, C, NC, A> MethodReconcileCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Languages for names and values. First language is used for display. Default is 'en'. + /// Languages for names and values. First language is used for display. Default is 'en'. pub fn add_lang(mut self, new_value: &str) -> MethodReconcileCall<'a, C, NC, A> { self._lang.push(new_value.to_string()); self @@ -725,7 +733,7 @@ impl<'a, C, NC, A> MethodReconcileCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Classifications of entity e.g. type, category, title. + /// Classifications of entity e.g. type, category, title. pub fn add_kind(mut self, new_value: &str) -> MethodReconcileCall<'a, C, NC, A> { self._kind.push(new_value.to_string()); self @@ -733,7 +741,7 @@ impl<'a, C, NC, A> MethodReconcileCall<'a, C, NC, A> where NC: hyper::net::Netwo /// Sets the *confidence* query property to the given value. /// /// - /// Required confidence for a candidate to match. Must be between .5 and 1.0 + /// Required confidence for a candidate to match. Must be between .5 and 1.0 pub fn confidence(mut self, new_value: f32) -> MethodReconcileCall<'a, C, NC, A> { self._confidence = Some(new_value); self @@ -781,7 +789,7 @@ impl<'a, C, NC, A> MethodReconcileCall<'a, C, NC, A> where NC: hyper::net::Netwo /// `.param("alt", "media")`. /// /// A builder for the *search* method. -/// It is not used directly, but through a `MethodMethods`. +/// It is not used directly, but through a `MethodMethods` instance. /// /// # Example /// @@ -979,7 +987,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC for &field in ["without", "with", "type", "stemmed", "spell", "scoring", "query", "prefixed", "output", "mql_output", "mid", "limit", "lang", "indent", "help", "format", "filter", "exact", "encode", "domain", "cursor", "callback", "as_of_time"].iter() { if self._additional_params.contains_key(field) { dlg.finished(false); - return Result::FieldClash(field); + return Err(Error::FieldClash(field)); } } for (name, value) in self._additional_params.iter() { @@ -997,7 +1005,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC Some(value) => params.push(("key", value)), None => { dlg.finished(false); - return Result::MissingAPIKey + return Err(Error::MissingAPIKey) } } @@ -1017,7 +1025,6 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC dlg.pre_request(); req.send() - }; match req_result { @@ -1027,7 +1034,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::HttpError(err) + return Err(Error::HttpError(err)) } Ok(mut res) => { if !res.status.is_success() { @@ -1038,12 +1045,12 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC continue; } dlg.finished(false); - return Result::Failure(res) + return Err(Error::Failure(res)) } let result_value = res; dlg.finished(true); - return Result::Success(result_value) + return Ok(result_value) } } } @@ -1054,7 +1061,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// A rule to not match against. + /// A rule to not match against. pub fn add_without(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._without.push(new_value.to_string()); self @@ -1063,7 +1070,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// A rule to match against. + /// A rule to match against. pub fn add_with(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._with.push(new_value.to_string()); self @@ -1072,7 +1079,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Restrict to topics with this Freebase type id. + /// Restrict to topics with this Freebase type id. pub fn add_type(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._type_.push(new_value.to_string()); self @@ -1080,7 +1087,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *stemmed* query property to the given value. /// /// - /// Query on stemmed names and aliases. May not be used with prefixed. + /// Query on stemmed names and aliases. May not be used with prefixed. pub fn stemmed(mut self, new_value: bool) -> MethodSearchCall<'a, C, NC, A> { self._stemmed = Some(new_value); self @@ -1088,7 +1095,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *spell* query property to the given value. /// /// - /// Request 'did you mean' suggestions + /// Request 'did you mean' suggestions pub fn spell(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._spell = Some(new_value.to_string()); self @@ -1096,7 +1103,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *scoring* query property to the given value. /// /// - /// Relevance scoring algorithm to use. + /// Relevance scoring algorithm to use. pub fn scoring(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._scoring = Some(new_value.to_string()); self @@ -1104,7 +1111,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *query* query property to the given value. /// /// - /// Query term to search for. + /// Query term to search for. pub fn query(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._query = Some(new_value.to_string()); self @@ -1112,7 +1119,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *prefixed* query property to the given value. /// /// - /// Prefix match against names and aliases. + /// Prefix match against names and aliases. pub fn prefixed(mut self, new_value: bool) -> MethodSearchCall<'a, C, NC, A> { self._prefixed = Some(new_value); self @@ -1120,7 +1127,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *output* query property to the given value. /// /// - /// An output expression to request data from matches. + /// An output expression to request data from matches. pub fn output(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._output = Some(new_value.to_string()); self @@ -1128,7 +1135,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *mql_output* query property to the given value. /// /// - /// The MQL query to run againist the results to extract more data. + /// The MQL query to run againist the results to extract more data. pub fn mql_output(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._mql_output = Some(new_value.to_string()); self @@ -1137,7 +1144,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// A mid to use instead of a query. + /// A mid to use instead of a query. pub fn add_mid(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._mid.push(new_value.to_string()); self @@ -1145,7 +1152,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *limit* query property to the given value. /// /// - /// Maximum number of results to return. + /// Maximum number of results to return. pub fn limit(mut self, new_value: i32) -> MethodSearchCall<'a, C, NC, A> { self._limit = Some(new_value); self @@ -1154,7 +1161,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// The code of the language to run the query with. Default is 'en'. + /// The code of the language to run the query with. Default is 'en'. pub fn add_lang(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._lang.push(new_value.to_string()); self @@ -1162,7 +1169,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *indent* query property to the given value. /// /// - /// Whether to indent the json results or not. + /// Whether to indent the json results or not. pub fn indent(mut self, new_value: bool) -> MethodSearchCall<'a, C, NC, A> { self._indent = Some(new_value); self @@ -1170,7 +1177,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *help* query property to the given value. /// /// - /// The keyword to request help on. + /// The keyword to request help on. pub fn help(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._help = Some(new_value.to_string()); self @@ -1178,7 +1185,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *format* query property to the given value. /// /// - /// Structural format of the json response. + /// Structural format of the json response. pub fn format(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._format = Some(new_value.to_string()); self @@ -1187,7 +1194,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// A filter to apply to the query. + /// A filter to apply to the query. pub fn add_filter(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._filter.push(new_value.to_string()); self @@ -1195,7 +1202,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *exact* query property to the given value. /// /// - /// Query on exact name and keys only. + /// Query on exact name and keys only. pub fn exact(mut self, new_value: bool) -> MethodSearchCall<'a, C, NC, A> { self._exact = Some(new_value); self @@ -1203,7 +1210,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *encode* query property to the given value. /// /// - /// The encoding of the response. You can use this parameter to enable html encoding. + /// The encoding of the response. You can use this parameter to enable html encoding. pub fn encode(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._encode = Some(new_value.to_string()); self @@ -1212,7 +1219,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Each appended value will retain its original ordering and be '/'-separated in the URL's parameters. /// /// - /// Restrict to topics with this Freebase domain id. + /// Restrict to topics with this Freebase domain id. pub fn add_domain(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._domain.push(new_value.to_string()); self @@ -1220,7 +1227,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *cursor* query property to the given value. /// /// - /// The cursor value to use for the next page of results. + /// The cursor value to use for the next page of results. pub fn cursor(mut self, new_value: i32) -> MethodSearchCall<'a, C, NC, A> { self._cursor = Some(new_value); self @@ -1228,7 +1235,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *callback* query property to the given value. /// /// - /// JS method name for JSONP callbacks. + /// JS method name for JSONP callbacks. pub fn callback(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._callback = Some(new_value.to_string()); self @@ -1236,7 +1243,7 @@ impl<'a, C, NC, A> MethodSearchCall<'a, C, NC, A> where NC: hyper::net::NetworkC /// Sets the *as_of_time* query property to the given value. /// /// - /// A mql as_of_time value to use with mql_output queries. + /// A mql as_of_time value to use with mql_output queries. pub fn as_of_time(mut self, new_value: &str) -> MethodSearchCall<'a, C, NC, A> { self._as_of_time = Some(new_value.to_string()); self diff --git a/gen/fusiontables2/Cargo.toml b/gen/fusiontables2/Cargo.toml index 60a1ab0d8e..805997386c 100644 --- a/gen/fusiontables2/Cargo.toml +++ b/gen/fusiontables2/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "google-fusiontables2" -version = "0.1.1+20141113" +version = "0.1.2+20150226" authors = ["Sebastian Thiel "] description = "A complete library to interact with fusiontables (protocol v2)" repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/fusiontables2" @@ -16,7 +16,7 @@ keywords = ["fusiontables", "google", "protocol", "web", "api"] [dependencies] hyper = "*" mime = "*" +yup-oauth2 = "*" url = "*" serde = "*" serde_macros = "*" -yup-oauth2 = "*" diff --git a/gen/fusiontables2/README.md b/gen/fusiontables2/README.md index 51c82b8e28..ba18fa0470 100644 --- a/gen/fusiontables2/README.md +++ b/gen/fusiontables2/README.md @@ -1,11 +1,11 @@ The `google-fusiontables2` library allows access to all features of the *Google fusiontables* service. -This documentation was generated from *fusiontables* crate version *0.1.1+20141113*, where *20141113* is the exact revision of the *fusiontables:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +This documentation was generated from *fusiontables* crate version *0.1.2+20150226*, where *20150226* is the exact revision of the *fusiontables:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. Everything else about the *fusiontables* *v2* API can be found at the [official documentation site](https://developers.google.com/fusiontables). @@ -46,6 +46,8 @@ The API is structured into the following primary items: * **[Hub](http://byron.github.io/google-apis-rs/google-fusiontables2/struct.Fusiontables.html)** * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-fusiontables2/trait.MethodsBuilder.html) which in turn + allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-fusiontables2/trait.CallBuilder.html) * **[Resources](http://byron.github.io/google-apis-rs/google-fusiontables2/trait.Resource.html)** * primary types that you can apply *Activities* to * a collection of properties and *Parts* @@ -55,6 +57,8 @@ The API is structured into the following primary items: * **[Activities](http://byron.github.io/google-apis-rs/google-fusiontables2/trait.CallBuilder.html)** * operations to apply to *Resources* +All *structures* are marked with applicable traits to further categorize them and ease browsing. + Generally speaking, you can invoke *Activities* like this: ```Rust,ignore @@ -94,7 +98,7 @@ google-fusiontables2 = "*" extern crate hyper; extern crate "yup-oauth2" as oauth2; extern crate "google-fusiontables2" as fusiontables2; -use fusiontables2::Result; +use fusiontables2::{Result, Error}; use std::fs; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; @@ -121,15 +125,17 @@ let result = hub.table().import_table("name") .upload_resumable(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); match result { - Result::HttpError(err) => println!("HTTPERROR: {:?}", err), - Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), - Result::MissingToken => println!("OAuth2: Missing Token"), - Result::Cancelled => println!("Operation cancelled by user"), - Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), - Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), - Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), - Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), - Result::Success(_) => println!("Success (value doesn't print)"), + Err(e) => match e { + Error::HttpError(err) => println!("HTTPERROR: {:?}", err), + Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), + Error::MissingToken => println!("OAuth2: Missing Token"), + Error::Cancelled => println!("Operation canceled by user"), + Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), + Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), + Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), + Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), + }, + Ok(_) => println!("Success (value doesn't print)"), } ``` @@ -142,7 +148,7 @@ the doit() methods, or handed as possibly intermediate results to either the When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This makes the system potentially resilient to all kinds of errors. -## Uploads and Downlods +## Uploads and Downloads If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-fusiontables2/enum.Result.html), should be read by you to obtain the media. If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-fusiontables2/trait.ResponseResult.html), it will return that by default. @@ -165,8 +171,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-fusiontables2/ ## Optional Parts in Server-Requests All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-fusiontables2/trait.RequestValue.html) and -[decodable](http://byron.github.io/google-apis-rs/google-fusiontables2/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-fusiontables2/trait.Part.html) which are identifyable by name, which will be sent to +[decodable](http://byron.github.io/google-apis-rs/google-fusiontables2/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-fusiontables2/trait.Part.html) which are identifiable by name, which will be sent to the server to indicate either the set parts of the request or the desired parts in the response. ## Builder Arguments diff --git a/gen/fusiontables2/src/cmn.rs b/gen/fusiontables2/src/cmn.rs index 218bce5ca8..2bb3871c0f 100644 --- a/gen/fusiontables2/src/cmn.rs +++ b/gen/fusiontables2/src/cmn.rs @@ -1,4 +1,4 @@ -// COPY OF 'src/rust/cmn.rs' +// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::marker::MarkerTrait; use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; @@ -24,7 +24,7 @@ use serde; pub trait Hub: MarkerTrait {} /// Identifies types for building methods of a particular resource type -pub trait ResourceMethodsBuilder: MarkerTrait {} +pub trait MethodsBuilder: MarkerTrait {} /// Identifies types which represent builders for a particular resource method pub trait CallBuilder: MarkerTrait {} @@ -105,12 +105,15 @@ pub trait Delegate { /// information if he is interesting in knowing more context when further calls to it /// are made. /// The matching `finished()` call will always be made, no matter whether or not the API - /// request was sucessfull. That way, the delgate may easily maintain a clean state + /// request was successful. That way, the delegate may easily maintain a clean state /// between various API calls. fn begin(&mut self, MethodInfo) {} /// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems. /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). + /// /// Return retry information. fn http_error(&mut self, &hyper::HttpError) -> Retry { Retry::Abort @@ -133,7 +136,7 @@ pub trait Delegate { /// Called during resumable uploads to provide a URL for the impending upload. /// It was saved after a previous call to `store_upload_url(...)`, and if not None, /// will be used instead of asking the server for a new upload URL. - /// This is useful in case a previous resumable upload was aborted/cancelled, but should now + /// This is useful in case a previous resumable upload was aborted/canceled, but should now /// be resumed. /// The returned URL will be used exactly once - if it fails again and the delegate allows /// to retry, we will ask the server for a new upload URL. @@ -154,8 +157,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `json_encoded_value` - The json-encoded value which failed to decode. - /// `json_decode_error` - The decoder error + /// * `json_encoded_value` - The json-encoded value which failed to decode. + /// * `json_decode_error` - The decoder error fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) { let _ = json_encoded_value; let _ = json_decode_error; @@ -166,6 +169,9 @@ pub trait Delegate { /// depends on the used API method. /// The delegate should check the status, header and decoded json error to decide /// whether to retry or not. In the latter case, the underlying call will fail. + /// + /// If you choose to retry after a duration, the duration should be chosen using the + /// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff). fn http_failure(&mut self, _: &hyper::client::Response, Option) -> Retry { Retry::Abort } @@ -197,8 +203,8 @@ pub trait Delegate { /// /// # Arguments /// - /// `is_success` - a true value indicates the operation was successful. If false, you should - /// discard all values stored during `store_upload_url`. + /// * `is_success` - a true value indicates the operation was successful. If false, you should + /// discard all values stored during `store_upload_url`. fn finished(&mut self, is_success: bool) { let _ = is_success; } @@ -212,8 +218,8 @@ pub struct DefaultDelegate; impl Delegate for DefaultDelegate {} -/// A universal result type used as return for all action method results. -pub enum Result { + +pub enum Error { /// The http connection failed HttpError(hyper::HttpError), @@ -240,11 +246,11 @@ pub enum Result { /// Indicates an HTTP repsonse with a non-success status code Failure(hyper::client::Response), - - /// It worked ! - Success(T), } +/// A universal result type used as return for all calls. +pub type Result = std::result::Result; + /// Contains information about an API request. pub struct MethodInfo { pub id: &'static str, @@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> where NC: hyper::net::NetworkConnector, A: oauth2::GetToken { - fn query_transfer_status(&mut self) -> (Option, hyper::HttpResult) { + fn query_transfer_status(&mut self) -> std::result::Result> { loop { match self.client.post(self.url) .header(UserAgent(self.user_agent.to_string())) @@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> sleep(d); continue; } - return (None, Ok(r)) + return Err(Ok(r)) } }; - return (Some(h.0.last), Ok(r)) + return Ok(h.0.last) } Err(err) => { if let Retry::After(d) = self.delegate.http_error(&err) { sleep(d); continue; } - return (None, Err(err)) + return Err(Err(err)) } } } @@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A> let mut start = match self.start_at { Some(s) => s, None => match self.query_transfer_status() { - (Some(s), _) => s, - (_, result) => return Some(result) + Ok(s) => s, + Err(result) => return Some(result) } }; diff --git a/gen/fusiontables2/src/lib.rs b/gen/fusiontables2/src/lib.rs index 1811b699b7..4a384d6980 100644 --- a/gen/fusiontables2/src/lib.rs +++ b/gen/fusiontables2/src/lib.rs @@ -1,8 +1,8 @@ // DO NOT EDIT ! -// This file was generated automatically from 'src/mako/lib.rs.mako' +// This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! -//! This documentation was generated from *fusiontables* crate version *0.1.1+20141113*, where *20141113* is the exact revision of the *fusiontables:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*. +//! This documentation was generated from *fusiontables* crate version *0.1.2+20150226*, where *20150226* is the exact revision of the *fusiontables:v2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*. //! //! Everything else about the *fusiontables* *v2* API can be found at the //! [official documentation site](https://developers.google.com/fusiontables). @@ -46,6 +46,8 @@ //! //! * **[Hub](struct.Fusiontables.html)** //! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn +//! allow access to individual [*Call Builders*](trait.CallBuilder.html) //! * **[Resources](trait.Resource.html)** //! * primary types that you can apply *Activities* to //! * a collection of properties and *Parts* @@ -55,6 +57,8 @@ //! * **[Activities](trait.CallBuilder.html)** //! * operations to apply to *Resources* //! +//! All *structures* are marked with applicable traits to further categorize them and ease browsing. +//! //! Generally speaking, you can invoke *Activities* like this: //! //! ```Rust,ignore @@ -94,7 +98,7 @@ //! extern crate hyper; //! extern crate "yup-oauth2" as oauth2; //! extern crate "google-fusiontables2" as fusiontables2; -//! use fusiontables2::Result; +//! use fusiontables2::{Result, Error}; //! use std::fs; //! # #[test] fn egal() { //! use std::default::Default; @@ -122,15 +126,17 @@ //! .upload_resumable(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); //! //! match result { -//! Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -//! Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -//! Result::MissingToken => println!("OAuth2: Missing Token"), -//! Result::Cancelled => println!("Operation cancelled by user"), -//! Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -//! Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -//! Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -//! Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -//! Result::Success(_) => println!("Success (value doesn't print)"), +//! Err(e) => match e { +//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +//! Error::MissingToken => println!("OAuth2: Missing Token"), +//! Error::Cancelled => println!("Operation canceled by user"), +//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +//! }, +//! Ok(_) => println!("Success (value doesn't print)"), //! } //! # } //! ``` @@ -143,7 +149,7 @@ //! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This //! makes the system potentially resilient to all kinds of errors. //! -//! ## Uploads and Downlods +//! ## Uploads and Downloads //! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be //! read by you to obtain the media. //! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default. @@ -166,8 +172,9 @@ //! ## Optional Parts in Server-Requests //! //! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and -//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid. -//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to +//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to //! the server to indicate either the set parts of the request or the desired parts in the response. //! //! ## Builder Arguments @@ -216,7 +223,7 @@ use std::io; use std::fs; use std::thread::sleep; -pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError}; +pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError}; // ############## @@ -266,7 +273,7 @@ impl Default for Scope { /// extern crate hyper; /// extern crate "yup-oauth2" as oauth2; /// extern crate "google-fusiontables2" as fusiontables2; -/// use fusiontables2::Result; +/// use fusiontables2::{Result, Error}; /// use std::fs; /// # #[test] fn egal() { /// use std::default::Default; @@ -294,15 +301,17 @@ impl Default for Scope { /// .upload_resumable(fs::File::open("file.ext").unwrap(), "application/octet-stream".parse().unwrap()); /// /// match result { -/// Result::HttpError(err) => println!("HTTPERROR: {:?}", err), -/// Result::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), -/// Result::MissingToken => println!("OAuth2: Missing Token"), -/// Result::Cancelled => println!("Operation cancelled by user"), -/// Result::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), -/// Result::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), -/// Result::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), -/// Result::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), -/// Result::Success(_) => println!("Success (value doesn't print)"), +/// Err(e) => match e { +/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err), +/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"), +/// Error::MissingToken => println!("OAuth2: Missing Token"), +/// Error::Cancelled => println!("Operation canceled by user"), +/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size), +/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"), +/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field), +/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err), +/// }, +/// Ok(_) => println!("Success (value doesn't print)"), /// } /// # } /// ``` @@ -323,7 +332,7 @@ impl<'a, C, NC, A> Fusiontables Fusiontables { client: RefCell::new(client), auth: RefCell::new(authenticator), - _user_agent: "google-api-rust-client/0.1.1".to_string(), + _user_agent: "google-api-rust-client/0.1.2".to_string(), _m: PhantomData } } @@ -348,7 +357,7 @@ impl<'a, C, NC, A> Fusiontables } /// Set the user-agent header field to use in all requests to the server. - /// It defaults to `google-api-rust-client/0.1.1`. + /// It defaults to `google-api-rust-client/0.1.2`. /// /// Returns the previously set user-agent. pub fn user_agent(&mut self, agent_name: String) -> String { @@ -362,7 +371,7 @@ impl<'a, C, NC, A> Fusiontables // ############ // SCHEMAS ### // ########## -/// A background task on a table, initiated for time and or resource consuming operations such as a column type change or delete all rows operation. +/// A background task on a table, initiated for time- or resource-consuming operations such as changing column types or deleting all rows. /// /// # Activities /// @@ -374,16 +383,16 @@ impl<'a, C, NC, A> Fusiontables /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Task { - /// True if the task is in progress, its progress indicator will indicated where it is, and it can't be deleted. + /// false while the table is busy with some other task. true if this background task is currently running. pub started: bool, - /// Task percentage completion. + /// Task percentage completion. pub progress: String, - /// Type name: a template for an individual task. + /// Type of the resource. This is always "fusiontables#task". pub kind: String, - /// The type of task being executed in the background. + /// Type of background task. #[serde(alias="type")] pub type_: String, - /// Identifier for the task. + /// Identifier for the task. #[serde(alias="taskId")] pub task_id: String, } @@ -407,38 +416,39 @@ impl ResponseResult for Task {} pub struct Column { /// Column graph predicate. /// Used to map table to graph data model (subject,predicate,object) - /// See http://www.w3.org/TR/2014/REC-rdf11-concepts-20140225/#data-model + /// See W3C Graph-based Data Model. #[serde(alias="graphPredicate")] pub graph_predicate: Option, - /// Type name: a template for an individual column. + /// The kind of item this is. For a column, this is always fusiontables#column. pub kind: Option, - /// List of valid values used to validate data and supply a drop-down list of values in the web application. + /// List of valid values used to validate data and supply a drop-down list of values in the web application. #[serde(alias="validValues")] pub valid_values: Option>, - /// Column description. + /// Column description. pub description: Option, - /// Identifier of the base column. If present, this column is derived from the specified base column. + /// Identifier of the base column. If present, this column is derived from the specified base column. #[serde(alias="baseColumn")] pub base_column: Option, - /// Identifier for the column. + /// Identifier for the column. #[serde(alias="columnId")] pub column_id: Option, - /// JSON object containing custom column properties. + /// JSON object containing custom column properties. #[serde(alias="columnPropertiesJson")] pub column_properties_json: Option, - /// Format pattern. + /// Format pattern. + /// Acceptable values are DT_DATE_MEDIUMe.g Dec 24, 2008 DT_DATE_SHORTfor example 12/24/08 DT_DATE_TIME_MEDIUMfor example Dec 24, 2008 8:30:45 PM DT_DATE_TIME_SHORTfor example 12/24/08 8:30 PM DT_DAY_MONTH_2_DIGIT_YEARfor example 24/12/08 DT_DAY_MONTH_2_DIGIT_YEAR_TIMEfor example 24/12/08 20:30 DT_DAY_MONTH_2_DIGIT_YEAR_TIME_MERIDIANfor example 24/12/08 8:30 PM DT_DAY_MONTH_4_DIGIT_YEARfor example 24/12/2008 DT_DAY_MONTH_4_DIGIT_YEAR_TIMEfor example 24/12/2008 20:30 DT_DAY_MONTH_4_DIGIT_YEAR_TIME_MERIDIANfor example 24/12/2008 8:30 PM DT_ISO_YEAR_MONTH_DAYfor example 2008-12-24 DT_ISO_YEAR_MONTH_DAY_TIMEfor example 2008-12-24 20:30:45 DT_MONTH_DAY_4_DIGIT_YEARfor example 12/24/2008 DT_TIME_LONGfor example 8:30:45 PM UTC-6 DT_TIME_MEDIUMfor example 8:30:45 PM DT_TIME_SHORTfor example 8:30 PM DT_YEAR_ONLYfor example 2008 HIGHLIGHT_UNTYPED_CELLSHighlight cell data that does not match the data type NONENo formatting (default) NUMBER_CURRENCYfor example $1234.56 NUMBER_DEFAULTfor example 1,234.56 NUMBER_INTEGERfor example 1235 NUMBER_NO_SEPARATORfor example 1234.56 NUMBER_PERCENTfor example 123,456% NUMBER_SCIENTIFICfor example 1E3 STRING_EIGHT_LINE_IMAGEDisplays thumbnail images as tall as eight lines of text STRING_FOUR_LINE_IMAGEDisplays thumbnail images as tall as four lines of text STRING_JSON_TEXTAllows JSON editing of text in UI STRING_LINKTreats cell as a link (must start with http:// or https://) STRING_ONE_LINE_IMAGEDisplays thumbnail images as tall as one line of text STRING_VIDEO_OR_MAPDisplay a video or map thumbnail #[serde(alias="formatPattern")] pub format_pattern: Option, - /// JSON schema for interpreting JSON in this column. + /// JSON schema for interpreting JSON in this column. #[serde(alias="columnJsonSchema")] pub column_json_schema: Option, - /// Type of the column. + /// Type of the column. #[serde(alias="type")] pub type_: Option, - /// If true, data entered via the web application is validated. + /// If true, data entered via the web application is validated. #[serde(alias="validateData")] pub validate_data: Option, - /// Name of the column. + /// Name of the column. pub name: Option, } @@ -452,17 +462,17 @@ impl ResponseResult for Column {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Bucket { - /// Opacity of the color: 0.0 (transparent) to 1.0 (opaque). + /// Opacity of the color: 0.0 (transparent) to 1.0 (opaque). pub opacity: f64, - /// Width of a line (in pixels). + /// Width of a line (in pixels). pub weight: i32, - /// Minimum value in the selected column for a row to be styled according to the bucket color, opacity, icon, or weight. + /// Minimum value in the selected column for a row to be styled according to the bucket color, opacity, icon, or weight. pub min: f64, - /// Color of line or the interior of a polygon in #RRGGBB format. + /// Color of line or the interior of a polygon in #RRGGBB format. pub color: String, - /// Maximum value in the selected column for a row to be styled according to the bucket color, opacity, icon, or weight. + /// Maximum value in the selected column for a row to be styled according to the bucket color, opacity, icon, or weight. pub max: f64, - /// Icon name used for a point. + /// Icon name used for a point. pub icon: String, } @@ -475,21 +485,21 @@ impl Part for Bucket {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct StyleFunction { - /// Gradient function that interpolates a range of colors based on column value. + /// Gradient function that interpolates a range of colors based on column value. pub gradient: StyleFunctionGradient, - /// Name of the column whose value is used in the style. + /// Name of the column whose value is used in the style. #[serde(alias="columnName")] pub column_name: String, - /// Bucket function that assigns a style based on the range a column value falls into. + /// Bucket function that assigns a style based on the range a column value falls into. pub buckets: Vec, - /// Stylers can be one of three kinds: "fusiontables#fromColumn" if the column value is to be used as is, i.e., the column values can have colors in #RRGGBBAA format or integer line widths or icon names; "fusiontables#gradient" if the styling of the row is to be based on applying the gradient function on the column value; or "fusiontables#buckets" if the styling is to based on the bucket into which the the column value falls. + /// Stylers can be one of three kinds: "fusiontables#fromColumn if the column value is to be used as is, i.e., the column values can have colors in #RRGGBBAA format or integer line widths or icon names; fusiontables#gradient if the styling of the row is to be based on applying the gradient function on the column value; or fusiontables#buckets if the styling is to based on the bucket into which the the column value falls. pub kind: String, } impl Part for StyleFunction {} -/// Represents a list of tasks in a table. +/// Represents a list of tasks for a table. /// /// # Activities /// @@ -500,14 +510,14 @@ impl Part for StyleFunction {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TaskList { - /// Token used to access the next page of this result. No token is displayed if there are no more tokens left. + /// Token used to access the next page of this result. No token is displayed if there are no more pages left. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// List of all requested tasks. + /// List of all requested tasks. pub items: Vec, - /// Type name: a list of all tasks. + /// Type of the resource. This is always "fusiontables#taskList". pub kind: String, - /// Total number of tasks for the table. + /// Total number of tasks for the table. #[serde(alias="totalItems")] pub total_items: i32, } @@ -521,11 +531,11 @@ impl ResponseResult for TaskList {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct StyleFunctionGradient { - /// Higher-end of the interpolation range: rows with this value will be assigned to colors[n-1]. + /// Higher-end of the interpolation range: rows with this value will be assigned to colors[n-1]. pub max: f64, - /// Array with two or more colors. + /// Array with two or more colors. pub colors: Vec, - /// Lower-end of the interpolation range: rows with this value will be assigned to colors[0]. + /// Lower-end of the interpolation range: rows with this value will be assigned to colors[0]. pub min: f64, } @@ -547,19 +557,19 @@ impl Part for StyleFunctionGradient {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct Template { - /// Body of the template. It contains HTML with {column_name} to insert values from a particular column. The body is sanitized to remove certain tags, e.g., script. Only one of body or automaticColumns can be specified. + /// Body of the template. It contains HTML with {column_name} to insert values from a particular column. The body is sanitized to remove certain tags, e.g., script. Only one of body or automaticColumns can be specified. pub body: Option, - /// Type name: a template for the info window contents. The template can either include an HTML body or a list of columns from which the template is computed automatically. + /// The kind of item this is. For a template, this is always fusiontables#template. pub kind: Option, - /// Identifier for the table for which the template is defined. + /// Identifier for the table for which the template is defined. #[serde(alias="tableId")] pub table_id: Option, - /// Optional name assigned to a template. + /// Optional name assigned to a template. pub name: Option, - /// Identifier for the template, unique within the context of a particular table. + /// Identifier for the template, unique within the context of a particular table. #[serde(alias="templateId")] pub template_id: Option, - /// List of columns from which the template is to be automatically constructed. Only one of body or automaticColumns can be specified. + /// List of columns from which the template is to be automatically constructed. Only one of body or automaticColumns can be specified. #[serde(alias="automaticColumnNames")] pub automatic_column_names: Option>, } @@ -574,10 +584,10 @@ impl ResponseResult for Template {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct ColumnBaseColumn { - /// Offset to the entry in the list of base tables in the table definition. + /// Offset to the entry in the list of base tables in the table definition. #[serde(alias="tableIndex")] pub table_index: i32, - /// The id of the column in the base table from which this column is derived. + /// The id of the column in the base table from which this column is derived. #[serde(alias="columnId")] pub column_id: i32, } @@ -597,14 +607,14 @@ impl Part for ColumnBaseColumn {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct ColumnList { - /// Token used to access the next page of this result. No token is displayed if there are no more tokens left. + /// Token used to access the next page of this result. No token is displayed if there are no more pages left. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// List of all requested columns. + /// List of all requested columns. pub items: Vec, - /// Type name: a list of all columns. + /// The kind of item this is. For a column list, this is always fusiontables#columnList. pub kind: String, - /// Total number of columns for the table. + /// Total number of columns for the table. #[serde(alias="totalItems")] pub total_items: i32, } @@ -623,10 +633,10 @@ impl ResponseResult for ColumnList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Import { - /// The number of rows received from the import request. + /// The number of rows received from the import request. #[serde(alias="numRowsReceived")] pub num_rows_received: String, - /// Type name: a template for an import request. + /// The kind of item this is. For an import, this is always fusiontables#import. pub kind: String, } @@ -639,19 +649,19 @@ impl ResponseResult for Import {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct LineStyle { - /// Width of the line in pixels. + /// Width of the line in pixels. #[serde(alias="strokeWeight")] pub stroke_weight: i32, - /// Column-value or bucket styler that is used to determine the width of the line. + /// Column-value or bucket styler that is used to determine the width of the line. #[serde(alias="strokeWeightStyler")] pub stroke_weight_styler: StyleFunction, - /// Color of the line in #RRGGBB format. + /// Color of the line in #RRGGBB format. #[serde(alias="strokeColor")] pub stroke_color: String, - /// Opacity of the line : 0.0 (transparent) to 1.0 (opaque). + /// Opacity of the line : 0.0 (transparent) to 1.0 (opaque). #[serde(alias="strokeOpacity")] pub stroke_opacity: f64, - /// Column-value, gradient or buckets styler that is used to determine the line color and opacity. + /// Column-value, gradient or buckets styler that is used to determine the line color and opacity. #[serde(alias="strokeColorStyler")] pub stroke_color_styler: StyleFunction, } @@ -665,28 +675,28 @@ impl Part for LineStyle {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PolygonStyle { - /// Column-value, gradient or buckets styler that is used to determine the border color and opacity. + /// Column-value, gradient or buckets styler that is used to determine the border color and opacity. #[serde(alias="strokeColorStyler")] pub stroke_color_styler: StyleFunction, - /// Width of the polyon border in pixels. + /// Width of the polyon border in pixels. #[serde(alias="strokeWeight")] pub stroke_weight: i32, - /// Opacity of the polygon border: 0.0 (transparent) to 1.0 (opaque). + /// Opacity of the polygon border: 0.0 (transparent) to 1.0 (opaque). #[serde(alias="strokeOpacity")] pub stroke_opacity: f64, - /// Column-value or bucket styler that is used to determine the width of the polygon border. + /// Column-value or bucket styler that is used to determine the width of the polygon border. #[serde(alias="strokeWeightStyler")] pub stroke_weight_styler: StyleFunction, - /// Column-value, gradient, or bucket styler that is used to determine the interior color and opacity of the polygon. + /// Column-value, gradient, or bucket styler that is used to determine the interior color and opacity of the polygon. #[serde(alias="fillColorStyler")] pub fill_color_styler: StyleFunction, - /// Color of the interior of the polygon in #RRGGBB format. + /// Color of the interior of the polygon in #RRGGBB format. #[serde(alias="fillColor")] pub fill_color: String, - /// Color of the polygon border in #RRGGBB format. + /// Color of the polygon border in #RRGGBB format. #[serde(alias="strokeColor")] pub stroke_color: String, - /// Opacity of the interior of the polygon: 0.0 (transparent) to 1.0 (opaque). + /// Opacity of the interior of the polygon: 0.0 (transparent) to 1.0 (opaque). #[serde(alias="fillOpacity")] pub fill_opacity: f64, } @@ -705,14 +715,14 @@ impl Part for PolygonStyle {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct StyleSettingList { - /// Token used to access the next page of this result. No token is displayed if there are no more styles left. + /// Token used to access the next page of this result. No token is displayed if there are no more styles left. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// All requested style settings. + /// All requested style settings. pub items: Vec, - /// Type name: in this case, a list of style settings. + /// The kind of item this is. For a style list, this is always fusiontables#styleSettingList . pub kind: String, - /// Total number of styles for the table. + /// Total number of styles for the table. #[serde(alias="totalItems")] pub total_items: i32, } @@ -720,7 +730,7 @@ pub struct StyleSettingList { impl ResponseResult for StyleSettingList {} -/// Represents a response to an sql statement. +/// Represents a response to a SQL statement. /// /// # Activities /// @@ -732,11 +742,11 @@ impl ResponseResult for StyleSettingList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct Sqlresponse { - /// Type name: a template for an individual table. + /// The kind of item this is. For responses to SQL queries, this is always fusiontables#sqlresponse. pub kind: String, - /// The rows in the table. For each cell we print out whatever cell value (e.g., numeric, string) exists. Thus it is important that each cell contains only one value. + /// The rows in the table. For each cell we print out whatever cell value (e.g., numeric, string) exists. Thus it is important that each cell contains only one value. pub rows: Vec>, - /// Columns in the table. + /// Columns in the table. pub columns: Vec, } @@ -749,10 +759,10 @@ impl ResponseResult for Sqlresponse {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct PointStyle { - /// Column or a bucket value from which the icon name is to be determined. + /// Column or a bucket value from which the icon name is to be determined. #[serde(alias="iconStyler")] pub icon_styler: StyleFunction, - /// Name of the icon. Use values defined in http://www.google.com/fusiontables/DataSource?dsrcid=308519 + /// Name of the icon. Use values defined in http://www.google.com/fusiontables/DataSource?dsrcid=308519 #[serde(alias="iconName")] pub icon_name: String, } @@ -774,23 +784,23 @@ impl Part for PointStyle {} /// #[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct StyleSetting { - /// Style definition for points in the table. + /// Style definition for points in the table. #[serde(alias="markerOptions")] pub marker_options: Option, - /// Type name: an individual style setting. A StyleSetting contains the style defintions for points, lines, and polygons in a table. Since a table can have any one or all of them, a style definition can have point, line and polygon style definitions. + /// The kind of item this is. A StyleSetting contains the style definitions for points, lines, and polygons in a table. Since a table can have any one or all of them, a style definition can have point, line and polygon style definitions. pub kind: Option, - /// Identifier for the table. + /// Identifier for the table. #[serde(alias="tableId")] pub table_id: Option, - /// Optional name for the style setting. + /// Optional name for the style setting. pub name: Option, - /// Style definition for polygons in the table. + /// Style definition for polygons in the table. #[serde(alias="polygonOptions")] pub polygon_options: Option, - /// Style definition for lines in the table. + /// Style definition for lines in the table. #[serde(alias="polylineOptions")] pub polyline_options: Option, - /// Identifier for the style setting (unique only within tables). + /// Identifier for the style setting (unique only within tables). #[serde(alias="styleId")] pub style_id: Option, } @@ -810,12 +820,12 @@ impl ResponseResult for StyleSetting {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TableList { - /// Token used to access the next page of this result. No token is displayed if there are no more tokens left. + /// Token used to access the next page of this result. No token is displayed if there are no more pages left. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// List of all requested tables. + /// List of all requested tables. pub items: Vec, - /// Type name: a list of all tables. + /// The kind of item this is. For table list, this is always fusiontables#tableList. pub kind: String, } @@ -833,14 +843,14 @@ impl ResponseResult for TableList {} /// #[derive(Default, Clone, Debug, Deserialize)] pub struct TemplateList { - /// Token used to access the next page of this result. No token is displayed if there are no more tokens left. + /// Token used to access the next page of this result. No token is displayed if there are no more pages left. #[serde(alias="nextPageToken")] pub next_page_token: String, - /// List of all requested templates. + /// List of all requested templates. pub items: Vec