From 757064a653c4801ec590ec0c39677cd5856531ef Mon Sep 17 00:00:00 2001 From: Daniel Porteous Date: Wed, 14 Aug 2024 18:04:24 +0100 Subject: [PATCH] Add cloudcommerceprocurement API --- apis.json | 5657 +---------------- etc/api/api-list.yaml | 2 + .../v1/cloudcommerceprocurement-api.json | 930 +++ gen/cloudcommerceprocurement1-cli/Cargo.toml | 42 + gen/cloudcommerceprocurement1-cli/LICENSE.md | 30 + gen/cloudcommerceprocurement1-cli/README.md | 117 + gen/cloudcommerceprocurement1-cli/mkdocs.yml | 30 + gen/cloudcommerceprocurement1-cli/src/main.rs | 1640 +++++ gen/cloudcommerceprocurement1/Cargo.toml | 39 + gen/cloudcommerceprocurement1/LICENSE.md | 30 + gen/cloudcommerceprocurement1/README.md | 197 + gen/cloudcommerceprocurement1/src/api.rs | 4660 ++++++++++++++ gen/cloudcommerceprocurement1/src/lib.rs | 217 + 13 files changed, 7940 insertions(+), 5651 deletions(-) create mode 100644 etc/api/cloudcommerceprocurement/v1/cloudcommerceprocurement-api.json create mode 100644 gen/cloudcommerceprocurement1-cli/Cargo.toml create mode 100644 gen/cloudcommerceprocurement1-cli/LICENSE.md create mode 100644 gen/cloudcommerceprocurement1-cli/README.md create mode 100644 gen/cloudcommerceprocurement1-cli/mkdocs.yml create mode 100644 gen/cloudcommerceprocurement1-cli/src/main.rs create mode 100644 gen/cloudcommerceprocurement1/Cargo.toml create mode 100644 gen/cloudcommerceprocurement1/LICENSE.md create mode 100644 gen/cloudcommerceprocurement1/README.md create mode 100644 gen/cloudcommerceprocurement1/src/api.rs create mode 100644 gen/cloudcommerceprocurement1/src/lib.rs diff --git a/apis.json b/apis.json index e54c1a83d0..06a27169ad 100644 --- a/apis.json +++ b/apis.json @@ -4,5662 +4,17 @@ "items": [ { "kind": "discovery#directoryItem", - "id": "aiplatform:v1", - "name": "aiplatform", + "id": "cloudcommerceprocurement:v1", + "name": "cloudcommerceprocurement", "version": "v1", - "title": "Vertex AI API", - "description": "Train high-quality custom machine learning models with minimal machine learning expertise and effort.", - "discoveryRestUrl": "https://aiplatform.googleapis.com/$discovery/rest?version=v1", + "title": "Cloud Commerce Partner Procurement API", + "description": "Partner API for the Cloud Commerce Procurement Service.", + "discoveryRestUrl": "https://cloudcommerceprocurement.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "documentationLink": "https://cloud.google.com/vertex-ai/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "aiplatform:v1beta1", - "name": "aiplatform", - "version": "v1", - "title": "Vertex AI API", - "description": "Train high-quality custom machine learning models with minimal machine learning expertise and effort.", - "discoveryRestUrl": "https://aiplatform.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "documentationLink": "https://cloud.google.com/vertex-ai/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "walletobjects:v1", - "name": "walletobjects", - "version": "v1", - "title": "Google Pay Passes API", - "description": "API for issuers to save … Google Wallet Objects.", - "discoveryRestUrl": "https://walletobjects.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "documentationLink": "https://developers.google.com/pay/passes", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "abusiveexperiencereport:v1", - "name": "abusiveexperiencereport", - "version": "v1", - "title": "Abusive Experience Report API", - "description": "Views Abusive Experience Report data, and gets a list of sites that have a significant number of abusive experiences.", - "discoveryRestUrl": "https://abusiveexperiencereport.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/abusive-experience-report/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "acceleratedmobilepageurl:v1", - "name": "acceleratedmobilepageurl", - "version": "v1", - "title": "Accelerated Mobile Pages (AMP) URL API", - "description": "Retrieves the list of AMP URLs (and equivalent AMP Cache URLs) for a given list of public URL(s).", - "discoveryRestUrl": "https://acceleratedmobilepageurl.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/amp/cache/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "accessapproval:v1", - "name": "accessapproval", - "version": "v1", - "title": "Access Approval API", - "description": "An API for controlling access to data by Google personnel.", - "discoveryRestUrl": "https://accessapproval.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/cloud-provider-access-management/access-approval/docs", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "accesscontextmanager:v1beta", - "name": "accesscontextmanager", - "version": "v1beta", - "title": "Access Context Manager API", - "description": "An API for setting attribute based access control to requests to GCP services.", - "discoveryRestUrl": "https://accesscontextmanager.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/access-context-manager/docs/reference/rest/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "accesscontextmanager:v1", - "name": "accesscontextmanager", - "version": "v1", - "title": "Access Context Manager API", - "description": "An API for setting attribute based access control to requests to GCP services.", - "discoveryRestUrl": "https://accesscontextmanager.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/access-context-manager/docs/reference/rest/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "adexchangebuyer2:v2beta1", - "name": "adexchangebuyer2", - "version": "v2beta1", - "title": "Ad Exchange Buyer API II", - "description": "Accesses the latest features for managing Authorized Buyers accounts, Real-Time Bidding configurations and auction metrics, and Marketplace programmatic deals.", - "discoveryRestUrl": "https://adexchangebuyer.googleapis.com/$discovery/rest?version=v2beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/authorized-buyers/apis/reference/rest/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "adexperiencereport:v1", - "name": "adexperiencereport", - "version": "v1", - "title": "Ad Experience Report API", - "description": "Views Ad Experience Report data, and gets a list of sites that have a significant number of annoying ads.", - "discoveryRestUrl": "https://adexperiencereport.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/ad-experience-report/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "admin:datatransfer_v1", - "name": "admin", - "version": "datatransfer_v1", - "title": "Admin SDK API", - "description": "Admin SDK lets administrators of enterprise domains to view and manage resources like user, groups etc. It also provides audit and usage reports of domain.", - "discoveryRestUrl": "https://admin.googleapis.com/$discovery/rest?version=datatransfer_v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/admin-sdk/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "admin:directory_v1", - "name": "admin", - "version": "directory_v1", - "title": "Admin SDK API", - "description": "Admin SDK lets administrators of enterprise domains to view and manage resources like user, groups etc. It also provides audit and usage reports of domain.", - "discoveryRestUrl": "https://admin.googleapis.com/$discovery/rest?version=directory_v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/admin-sdk/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "admin:reports_v1", - "name": "admin", - "version": "reports_v1", - "title": "Admin SDK API", - "description": "Admin SDK lets administrators of enterprise domains to view and manage resources like user, groups etc. It also provides audit and usage reports of domain.", - "discoveryRestUrl": "https://admin.googleapis.com/$discovery/rest?version=reports_v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/admin-sdk/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "admob:v1beta", - "name": "admob", - "version": "v1beta", - "title": "AdMob API", - "description": "The AdMob API allows publishers to programmatically get information about their AdMob account.", - "discoveryRestUrl": "https://admob.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/admob/api/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "admob:v1", - "name": "admob", - "version": "v1", - "title": "AdMob API", - "description": "The AdMob API allows publishers to programmatically get information about their AdMob account.", - "discoveryRestUrl": "https://admob.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/admob/api/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "adsense:v2", - "name": "adsense", - "version": "v2", - "title": "AdSense Management API", - "description": "The AdSense Management API allows publishers to access their inventory and run earnings and performance reports.", - "discoveryRestUrl": "https://adsense.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/adsense/management/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "adsensehost:v4.1", - "name": "adsensehost", - "version": "v4.1", - "title": "AdSense Host API", - "description": "The AdSense Host API gives AdSense Hosts access to report generation, ad code generation, and publisher management capabilities.", - "discoveryRestUrl": "https://adsensehost.googleapis.com/$discovery/rest?version=v4.1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/adsense/host/index", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "alertcenter:v1beta1", - "name": "alertcenter", - "version": "v1beta1", - "title": "Google Workspace Alert Center API", - "description": "Manages alerts on issues affecting your domain.", - "discoveryRestUrl": "https://alertcenter.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/admin-sdk/alertcenter/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "analytics:v3", - "name": "analytics", - "version": "v3", - "title": "Google Analytics API", - "description": "The Analytics API provides access to Analytics configuration and report data.", - "discoveryRestUrl": "https://analytics.googleapis.com/$discovery/rest?version=v3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "http://code.google.com/apis/analytics/docs/mgmt/home.html", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "analyticsadmin:v1alpha", - "name": "analyticsadmin", - "version": "v1alpha", - "title": "Google Analytics Admin API", - "description": "", - "discoveryRestUrl": "https://analyticsadmin.googleapis.com/$discovery/rest?version=v1alpha", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "http://code.google.com/apis/analytics/docs/mgmt/home.html", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "analyticsdata:v1beta", - "name": "analyticsdata", - "version": "v1beta", - "title": "Google Analytics Data API", - "description": "Accesses report data in Google Analytics.", - "discoveryRestUrl": "https://analyticsdata.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/analytics/devguides/reporting/data/v1/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "analyticsreporting:v4", - "name": "analyticsreporting", - "version": "v4", - "title": "Analytics Reporting API", - "description": "Accesses Analytics report data.", - "discoveryRestUrl": "https://analyticsreporting.googleapis.com/$discovery/rest?version=v4", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/analytics/devguides/reporting/core/v4/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "androiddeviceprovisioning:v1", - "name": "androiddeviceprovisioning", - "version": "v1", - "title": "Android Device Provisioning Partner API", - "description": "Automates Android zero-touch enrollment for device resellers, customers, and EMMs.", - "discoveryRestUrl": "https://androiddeviceprovisioning.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/zero-touch/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "androidenterprise:v1", - "name": "androidenterprise", - "version": "v1", - "title": "Google Play EMM API", - "description": "Manages the deployment of apps to Android Enterprise devices.", - "discoveryRestUrl": "https://androidenterprise.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "androidmanagement:v1", - "name": "androidmanagement", - "version": "v1", - "title": "Android Management API", - "description": "The Android Management API provides remote enterprise management of Android devices and apps.", - "discoveryRestUrl": "https://androidmanagement.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/android/management", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "androidpublisher:v3", - "name": "androidpublisher", - "version": "v3", - "title": "Google Play Android Developer API", - "description": "Lets Android application developers access their Google Play accounts.", - "discoveryRestUrl": "https://androidpublisher.googleapis.com/$discovery/rest?version=v3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/android-publisher", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "apigateway:v1beta", - "name": "apigateway", - "version": "v1beta", - "title": "API Gateway API", - "description": "", - "discoveryRestUrl": "https://apigateway.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/api-gateway/docs", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "apigateway:v1", - "name": "apigateway", - "version": "v1", - "title": "API Gateway API", - "description": "", - "discoveryRestUrl": "https://apigateway.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/api-gateway/docs", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "apigee:v1", - "name": "apigee", - "version": "v1", - "title": "Apigee API", - "description": "Use the Apigee API to programmatically develop and manage APIs with a set of RESTful operations. Develop and secure API proxies, deploy and undeploy API proxy revisions, monitor APIs, configure environments, manage users, and more. Note: This product is available as a free trial for a time period of 60 days.", - "discoveryRestUrl": "https://apigee.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/apigee-api-management/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "apikeys:v2", - "name": "apikeys", - "version": "v2", - "title": "API Keys API", - "description": "Manages the API keys associated with developer projects.", - "discoveryRestUrl": "https://apikeys.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/api-keys/docs", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "appengine:v1alpha", - "name": "appengine", - "version": "v1alpha", - "title": "App Engine Admin API", - "description": "Provisions and manages developers' App Engine applications.", - "discoveryRestUrl": "https://appengine.googleapis.com/$discovery/rest?version=v1alpha", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "appengine:v1beta", - "name": "appengine", - "version": "v1beta", - "title": "App Engine Admin API", - "description": "Provisions and manages developers' App Engine applications.", - "discoveryRestUrl": "https://appengine.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "appengine:v1", - "name": "appengine", - "version": "v1", - "title": "App Engine Admin API", - "description": "Provisions and manages developers' App Engine applications.", - "discoveryRestUrl": "https://appengine.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "area120tables:v1alpha1", - "name": "area120tables", - "version": "v1alpha1", - "title": "Area120 Tables API", - "description": "", - "discoveryRestUrl": "https://area120tables.googleapis.com/$discovery/rest?version=v1alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://support.google.com/area120-tables/answer/10011390", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "artifactregistry:v1beta1", - "name": "artifactregistry", - "version": "v1beta1", - "title": "Artifact Registry API", - "description": "Store and manage build artifacts in a scalable and integrated service built on Google infrastructure.", - "discoveryRestUrl": "https://artifactregistry.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/artifacts/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "artifactregistry:v1beta2", - "name": "artifactregistry", - "version": "v1beta2", - "title": "Artifact Registry API", - "description": "Store and manage build artifacts in a scalable and integrated service built on Google infrastructure.", - "discoveryRestUrl": "https://artifactregistry.googleapis.com/$discovery/rest?version=v1beta2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/artifacts/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "artifactregistry:v1", - "name": "artifactregistry", - "version": "v1", - "title": "Artifact Registry API", - "description": "Store and manage build artifacts in a scalable and integrated service built on Google infrastructure.", - "discoveryRestUrl": "https://artifactregistry.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/artifacts/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "assuredworkloads:v1", - "name": "assuredworkloads", - "version": "v1", - "title": "Assured Workloads API", - "description": "", - "discoveryRestUrl": "https://assuredworkloads.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "authorizedbuyersmarketplace:v1", - "name": "authorizedbuyersmarketplace", - "version": "v1", - "title": "Authorized Buyers Marketplace API", - "description": "The Authorized Buyers Marketplace API allows buyers programmatically discover inventory; propose, retrieve and negotiate deals with publishers.", - "discoveryRestUrl": "https://authorizedbuyersmarketplace.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "baremetalsolution:v1", - "name": "baremetalsolution", - "version": "v1", - "title": "Bare Metal Solution API", - "description": "Bare Metal Solution provides hardware to run specialized workloads with low latency on Google Cloud.", - "discoveryRestUrl": "https://baremetalsolution.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/bare-metal", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "baremetalsolution:v2", - "name": "baremetalsolution", - "version": "v2", - "title": "Bare Metal Solution API", - "description": "Bare Metal Solution provides hardware to run specialized workloads with low latency on Google Cloud.", - "discoveryRestUrl": "https://baremetalsolution.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/bare-metal", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "bigquery:v2", - "name": "bigquery", - "version": "v2", - "title": "BigQuery API", - "description": "A data platform for customers to create, manage, share and query data.", - "discoveryRestUrl": "https://bigquery.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/bigquery/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "bigqueryconnection:v1beta1", - "name": "bigqueryconnection", - "version": "v1beta1", - "title": "BigQuery Connection API", - "description": "Allows users to manage BigQuery connections to external data sources.", - "discoveryRestUrl": "https://bigqueryconnection.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/bigquery/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "bigquerydatatransfer:v1", - "name": "bigquerydatatransfer", - "version": "v1", - "title": "BigQuery Data Transfer API", - "description": "Schedule queries or transfer external data from SaaS applications to Google BigQuery on a regular basis.", - "discoveryRestUrl": "https://bigquerydatatransfer.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/bigquery-transfer/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "bigqueryreservation:v1beta1", - "name": "bigqueryreservation", - "version": "v1beta1", - "title": "BigQuery Reservation API", - "description": "A service to modify your BigQuery flat-rate reservations.", - "discoveryRestUrl": "https://bigqueryreservation.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/bigquery/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "bigqueryreservation:v1", - "name": "bigqueryreservation", - "version": "v1", - "title": "BigQuery Reservation API", - "description": "A service to modify your BigQuery flat-rate reservations.", - "discoveryRestUrl": "https://bigqueryreservation.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/bigquery/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "bigtableadmin:v2", - "name": "bigtableadmin", - "version": "v2", - "title": "Cloud Bigtable Admin API", - "description": "Administer your Cloud Bigtable tables and instances.", - "discoveryRestUrl": "https://bigtableadmin.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/bigtable/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "billingbudgets:v1beta1", - "name": "billingbudgets", - "version": "v1beta1", - "title": "Cloud Billing Budget API", - "description": "The Cloud Billing Budget API stores Cloud Billing budgets, which define a budget plan and the rules to execute as spend is tracked against that plan.", - "discoveryRestUrl": "https://billingbudgets.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/billing/docs/how-to/budget-api-overview", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "billingbudgets:v1", - "name": "billingbudgets", - "version": "v1", - "title": "Cloud Billing Budget API", - "description": "The Cloud Billing Budget API stores Cloud Billing budgets, which define a budget plan and the rules to execute as spend is tracked against that plan.", - "discoveryRestUrl": "https://billingbudgets.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/billing/docs/how-to/budget-api-overview", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "binaryauthorization:v1beta1", - "name": "binaryauthorization", - "version": "v1beta1", - "title": "Binary Authorization API", - "description": "The management interface for Binary Authorization, a service that provides policy-based deployment validation and control for images deployed to Google Kubernetes Engine (GKE), Anthos Service Mesh, Anthos Clusters, and Cloud Run.", - "discoveryRestUrl": "https://binaryauthorization.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/binary-authorization/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "binaryauthorization:v1", - "name": "binaryauthorization", - "version": "v1", - "title": "Binary Authorization API", - "description": "The management interface for Binary Authorization, a service that provides policy-based deployment validation and control for images deployed to Google Kubernetes Engine (GKE), Anthos Service Mesh, Anthos Clusters, and Cloud Run.", - "discoveryRestUrl": "https://binaryauthorization.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/binary-authorization/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "blogger:v2", - "name": "blogger", - "version": "v2", - "title": "Blogger API v3", - "description": "The Blogger API provides access to posts, comments and pages of a Blogger blog.", - "discoveryRestUrl": "https://blogger.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/blogger/docs/3.0/getting_started", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "blogger:v3", - "name": "blogger", - "version": "v3", - "title": "Blogger API v3", - "description": "The Blogger API provides access to posts, comments and pages of a Blogger blog.", - "discoveryRestUrl": "https://blogger.googleapis.com/$discovery/rest?version=v3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/blogger/docs/3.0/getting_started", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "books:v1", - "name": "books", - "version": "v1", - "title": "Books API", - "description": "The Google Books API allows clients to access the Google Books repository.", - "discoveryRestUrl": "https://books.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://code.google.com/apis/books/docs/v1/getting_started.html", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "calendar:v3", - "name": "calendar", - "version": "v3", - "title": "Google Calendar API", - "description": "The Google Calendar API lets you manage your calendars and events.", - "discoveryRestUrl": "https://calendar-json.googleapis.com/$discovery/rest?version=v3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "http://code.google.com/apis/calendar/v3/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "certificatemanager:v1", - "name": "certificatemanager", - "version": "v1", - "title": "Certificate Manager API", - "description": "", - "discoveryRestUrl": "https://certificatemanager.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/certificate-manager", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "chat:v1", - "name": "chat", - "version": "v1", - "title": "Google Chat API", - "description": "Enables bots to fetch information and perform actions in Google Chat. Authentication using a service account is a prerequisite for using the Google Chat REST API.", - "discoveryRestUrl": "https://chat.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/hangouts/chat", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "chromemanagement:v1", - "name": "chromemanagement", - "version": "v1", - "title": "Chrome Management API", - "description": "The Chrome Management API is a suite of services that allows Chrome administrators to view, manage and gain insights on their Chrome OS and Chrome Browser devices.", - "discoveryRestUrl": "https://chromemanagement.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "http://developers.google.com/chrome/management/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "chromepolicy:v1", - "name": "chromepolicy", - "version": "v1", - "title": "Chrome Policy API", - "description": "The Chrome Policy API is a suite of services that allows Chrome administrators to control the policies applied to their managed Chrome OS devices and Chrome browsers.", - "discoveryRestUrl": "https://chromepolicy.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "http://developers.google.com/chrome/policy", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "chromeuxreport:v1", - "name": "chromeuxreport", - "version": "v1", - "title": "Chrome UX Report API", - "description": "The Chrome UX Report API lets you view real user experience data for millions of websites.", - "discoveryRestUrl": "https://chromeuxreport.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/web/tools/chrome-user-experience-report/api/reference", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "civicinfo:v2", - "name": "civicinfo", - "version": "v2", - "title": "Google Civic Information API", - "description": "Provides polling places, early vote locations, contest data, election officials, and government representatives for U.S. residential addresses.", - "discoveryRestUrl": "https://civicinfo.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/civic-information/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "classroom:v1", - "name": "classroom", - "version": "v1", - "title": "Google Classroom API", - "description": "Manages classes, rosters, and invitations in Google Classroom.", - "discoveryRestUrl": "https://classroom.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/classroom", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudasset:v1p1beta1", - "name": "cloudasset", - "version": "v1p1beta1", - "title": "Cloud Asset API", - "description": "The cloud asset API manages the history and inventory of cloud resources.", - "discoveryRestUrl": "https://cloudasset.googleapis.com/$discovery/rest?version=v1p1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/asset-inventory/docs/quickstart", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudasset:v1p4beta1", - "name": "cloudasset", - "version": "v1p4beta1", - "title": "Cloud Asset API", - "description": "The cloud asset API manages the history and inventory of cloud resources.", - "discoveryRestUrl": "https://cloudasset.googleapis.com/$discovery/rest?version=v1p4beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/asset-inventory/docs/quickstart", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudasset:v1p5beta1", - "name": "cloudasset", - "version": "v1p5beta1", - "title": "Cloud Asset API", - "description": "The cloud asset API manages the history and inventory of cloud resources.", - "discoveryRestUrl": "https://cloudasset.googleapis.com/$discovery/rest?version=v1p5beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/asset-inventory/docs/quickstart", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudasset:v1p7beta1", - "name": "cloudasset", - "version": "v1p7beta1", - "title": "Cloud Asset API", - "description": "The cloud asset API manages the history and inventory of cloud resources.", - "discoveryRestUrl": "https://cloudasset.googleapis.com/$discovery/rest?version=v1p7beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/asset-inventory/docs/quickstart", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudasset:v1beta1", - "name": "cloudasset", - "version": "v1beta1", - "title": "Cloud Asset API", - "description": "The cloud asset API manages the history and inventory of cloud resources.", - "discoveryRestUrl": "https://cloudasset.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/asset-inventory/docs/quickstart", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudasset:v1", - "name": "cloudasset", - "version": "v1", - "title": "Cloud Asset API", - "description": "The cloud asset API manages the history and inventory of cloud resources.", - "discoveryRestUrl": "https://cloudasset.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/asset-inventory/docs/quickstart", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudbilling:v1", - "name": "cloudbilling", - "version": "v1", - "title": "Cloud Billing API", - "description": "Allows developers to manage billing for their Google Cloud Platform projects programmatically.", - "discoveryRestUrl": "https://cloudbilling.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/billing/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudbuild:v1alpha1", - "name": "cloudbuild", - "version": "v1alpha1", - "title": "Cloud Build API", - "description": "Creates and manages builds on Google Cloud Platform.", - "discoveryRestUrl": "https://cloudbuild.googleapis.com/$discovery/rest?version=v1alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/cloud-build/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudbuild:v1alpha2", - "name": "cloudbuild", - "version": "v1alpha2", - "title": "Cloud Build API", - "description": "Creates and manages builds on Google Cloud Platform.", - "discoveryRestUrl": "https://cloudbuild.googleapis.com/$discovery/rest?version=v1alpha2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/cloud-build/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudbuild:v1beta1", - "name": "cloudbuild", - "version": "v1beta1", - "title": "Cloud Build API", - "description": "Creates and manages builds on Google Cloud Platform.", - "discoveryRestUrl": "https://cloudbuild.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/cloud-build/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudbuild:v1", - "name": "cloudbuild", - "version": "v1", - "title": "Cloud Build API", - "description": "Creates and manages builds on Google Cloud Platform.", - "discoveryRestUrl": "https://cloudbuild.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/cloud-build/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudchannel:v1", - "name": "cloudchannel", - "version": "v1", - "title": "Cloud Channel API", - "description": "The Cloud Channel API enables Google Cloud partners to have a single unified resale platform and APIs across all of Google Cloud including GCP, Workspace, Maps and Chrome.", - "discoveryRestUrl": "https://cloudchannel.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/channel", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "clouddebugger:v2", - "name": "clouddebugger", - "version": "v2", - "title": "Cloud Debugger API", - "description": "Examines the call stack and variables of a running application without stopping or slowing it down.", - "discoveryRestUrl": "https://clouddebugger.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/debugger", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "clouddeploy:v1", - "name": "clouddeploy", - "version": "v1", - "title": "Google Cloud Deploy API", - "description": "", - "discoveryRestUrl": "https://clouddeploy.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/deploy/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "clouderrorreporting:v1beta1", - "name": "clouderrorreporting", - "version": "v1beta1", - "title": "Error Reporting API", - "description": "Groups and counts similar errors from cloud services and applications, reports new errors, and provides access to error groups and their associated errors.", - "discoveryRestUrl": "https://clouderrorreporting.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/error-reporting/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudfunctions:v2alpha", - "name": "cloudfunctions", - "version": "v2alpha", - "title": "Cloud Functions API", - "description": "Manages lightweight user-provided functions executed in response to events.", - "discoveryRestUrl": "https://cloudfunctions.googleapis.com/$discovery/rest?version=v2alpha", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/functions", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudfunctions:v2beta", - "name": "cloudfunctions", - "version": "v2beta", - "title": "Cloud Functions API", - "description": "Manages lightweight user-provided functions executed in response to events.", - "discoveryRestUrl": "https://cloudfunctions.googleapis.com/$discovery/rest?version=v2beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/functions", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudfunctions:v1", - "name": "cloudfunctions", - "version": "v1", - "title": "Cloud Functions API", - "description": "Manages lightweight user-provided functions executed in response to events.", - "discoveryRestUrl": "https://cloudfunctions.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/functions", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudidentity:v1beta1", - "name": "cloudidentity", - "version": "v1beta1", - "title": "Cloud Identity API", - "description": "API for provisioning and managing identity resources.", - "discoveryRestUrl": "https://cloudidentity.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/identity/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudidentity:v1", - "name": "cloudidentity", - "version": "v1", - "title": "Cloud Identity API", - "description": "API for provisioning and managing identity resources.", - "discoveryRestUrl": "https://cloudidentity.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/identity/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudiot:v1", - "name": "cloudiot", - "version": "v1", - "title": "Cloud IoT API", - "description": "Registers and manages IoT (Internet of Things) devices that connect to the Google Cloud Platform.", - "discoveryRestUrl": "https://cloudiot.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/iot", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudkms:v1", - "name": "cloudkms", - "version": "v1", - "title": "Cloud Key Management Service (KMS) API", - "description": "Manages keys and performs cryptographic operations in a central cloud service, for direct use by other cloud resources and applications.", - "discoveryRestUrl": "https://cloudkms.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/kms/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudprofiler:v2", - "name": "cloudprofiler", - "version": "v2", - "title": "Stackdriver Profiler API", - "description": "Manages continuous profiling information.", - "discoveryRestUrl": "https://cloudprofiler.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/profiler/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudresourcemanager:v1beta1", - "name": "cloudresourcemanager", - "version": "v1beta1", - "title": "Cloud Resource Manager API", - "description": "Creates, reads, and updates metadata for Google Cloud Platform resource containers.", - "discoveryRestUrl": "https://cloudresourcemanager.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/resource-manager", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudresourcemanager:v2beta1", - "name": "cloudresourcemanager", - "version": "v2beta1", - "title": "Cloud Resource Manager API", - "description": "Creates, reads, and updates metadata for Google Cloud Platform resource containers.", - "discoveryRestUrl": "https://cloudresourcemanager.googleapis.com/$discovery/rest?version=v2beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/resource-manager", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudresourcemanager:v1", - "name": "cloudresourcemanager", - "version": "v1", - "title": "Cloud Resource Manager API", - "description": "Creates, reads, and updates metadata for Google Cloud Platform resource containers.", - "discoveryRestUrl": "https://cloudresourcemanager.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/resource-manager", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudresourcemanager:v2", - "name": "cloudresourcemanager", - "version": "v2", - "title": "Cloud Resource Manager API", - "description": "Creates, reads, and updates metadata for Google Cloud Platform resource containers.", - "discoveryRestUrl": "https://cloudresourcemanager.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/resource-manager", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudresourcemanager:v3", - "name": "cloudresourcemanager", - "version": "v3", - "title": "Cloud Resource Manager API", - "description": "Creates, reads, and updates metadata for Google Cloud Platform resource containers.", - "discoveryRestUrl": "https://cloudresourcemanager.googleapis.com/$discovery/rest?version=v3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/resource-manager", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudscheduler:v1beta1", - "name": "cloudscheduler", - "version": "v1beta1", - "title": "Cloud Scheduler API", - "description": "Creates and manages jobs run on a regular recurring schedule.", - "discoveryRestUrl": "https://cloudscheduler.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/scheduler/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudscheduler:v1", - "name": "cloudscheduler", - "version": "v1", - "title": "Cloud Scheduler API", - "description": "Creates and manages jobs run on a regular recurring schedule.", - "discoveryRestUrl": "https://cloudscheduler.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/scheduler/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudsearch:v1", - "name": "cloudsearch", - "version": "v1", - "title": "Cloud Search API", - "description": "Cloud Search provides cloud-based search capabilities over Google Workspace data. The Cloud Search API allows indexing of non-Google Workspace data into Cloud Search.", - "discoveryRestUrl": "https://cloudsearch.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/cloud-search/docs/guides/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudshell:v1", - "name": "cloudshell", - "version": "v1", - "title": "Cloud Shell API", - "description": "Allows users to start, configure, and connect to interactive shell sessions running in the cloud.", - "discoveryRestUrl": "https://cloudshell.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/shell/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudsupport:v2beta", - "name": "cloudsupport", - "version": "v2beta", - "title": "Google Cloud Support API", - "description": "Manages Google Cloud technical support cases for Customer Care support offerings.", - "discoveryRestUrl": "https://cloudsupport.googleapis.com/$discovery/rest?version=v2beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/support/docs/apis", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudtasks:v2beta2", - "name": "cloudtasks", - "version": "v2beta2", - "title": "Cloud Tasks API", - "description": "Manages the execution of large numbers of distributed requests.", - "discoveryRestUrl": "https://cloudtasks.googleapis.com/$discovery/rest?version=v2beta2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/tasks/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudtasks:v2beta3", - "name": "cloudtasks", - "version": "v2beta3", - "title": "Cloud Tasks API", - "description": "Manages the execution of large numbers of distributed requests.", - "discoveryRestUrl": "https://cloudtasks.googleapis.com/$discovery/rest?version=v2beta3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/tasks/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudtasks:v2", - "name": "cloudtasks", - "version": "v2", - "title": "Cloud Tasks API", - "description": "Manages the execution of large numbers of distributed requests.", - "discoveryRestUrl": "https://cloudtasks.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/tasks/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "cloudtrace:v2beta1", - "name": "cloudtrace", - "version": "v2beta1", - "title": "Cloud Trace API", - "description": "Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Cloud Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenTelemetry.", - "discoveryRestUrl": "https://cloudtrace.googleapis.com/$discovery/rest?version=v2beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/trace", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudtrace:v1", - "name": "cloudtrace", - "version": "v1", - "title": "Cloud Trace API", - "description": "Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Cloud Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenTelemetry.", - "discoveryRestUrl": "https://cloudtrace.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/trace", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "cloudtrace:v2", - "name": "cloudtrace", - "version": "v2", - "title": "Cloud Trace API", - "description": "Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Cloud Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenTelemetry.", - "discoveryRestUrl": "https://cloudtrace.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/trace", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "composer:v1beta1", - "name": "composer", - "version": "v1beta1", - "title": "Cloud Composer API", - "description": "Manages Apache Airflow environments on Google Cloud Platform.", - "discoveryRestUrl": "https://composer.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/composer/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "composer:v1", - "name": "composer", - "version": "v1", - "title": "Cloud Composer API", - "description": "Manages Apache Airflow environments on Google Cloud Platform.", - "discoveryRestUrl": "https://composer.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/composer/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "compute:alpha", - "name": "compute", - "version": "alpha", - "title": "Compute Engine API", - "description": "Creates and runs virtual machines on Google Cloud Platform.", - "discoveryRestUrl": "https://www.googleapis.com/discovery/v1/apis/compute/alpha/rest", - "discoveryLink": "./apis/compute/alpha/rest", - "icons": { - "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", - "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" - }, - "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "compute:beta", - "name": "compute", - "version": "beta", - "title": "Compute Engine API", - "description": "Creates and runs virtual machines on Google Cloud Platform.", - "discoveryRestUrl": "https://www.googleapis.com/discovery/v1/apis/compute/beta/rest", - "discoveryLink": "./apis/compute/beta/rest", - "icons": { - "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", - "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" - }, - "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "compute:v1", - "name": "compute", - "version": "v1", - "title": "Compute Engine API", - "description": "Creates and runs virtual machines on Google Cloud Platform.", - "discoveryRestUrl": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", - "discoveryLink": "./apis/compute/v1/rest", - "icons": { - "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", - "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" - }, - "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "connectors:v1", - "name": "connectors", - "version": "v1", - "title": "Connectors API", - "description": "Enables users to create and manage connections to Google Cloud services and third-party business applications using the Connectors interface.", - "discoveryRestUrl": "https://connectors.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/apigee/docs/api-platform/connectors/about-connectors", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "contactcenterinsights:v1", - "name": "contactcenterinsights", - "version": "v1", - "title": "Contact Center AI Insights API", - "description": "", - "discoveryRestUrl": "https://contactcenterinsights.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/contact-center/insights/docs", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "container:v1beta1", - "name": "container", - "version": "v1beta1", - "title": "Kubernetes Engine API", - "description": "Builds and manages container-based applications, powered by the open source Kubernetes technology.", - "discoveryRestUrl": "https://container.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/container-engine/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "container:v1", - "name": "container", - "version": "v1", - "title": "Kubernetes Engine API", - "description": "Builds and manages container-based applications, powered by the open source Kubernetes technology.", - "discoveryRestUrl": "https://container.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/container-engine/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "containeranalysis:v1alpha1", - "name": "containeranalysis", - "version": "v1alpha1", - "title": "Container Analysis API", - "description": "An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts.", - "discoveryRestUrl": "https://containeranalysis.googleapis.com/$discovery/rest?version=v1alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/container-analysis/api/reference/rest/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "containeranalysis:v1beta1", - "name": "containeranalysis", - "version": "v1beta1", - "title": "Container Analysis API", - "description": "An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts.", - "discoveryRestUrl": "https://containeranalysis.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/container-analysis/api/reference/rest/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "containeranalysis:v1", - "name": "containeranalysis", - "version": "v1", - "title": "Container Analysis API", - "description": "An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts.", - "discoveryRestUrl": "https://containeranalysis.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/container-analysis/api/reference/rest/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "content:v2", - "name": "content", - "version": "v2", - "title": "Content API for Shopping", - "description": "Manage your product listings and accounts for Google Shopping", - "discoveryRestUrl": "https://shoppingcontent.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/shopping-content/v2/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "content:v2.1", - "name": "content", - "version": "v2.1", - "title": "Content API for Shopping", - "description": "Manage your product listings and accounts for Google Shopping", - "discoveryRestUrl": "https://shoppingcontent.googleapis.com/$discovery/rest?version=v2.1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/shopping-content/v2/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "customsearch:v1", - "name": "customsearch", - "version": "v1", - "title": "Custom Search API", - "description": "Searches over a website or collection of websites", - "discoveryRestUrl": "https://customsearch.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/custom-search/v1/introduction", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "datacatalog:v1beta1", - "name": "datacatalog", - "version": "v1beta1", - "title": "Google Cloud Data Catalog API", - "description": "A fully managed and highly scalable data discovery and metadata management service.", - "discoveryRestUrl": "https://datacatalog.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/data-catalog/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "datacatalog:v1", - "name": "datacatalog", - "version": "v1", - "title": "Google Cloud Data Catalog API", - "description": "A fully managed and highly scalable data discovery and metadata management service.", - "discoveryRestUrl": "https://datacatalog.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/data-catalog/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "dataflow:v1b3", - "name": "dataflow", - "version": "v1b3", - "title": "Dataflow API", - "description": "Manages Google Cloud Dataflow projects on Google Cloud Platform.", - "discoveryRestUrl": "https://dataflow.googleapis.com/$discovery/rest?version=v1b3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/dataflow", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "datafusion:v1beta1", - "name": "datafusion", - "version": "v1beta1", - "title": "Cloud Data Fusion API", - "description": "Cloud Data Fusion is a fully-managed, cloud native, enterprise data integration service for quickly building and managing data pipelines. It provides a graphical interface to increase time efficiency and reduce complexity, and allows business users, developers, and data scientists to easily and reliably build scalable data integration solutions to cleanse, prepare, blend, transfer and transform data without having to wrestle with infrastructure.", - "discoveryRestUrl": "https://datafusion.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/data-fusion/docs", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "datafusion:v1", - "name": "datafusion", - "version": "v1", - "title": "Cloud Data Fusion API", - "description": "Cloud Data Fusion is a fully-managed, cloud native, enterprise data integration service for quickly building and managing data pipelines. It provides a graphical interface to increase time efficiency and reduce complexity, and allows business users, developers, and data scientists to easily and reliably build scalable data integration solutions to cleanse, prepare, blend, transfer and transform data without having to wrestle with infrastructure.", - "discoveryRestUrl": "https://datafusion.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/data-fusion/docs", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "datalabeling:v1beta1", - "name": "datalabeling", - "version": "v1beta1", - "title": "Data Labeling API", - "description": "Public API for Google Cloud AI Data Labeling Service.", - "discoveryRestUrl": "https://datalabeling.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/data-labeling/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "datamigration:v1beta1", - "name": "datamigration", - "version": "v1beta1", - "title": "Database Migration API", - "description": "Manage Cloud Database Migration Service resources on Google Cloud Platform.", - "discoveryRestUrl": "https://datamigration.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/database-migration/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "datamigration:v1", - "name": "datamigration", - "version": "v1", - "title": "Database Migration API", - "description": "Manage Cloud Database Migration Service resources on Google Cloud Platform.", - "discoveryRestUrl": "https://datamigration.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/database-migration/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "datapipelines:v1", - "name": "datapipelines", - "version": "v1", - "title": "Data pipelines API", - "description": "Data Pipelines provides an interface for creating, updating, and managing recurring Data Analytics jobs.", - "discoveryRestUrl": "https://datapipelines.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/dataflow/docs/guides/data-pipelines", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "dataplex:v1", - "name": "dataplex", - "version": "v1", - "title": "Cloud Dataplex API", - "description": "Dataplex API is used to manage the lifecycle of data lakes.", - "discoveryRestUrl": "https://dataplex.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/dataplex/docs", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "dataproc:v1", - "name": "dataproc", - "version": "v1", - "title": "Cloud Dataproc API", - "description": "Manages Hadoop-based clusters and jobs on Google Cloud Platform.", - "discoveryRestUrl": "https://dataproc.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/dataproc/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "datastore:v1beta1", - "name": "datastore", - "version": "v1beta1", - "title": "Cloud Datastore API", - "description": "Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.", - "discoveryRestUrl": "https://datastore.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/datastore/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "datastore:v1beta3", - "name": "datastore", - "version": "v1beta3", - "title": "Cloud Datastore API", - "description": "Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.", - "discoveryRestUrl": "https://datastore.googleapis.com/$discovery/rest?version=v1beta3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/datastore/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "datastore:v1", - "name": "datastore", - "version": "v1", - "title": "Cloud Datastore API", - "description": "Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.", - "discoveryRestUrl": "https://datastore.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/datastore/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "datastream:v1alpha1", - "name": "datastream", - "version": "v1alpha1", - "title": "Datastream API", - "description": "", - "discoveryRestUrl": "https://datastream.googleapis.com/$discovery/rest?version=v1alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/datastream/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "datastream:v1", - "name": "datastream", - "version": "v1", - "title": "Datastream API", - "description": "", - "discoveryRestUrl": "https://datastream.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/datastream/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "deploymentmanager:alpha", - "name": "deploymentmanager", - "version": "alpha", - "title": "Cloud Deployment Manager V2 API", - "description": "The Google Cloud Deployment Manager v2 API provides services for configuring, deploying, and viewing Google Cloud services and APIs via templates which specify deployments of Cloud resources.", - "discoveryRestUrl": "https://deploymentmanager.googleapis.com/$discovery/rest?version=alpha", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/deployment-manager", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "deploymentmanager:v2beta", - "name": "deploymentmanager", - "version": "v2beta", - "title": "Cloud Deployment Manager V2 API", - "description": "The Google Cloud Deployment Manager v2 API provides services for configuring, deploying, and viewing Google Cloud services and APIs via templates which specify deployments of Cloud resources.", - "discoveryRestUrl": "https://deploymentmanager.googleapis.com/$discovery/rest?version=v2beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/deployment-manager", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "deploymentmanager:v2", - "name": "deploymentmanager", - "version": "v2", - "title": "Cloud Deployment Manager V2 API", - "description": "The Google Cloud Deployment Manager v2 API provides services for configuring, deploying, and viewing Google Cloud services and APIs via templates which specify deployments of Cloud resources.", - "discoveryRestUrl": "https://deploymentmanager.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/deployment-manager", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "dfareporting:v3.3", - "name": "dfareporting", - "version": "v3.3", - "title": "Campaign Manager 360 API", - "description": "Build applications to efficiently manage large or complex trafficking, reporting, and attribution workflows for Campaign Manager 360.", - "discoveryRestUrl": "https://dfareporting.googleapis.com/$discovery/rest?version=v3.3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/doubleclick-advertisers/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "dfareporting:v3.4", - "name": "dfareporting", - "version": "v3.4", - "title": "Campaign Manager 360 API", - "description": "Build applications to efficiently manage large or complex trafficking, reporting, and attribution workflows for Campaign Manager 360.", - "discoveryRestUrl": "https://dfareporting.googleapis.com/$discovery/rest?version=v3.4", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/doubleclick-advertisers/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "dfareporting:v3.5", - "name": "dfareporting", - "version": "v3.5", - "title": "Campaign Manager 360 API", - "description": "Build applications to efficiently manage large or complex trafficking, reporting, and attribution workflows for Campaign Manager 360.", - "discoveryRestUrl": "https://dfareporting.googleapis.com/$discovery/rest?version=v3.5", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/doubleclick-advertisers/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "dialogflow:v2beta1", - "name": "dialogflow", - "version": "v2beta1", - "title": "Dialogflow API", - "description": "Builds conversational interfaces (for example, chatbots, and voice-powered apps and devices).", - "discoveryRestUrl": "https://dialogflow.googleapis.com/$discovery/rest?version=v2beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/dialogflow/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "dialogflow:v3beta1", - "name": "dialogflow", - "version": "v3beta1", - "title": "Dialogflow API", - "description": "Builds conversational interfaces (for example, chatbots, and voice-powered apps and devices).", - "discoveryRestUrl": "https://dialogflow.googleapis.com/$discovery/rest?version=v3beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/dialogflow/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "dialogflow:v2", - "name": "dialogflow", - "version": "v2", - "title": "Dialogflow API", - "description": "Builds conversational interfaces (for example, chatbots, and voice-powered apps and devices).", - "discoveryRestUrl": "https://dialogflow.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/dialogflow/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "dialogflow:v3", - "name": "dialogflow", - "version": "v3", - "title": "Dialogflow API", - "description": "Builds conversational interfaces (for example, chatbots, and voice-powered apps and devices).", - "discoveryRestUrl": "https://dialogflow.googleapis.com/$discovery/rest?version=v3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/dialogflow/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "digitalassetlinks:v1", - "name": "digitalassetlinks", - "version": "v1", - "title": "Digital Asset Links API", - "description": "Discovers relationships between online assets such as websites or mobile apps.", - "discoveryRestUrl": "https://digitalassetlinks.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/digital-asset-links/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "discovery:v1", - "name": "discovery", - "version": "v1", - "title": "API Discovery Service", - "description": "Google API Discovery Service allows service consumers to list the discovery metadata of all public APIs managed by the API Platform.", - "discoveryRestUrl": "https://discovery.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/discovery", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "displayvideo:v1", - "name": "displayvideo", - "version": "v1", - "title": "Display & Video 360 API", - "description": "Display & Video 360 API allows users to automate complex Display & Video 360 workflows, such as creating insertion orders and setting targeting options for individual line items.", - "discoveryRestUrl": "https://displayvideo.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/display-video/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "dlp:v2", - "name": "dlp", - "version": "v2", - "title": "Cloud Data Loss Prevention (DLP) API", - "description": "Provides methods for detection, risk analysis, and de-identification of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories.", - "discoveryRestUrl": "https://dlp.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/dlp/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "dns:v1beta2", - "name": "dns", - "version": "v1beta2", - "title": "Cloud DNS API", - "description": "", - "discoveryRestUrl": "https://dns.googleapis.com/$discovery/rest?version=v1beta2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/dns/docs", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "dns:v1", - "name": "dns", - "version": "v1", - "title": "Cloud DNS API", - "description": "", - "discoveryRestUrl": "https://dns.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/dns/docs", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "dns:v2", - "name": "dns", - "version": "v2", - "title": "Cloud DNS API", - "description": "", - "discoveryRestUrl": "https://dns.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/dns/docs", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "docs:v1", - "name": "docs", - "version": "v1", - "title": "Google Docs API", - "description": "Reads and writes Google Docs documents.", - "discoveryRestUrl": "https://docs.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "documentai:v1beta2", - "name": "documentai", - "version": "v1beta2", - "title": "Cloud Document AI API", - "description": "Service to parse structured information from unstructured or semi-structured documents using state-of-the-art Google AI such as natural language, computer vision, translation, and AutoML.", - "discoveryRestUrl": "https://documentai.googleapis.com/$discovery/rest?version=v1beta2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/document-ai/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "documentai:v1beta3", - "name": "documentai", - "version": "v1beta3", - "title": "Cloud Document AI API", - "description": "Service to parse structured information from unstructured or semi-structured documents using state-of-the-art Google AI such as natural language, computer vision, translation, and AutoML.", - "discoveryRestUrl": "https://documentai.googleapis.com/$discovery/rest?version=v1beta3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/document-ai/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "documentai:v1", - "name": "documentai", - "version": "v1", - "title": "Cloud Document AI API", - "description": "Service to parse structured information from unstructured or semi-structured documents using state-of-the-art Google AI such as natural language, computer vision, translation, and AutoML.", - "discoveryRestUrl": "https://documentai.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/document-ai/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "domains:v1alpha2", - "name": "domains", - "version": "v1alpha2", - "title": "Cloud Domains API", - "description": "Enables management and configuration of domain names.", - "discoveryRestUrl": "https://domains.googleapis.com/$discovery/rest?version=v1alpha2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/domains/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "domains:v1beta1", - "name": "domains", - "version": "v1beta1", - "title": "Cloud Domains API", - "description": "Enables management and configuration of domain names.", - "discoveryRestUrl": "https://domains.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/domains/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "domains:v1", - "name": "domains", - "version": "v1", - "title": "Cloud Domains API", - "description": "Enables management and configuration of domain names.", - "discoveryRestUrl": "https://domains.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/domains/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "domainsrdap:v1", - "name": "domainsrdap", - "version": "v1", - "title": "Domains RDAP API", - "description": "Read-only public API that lets users search for information about domain names.", - "discoveryRestUrl": "https://domainsrdap.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/domains/rdap/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "doubleclickbidmanager:v1.1", - "name": "doubleclickbidmanager", - "version": "v1.1", - "title": "DoubleClick Bid Manager API", - "description": "DoubleClick Bid Manager API allows users to manage and create campaigns and reports.", - "discoveryRestUrl": "https://doubleclickbidmanager.googleapis.com/$discovery/rest?version=v1.1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/bid-manager/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "doubleclicksearch:v2", - "name": "doubleclicksearch", - "version": "v2", - "title": "Search Ads 360 API", - "description": "The Search Ads 360 API allows developers to automate uploading conversions and downloading reports from Search Ads 360.", - "discoveryRestUrl": "https://doubleclicksearch.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/search-ads", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "drive:v2", - "name": "drive", - "version": "v2", - "title": "Drive API", - "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", - "discoveryRestUrl": "https://www.googleapis.com/discovery/v1/apis/drive/v2/rest", - "discoveryLink": "./apis/drive/v2/rest", - "icons": { - "x16": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_16.png", - "x32": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_32.png" - }, - "documentationLink": "https://developers.google.com/drive/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "drive:v3", - "name": "drive", - "version": "v3", - "title": "Drive API", - "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", - "discoveryRestUrl": "https://www.googleapis.com/discovery/v1/apis/drive/v3/rest", - "discoveryLink": "./apis/drive/v3/rest", - "icons": { - "x16": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_16.png", - "x32": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_32.png" - }, - "documentationLink": "https://developers.google.com/drive/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "driveactivity:v2", - "name": "driveactivity", - "version": "v2", - "title": "Drive Activity API", - "description": "Provides a historical view of activity in Google Drive.", - "discoveryRestUrl": "https://driveactivity.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/drive/activity/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "essentialcontacts:v1", - "name": "essentialcontacts", - "version": "v1", - "title": "Essential Contacts API", - "description": "", - "discoveryRestUrl": "https://essentialcontacts.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/essentialcontacts/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "eventarc:v1beta1", - "name": "eventarc", - "version": "v1beta1", - "title": "Eventarc API", - "description": "", - "discoveryRestUrl": "https://eventarc.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/eventarc", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "eventarc:v1", - "name": "eventarc", - "version": "v1", - "title": "Eventarc API", - "description": "", - "discoveryRestUrl": "https://eventarc.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/eventarc", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "factchecktools:v1alpha1", - "name": "factchecktools", - "version": "v1alpha1", - "title": "Fact Check Tools API", - "description": "", - "discoveryRestUrl": "https://factchecktools.googleapis.com/$discovery/rest?version=v1alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/fact-check/tools/api/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "fcm:v1", - "name": "fcm", - "version": "v1", - "title": "Firebase Cloud Messaging API", - "description": "FCM send API that provides a cross-platform messaging solution to reliably deliver messages at no cost.", - "discoveryRestUrl": "https://fcm.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com/docs/cloud-messaging", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "fcmdata:v1beta1", - "name": "fcmdata", - "version": "v1beta1", - "title": "Firebase Cloud Messaging Data API", - "description": "Provides additional information about Firebase Cloud Messaging (FCM) message sends and deliveries.", - "discoveryRestUrl": "https://fcmdata.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com/docs/cloud-messaging", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "file:v1beta1", - "name": "file", - "version": "v1beta1", - "title": "Cloud Filestore API", - "description": "The Cloud Filestore API is used for creating and managing cloud file servers.", - "discoveryRestUrl": "https://file.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/filestore/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "file:v1", - "name": "file", - "version": "v1", - "title": "Cloud Filestore API", - "description": "The Cloud Filestore API is used for creating and managing cloud file servers.", - "discoveryRestUrl": "https://file.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/filestore/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "firebase:v1beta1", - "name": "firebase", - "version": "v1beta1", - "title": "Firebase Management API", - "description": "The Firebase Management API enables programmatic setup and management of Firebase projects, including a project's Firebase resources and Firebase apps.", - "discoveryRestUrl": "https://firebase.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "firebaseappcheck:v1beta", - "name": "firebaseappcheck", - "version": "v1beta", - "title": "Firebase App Check API", - "description": "Firebase App Check works alongside other Firebase services to help protect your backend resources from abuse, such as billing fraud or phishing.", - "discoveryRestUrl": "https://firebaseappcheck.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com/docs/app-check", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "firebasedatabase:v1beta", - "name": "firebasedatabase", - "version": "v1beta", - "title": "Firebase Realtime Database Management API", - "description": "The Firebase Realtime Database Management API enables programmatic provisioning and management of Realtime Database instances.", - "discoveryRestUrl": "https://firebasedatabase.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com/docs/reference/rest/database/database-management/rest/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "firebasedynamiclinks:v1", - "name": "firebasedynamiclinks", - "version": "v1", - "title": "Firebase Dynamic Links API", - "description": "Programmatically creates and manages Firebase Dynamic Links.", - "discoveryRestUrl": "https://firebasedynamiclinks.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com/docs/dynamic-links/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "firebasehosting:v1beta1", - "name": "firebasehosting", - "version": "v1beta1", - "title": "Firebase Hosting API", - "description": "The Firebase Hosting REST API enables programmatic and customizable management and deployments to your Firebase-hosted sites. Use this REST API to create and manage channels and sites as well as to deploy new or updated hosting configurations and content files.", - "discoveryRestUrl": "https://firebasehosting.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com/docs/hosting/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "firebasehosting:v1", - "name": "firebasehosting", - "version": "v1", - "title": "Firebase Hosting API", - "description": "The Firebase Hosting REST API enables programmatic and customizable management and deployments to your Firebase-hosted sites. Use this REST API to create and manage channels and sites as well as to deploy new or updated hosting configurations and content files.", - "discoveryRestUrl": "https://firebasehosting.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com/docs/hosting/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "firebaseml:v1beta2", - "name": "firebaseml", - "version": "v1beta2", - "title": "Firebase ML API", - "description": "Access custom machine learning models hosted via Firebase ML.", - "discoveryRestUrl": "https://firebaseml.googleapis.com/$discovery/rest?version=v1beta2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "firebaseml:v1", - "name": "firebaseml", - "version": "v1", - "title": "Firebase ML API", - "description": "Access custom machine learning models hosted via Firebase ML.", - "discoveryRestUrl": "https://firebaseml.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "firebaserules:v1", - "name": "firebaserules", - "version": "v1", - "title": "Firebase Rules API", - "description": "Creates and manages rules that determine when a Firebase Rules-enabled service should permit a request.", - "discoveryRestUrl": "https://firebaserules.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com/docs/storage/security", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "firebasestorage:v1beta", - "name": "firebasestorage", - "version": "v1beta", - "title": "Cloud Storage for Firebase API", - "description": "The Cloud Storage for Firebase API enables programmatic management of Cloud Storage buckets for use in Firebase projects", - "discoveryRestUrl": "https://firebasestorage.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com/docs/storage", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "firestore:v1beta1", - "name": "firestore", - "version": "v1beta1", - "title": "Cloud Firestore API", - "description": "Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development.", - "discoveryRestUrl": "https://firestore.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/firestore", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "firestore:v1beta2", - "name": "firestore", - "version": "v1beta2", - "title": "Cloud Firestore API", - "description": "Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development.", - "discoveryRestUrl": "https://firestore.googleapis.com/$discovery/rest?version=v1beta2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/firestore", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "firestore:v1", - "name": "firestore", - "version": "v1", - "title": "Cloud Firestore API", - "description": "Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development.", - "discoveryRestUrl": "https://firestore.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/firestore", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "fitness:v1", - "name": "fitness", - "version": "v1", - "title": "Fitness API", - "description": "The Fitness API for managing users' fitness tracking data.", - "discoveryRestUrl": "https://fitness.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/fit/rest/v1/get-started", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "games:v1", - "name": "games", - "version": "v1", - "title": "Google Play Game Services", - "description": "The Google Play games service allows developers to enhance games with social leaderboards, achievements, game state, sign-in with Google, and more.", - "discoveryRestUrl": "https://games.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/games/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "gamesConfiguration:v1configuration", - "name": "gamesConfiguration", - "version": "v1configuration", - "title": "Google Play Game Services Publishing API", - "description": "The Google Play Game Services Publishing API allows developers to configure their games in Game Services.", - "discoveryRestUrl": "https://gamesconfiguration.googleapis.com/$discovery/rest?version=v1configuration", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/games/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "gamesManagement:v1management", - "name": "gamesManagement", - "version": "v1management", - "title": "Google Play Game Management", - "description": "The Google Play Game Management API allows developers to manage resources from the Google Play Game service.", - "discoveryRestUrl": "https://gamesmanagement.googleapis.com/$discovery/rest?version=v1management", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/games/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "gameservices:v1beta", - "name": "gameservices", - "version": "v1beta", - "title": "Game Services API", - "description": "Deploy and manage infrastructure for global multiplayer gaming experiences.", - "discoveryRestUrl": "https://gameservices.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/solutions/gaming/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "gameservices:v1", - "name": "gameservices", - "version": "v1", - "title": "Game Services API", - "description": "Deploy and manage infrastructure for global multiplayer gaming experiences.", - "discoveryRestUrl": "https://gameservices.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/solutions/gaming/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "genomics:v2alpha1", - "name": "genomics", - "version": "v2alpha1", - "title": "Genomics API", - "description": "Uploads, processes, queries, and searches Genomics data in the cloud.", - "discoveryRestUrl": "https://genomics.googleapis.com/$discovery/rest?version=v2alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/genomics", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "gkehub:v1alpha", - "name": "gkehub", - "version": "v1alpha", - "title": "GKE Hub API", - "description": "", - "discoveryRestUrl": "https://gkehub.googleapis.com/$discovery/rest?version=v1alpha", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "gkehub:v1alpha2", - "name": "gkehub", - "version": "v1alpha2", - "title": "GKE Hub API", - "description": "", - "discoveryRestUrl": "https://gkehub.googleapis.com/$discovery/rest?version=v1alpha2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "gkehub:v2alpha", - "name": "gkehub", - "version": "v2alpha", - "title": "GKE Hub API", - "description": "", - "discoveryRestUrl": "https://gkehub.googleapis.com/$discovery/rest?version=v2alpha", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "gkehub:v1beta", - "name": "gkehub", - "version": "v1beta", - "title": "GKE Hub API", - "description": "", - "discoveryRestUrl": "https://gkehub.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "gkehub:v1beta1", - "name": "gkehub", - "version": "v1beta1", - "title": "GKE Hub API", - "description": "", - "discoveryRestUrl": "https://gkehub.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "gkehub:v1", - "name": "gkehub", - "version": "v1", - "title": "GKE Hub API", - "description": "", - "discoveryRestUrl": "https://gkehub.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "gmail:v1", - "name": "gmail", - "version": "v1", - "title": "Gmail API", - "description": "The Gmail API lets you view and manage Gmail mailbox data like threads, messages, and labels.", - "discoveryRestUrl": "https://gmail.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/gmail/api/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "gmailpostmastertools:v1beta1", - "name": "gmailpostmastertools", - "version": "v1beta1", - "title": "Gmail Postmaster Tools API", - "description": "The Postmaster Tools API is a RESTful API that provides programmatic access to email traffic metrics (like spam reports, delivery errors etc) otherwise available through the Gmail Postmaster Tools UI currently.", - "discoveryRestUrl": "https://gmailpostmastertools.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/gmail/postmaster", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "gmailpostmastertools:v1", - "name": "gmailpostmastertools", - "version": "v1", - "title": "Gmail Postmaster Tools API", - "description": "The Postmaster Tools API is a RESTful API that provides programmatic access to email traffic metrics (like spam reports, delivery errors etc) otherwise available through the Gmail Postmaster Tools UI currently.", - "discoveryRestUrl": "https://gmailpostmastertools.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/gmail/postmaster", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "groupsmigration:v1", - "name": "groupsmigration", - "version": "v1", - "title": "Groups Migration API", - "description": "The Groups Migration API allows domain administrators to archive emails into Google groups.", - "discoveryRestUrl": "https://groupsmigration.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/google-apps/groups-migration/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "groupssettings:v1", - "name": "groupssettings", - "version": "v1", - "title": "Groups Settings API", - "description": "The Groups Settings API allows domain administrators to view and manage access levels and advanced settings for a group.", - "discoveryRestUrl": "https://groupssettings.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/admin-sdk/groups-settings", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "healthcare:v1beta1", - "name": "healthcare", - "version": "v1beta1", - "title": "Cloud Healthcare API", - "description": "Manage, store, and access healthcare data in Google Cloud Platform.", - "discoveryRestUrl": "https://healthcare.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/healthcare", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "healthcare:v1", - "name": "healthcare", - "version": "v1", - "title": "Cloud Healthcare API", - "description": "Manage, store, and access healthcare data in Google Cloud Platform.", - "discoveryRestUrl": "https://healthcare.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/healthcare", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "homegraph:v1", - "name": "homegraph", - "version": "v1", - "title": "HomeGraph API", - "description": "", - "discoveryRestUrl": "https://homegraph.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/actions/smarthome/create-app#request-sync", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "iam:v1", - "name": "iam", - "version": "v1", - "title": "Identity and Access Management (IAM) API", - "description": "Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls.", - "discoveryRestUrl": "https://iam.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/iam/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "iamcredentials:v1", - "name": "iamcredentials", - "version": "v1", - "title": "IAM Service Account Credentials API", - "description": "Creates short-lived credentials for impersonating IAM service accounts. To enable this API, you must enable the IAM API (iam.googleapis.com).", - "discoveryRestUrl": "https://iamcredentials.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "iap:v1beta1", - "name": "iap", - "version": "v1beta1", - "title": "Cloud Identity-Aware Proxy API", - "description": "Controls access to cloud applications running on Google Cloud Platform.", - "discoveryRestUrl": "https://iap.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/iap", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "iap:v1", - "name": "iap", - "version": "v1", - "title": "Cloud Identity-Aware Proxy API", - "description": "Controls access to cloud applications running on Google Cloud Platform.", - "discoveryRestUrl": "https://iap.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/iap", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "ideahub:v1alpha", - "name": "ideahub", - "version": "v1alpha", - "title": "Idea Hub API", - "description": "This is an invitation-only API.", - "discoveryRestUrl": "https://ideahub.googleapis.com/$discovery/rest?version=v1alpha", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://console.cloud.google.com/apis/library/ideahub.googleapis.com", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "ideahub:v1beta", - "name": "ideahub", - "version": "v1beta", - "title": "Idea Hub API", - "description": "This is an invitation-only API.", - "discoveryRestUrl": "https://ideahub.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://console.cloud.google.com/apis/library/ideahub.googleapis.com", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "identitytoolkit:v3", - "name": "identitytoolkit", - "version": "v3", - "title": "Identity Toolkit API", - "description": "The Google Identity Toolkit API lets you use open standards to verify a user's identity.", - "discoveryRestUrl": "https://identitytoolkit.googleapis.com/$discovery/rest?version=v3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com/docs/auth/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "ids:v1", - "name": "ids", - "version": "v1", - "title": "Cloud IDS API", - "description": "Cloud IDS (Cloud Intrusion Detection System) detects malware, spyware, command-and-control attacks, and other network-based threats. Its security efficacy is industry leading, built with Palo Alto Networks technologies. When you use this product, your organization name and consumption levels will be shared with Palo Alto Networks.", - "discoveryRestUrl": "https://ids.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "indexing:v3", - "name": "indexing", - "version": "v3", - "title": "Indexing API", - "description": "Notifies Google when your web pages change.", - "discoveryRestUrl": "https://indexing.googleapis.com/$discovery/rest?version=v3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/search/apis/indexing-api/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "jobs:v3p1beta1", - "name": "jobs", - "version": "v3p1beta1", - "title": "Cloud Talent Solution API", - "description": "Cloud Talent Solution provides the capability to create, read, update, and delete job postings, as well as search jobs based on keywords and filters.", - "discoveryRestUrl": "https://jobs.googleapis.com/$discovery/rest?version=v3p1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/talent-solution/job-search/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "jobs:v3", - "name": "jobs", - "version": "v3", - "title": "Cloud Talent Solution API", - "description": "Cloud Talent Solution provides the capability to create, read, update, and delete job postings, as well as search jobs based on keywords and filters.", - "discoveryRestUrl": "https://jobs.googleapis.com/$discovery/rest?version=v3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/talent-solution/job-search/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "jobs:v4", - "name": "jobs", - "version": "v4", - "title": "Cloud Talent Solution API", - "description": "Cloud Talent Solution provides the capability to create, read, update, and delete job postings, as well as search jobs based on keywords and filters.", - "discoveryRestUrl": "https://jobs.googleapis.com/$discovery/rest?version=v4", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/talent-solution/job-search/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "keep:v1", - "name": "keep", - "version": "v1", - "title": "Google Keep API", - "description": "This API is an enterprise-only API used to create and manage the Keep notes within your domain, including resolving issues identified by CASB software.", - "discoveryRestUrl": "https://keep.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/keep/api", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "kgsearch:v1", - "name": "kgsearch", - "version": "v1", - "title": "Knowledge Graph Search API", - "description": "Searches the Google Knowledge Graph for entities.", - "discoveryRestUrl": "https://kgsearch.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/knowledge-graph/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "language:v1beta1", - "name": "language", - "version": "v1beta1", - "title": "Cloud Natural Language API", - "description": "Provides natural language understanding technologies, such as sentiment analysis, entity recognition, entity sentiment analysis, and other text annotations, to developers.", - "discoveryRestUrl": "https://language.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/natural-language/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "language:v1beta2", - "name": "language", - "version": "v1beta2", - "title": "Cloud Natural Language API", - "description": "Provides natural language understanding technologies, such as sentiment analysis, entity recognition, entity sentiment analysis, and other text annotations, to developers.", - "discoveryRestUrl": "https://language.googleapis.com/$discovery/rest?version=v1beta2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/natural-language/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "language:v1", - "name": "language", - "version": "v1", - "title": "Cloud Natural Language API", - "description": "Provides natural language understanding technologies, such as sentiment analysis, entity recognition, entity sentiment analysis, and other text annotations, to developers.", - "discoveryRestUrl": "https://language.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/natural-language/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "libraryagent:v1", - "name": "libraryagent", - "version": "v1", - "title": "Library Agent API", - "description": "A simple Google Example Library API.", - "discoveryRestUrl": "https://libraryagent.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/docs/quota", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "licensing:v1", - "name": "licensing", - "version": "v1", - "title": "Enterprise License Manager API", - "description": "The Google Enterprise License Manager API's allows you to license apps for all the users of a domain managed by you.", - "discoveryRestUrl": "https://licensing.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/admin-sdk/licensing/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "lifesciences:v2beta", - "name": "lifesciences", - "version": "v2beta", - "title": "Cloud Life Sciences API", - "description": "Cloud Life Sciences is a suite of services and tools for managing, processing, and transforming life sciences data.", - "discoveryRestUrl": "https://lifesciences.googleapis.com/$discovery/rest?version=v2beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/life-sciences", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "localservices:v1", - "name": "localservices", - "version": "v1", - "title": "Local Services API", - "description": "", - "discoveryRestUrl": "https://localservices.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://ads.google.com/local-services-ads/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "logging:v2", - "name": "logging", - "version": "v2", - "title": "Cloud Logging API", - "description": "Writes log entries and manages your Cloud Logging configuration.", - "discoveryRestUrl": "https://logging.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/logging/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "managedidentities:v1alpha1", - "name": "managedidentities", - "version": "v1alpha1", - "title": "Managed Service for Microsoft Active Directory API", - "description": "The Managed Service for Microsoft Active Directory API is used for managing a highly available, hardened service running Microsoft Active Directory (AD).", - "discoveryRestUrl": "https://managedidentities.googleapis.com/$discovery/rest?version=v1alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/managed-microsoft-ad/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "managedidentities:v1beta1", - "name": "managedidentities", - "version": "v1beta1", - "title": "Managed Service for Microsoft Active Directory API", - "description": "The Managed Service for Microsoft Active Directory API is used for managing a highly available, hardened service running Microsoft Active Directory (AD).", - "discoveryRestUrl": "https://managedidentities.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/managed-microsoft-ad/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "managedidentities:v1", - "name": "managedidentities", - "version": "v1", - "title": "Managed Service for Microsoft Active Directory API", - "description": "The Managed Service for Microsoft Active Directory API is used for managing a highly available, hardened service running Microsoft Active Directory (AD).", - "discoveryRestUrl": "https://managedidentities.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/managed-microsoft-ad/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "manufacturers:v1", - "name": "manufacturers", - "version": "v1", - "title": "Manufacturer Center API", - "description": "Public API for managing Manufacturer Center related data.", - "discoveryRestUrl": "https://manufacturers.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/manufacturers/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "memcache:v1beta2", - "name": "memcache", - "version": "v1beta2", - "title": "Cloud Memorystore for Memcached API", - "description": "Google Cloud Memorystore for Memcached API is used for creating and managing Memcached instances in GCP.", - "discoveryRestUrl": "https://memcache.googleapis.com/$discovery/rest?version=v1beta2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/memorystore/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "memcache:v1", - "name": "memcache", - "version": "v1", - "title": "Cloud Memorystore for Memcached API", - "description": "Google Cloud Memorystore for Memcached API is used for creating and managing Memcached instances in GCP.", - "discoveryRestUrl": "https://memcache.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/memorystore/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "metastore:v1alpha", - "name": "metastore", - "version": "v1alpha", - "title": "Dataproc Metastore API", - "description": "The Dataproc Metastore API is used to manage the lifecycle and configuration of metastore services.", - "discoveryRestUrl": "https://metastore.googleapis.com/$discovery/rest?version=v1alpha", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/dataproc-metastore/docs", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "metastore:v1beta", - "name": "metastore", - "version": "v1beta", - "title": "Dataproc Metastore API", - "description": "The Dataproc Metastore API is used to manage the lifecycle and configuration of metastore services.", - "discoveryRestUrl": "https://metastore.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/dataproc-metastore/docs", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "ml:v1", - "name": "ml", - "version": "v1", - "title": "AI Platform Training & Prediction API", - "description": "An API to enable creating and using machine learning models.", - "discoveryRestUrl": "https://ml.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/ml/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "monitoring:v1", - "name": "monitoring", - "version": "v1", - "title": "Cloud Monitoring API", - "description": "Manages your Cloud Monitoring data and configurations.", - "discoveryRestUrl": "https://monitoring.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/monitoring/api/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "monitoring:v3", - "name": "monitoring", - "version": "v3", - "title": "Cloud Monitoring API", - "description": "Manages your Cloud Monitoring data and configurations.", - "discoveryRestUrl": "https://monitoring.googleapis.com/$discovery/rest?version=v3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/monitoring/api/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "mybusinessaccountmanagement:v1", - "name": "mybusinessaccountmanagement", - "version": "v1", - "title": "My Business Account Management API", - "description": "The My Business Account Management API provides an interface for managing access to a location on Google.", - "discoveryRestUrl": "https://mybusinessaccountmanagement.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/my-business/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "mybusinessbusinesscalls:v1", - "name": "mybusinessbusinesscalls", - "version": "v1", - "title": "My Business Business Calls API", - "description": "The My Business Business Calls API manages business calls information of a location on Google.", - "discoveryRestUrl": "https://mybusinessbusinesscalls.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/my-business/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "mybusinessbusinessinformation:v1", - "name": "mybusinessbusinessinformation", - "version": "v1", - "title": "My Business Business Information API", - "description": "The My Business Business Information API provides an interface for managing business information on Google.", - "discoveryRestUrl": "https://mybusinessbusinessinformation.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/my-business/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "mybusinesslodging:v1", - "name": "mybusinesslodging", - "version": "v1", - "title": "My Business Lodging API", - "description": "The My Business Lodging API enables managing lodging business information on Google.", - "discoveryRestUrl": "https://mybusinesslodging.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/my-business/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "mybusinessnotifications:v1", - "name": "mybusinessnotifications", - "version": "v1", - "title": "My Business Notifications API", - "description": "The My Business Notification Settings API enables managing notification settings for business accounts.", - "discoveryRestUrl": "https://mybusinessnotifications.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/my-business/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "mybusinessplaceactions:v1", - "name": "mybusinessplaceactions", - "version": "v1", - "title": "My Business Place Actions API", - "description": "The My Business Place Actions API provides an interface for managing place action links of a location on Google.", - "discoveryRestUrl": "https://mybusinessplaceactions.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/my-business/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "mybusinessqanda:v1", - "name": "mybusinessqanda", - "version": "v1", - "title": "My Business Q&A API", - "description": "The My Business Q&A API allows questions and answers to be posted for specific listings.", - "discoveryRestUrl": "https://mybusinessqanda.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/my-business/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "mybusinessverifications:v1", - "name": "mybusinessverifications", - "version": "v1", - "title": "My Business Verifications API", - "description": "The My Business Verifications API provides an interface for taking verifications related actions for locations.", - "discoveryRestUrl": "https://mybusinessverifications.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/my-business/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "networkconnectivity:v1alpha1", - "name": "networkconnectivity", - "version": "v1alpha1", - "title": "Network Connectivity API", - "description": "The Network Connectivity API provides access to Network Connectivity Center.", - "discoveryRestUrl": "https://networkconnectivity.googleapis.com/$discovery/rest?version=v1alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "networkconnectivity:v1", - "name": "networkconnectivity", - "version": "v1", - "title": "Network Connectivity API", - "description": "The Network Connectivity API provides access to Network Connectivity Center.", - "discoveryRestUrl": "https://networkconnectivity.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "networkmanagement:v1beta1", - "name": "networkmanagement", - "version": "v1beta1", - "title": "Network Management API", - "description": "The Network Management API provides a collection of network performance monitoring and diagnostic capabilities.", - "discoveryRestUrl": "https://networkmanagement.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "networkmanagement:v1", - "name": "networkmanagement", - "version": "v1", - "title": "Network Management API", - "description": "The Network Management API provides a collection of network performance monitoring and diagnostic capabilities.", - "discoveryRestUrl": "https://networkmanagement.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "networksecurity:v1beta1", - "name": "networksecurity", - "version": "v1beta1", - "title": "Network Security API", - "description": "", - "discoveryRestUrl": "https://networksecurity.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/networking", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "networksecurity:v1", - "name": "networksecurity", - "version": "v1", - "title": "Network Security API", - "description": "", - "discoveryRestUrl": "https://networksecurity.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/networking", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "networkservices:v1beta1", - "name": "networkservices", - "version": "v1beta1", - "title": "Network Services API", - "description": "", - "discoveryRestUrl": "https://networkservices.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/networking", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "networkservices:v1", - "name": "networkservices", - "version": "v1", - "title": "Network Services API", - "description": "", - "discoveryRestUrl": "https://networkservices.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/networking", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "notebooks:v1", - "name": "notebooks", - "version": "v1", - "title": "Notebooks API", - "description": "Notebooks API is used to manage notebook resources in Google Cloud.", - "discoveryRestUrl": "https://notebooks.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/notebooks/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "oauth2:v2", - "name": "oauth2", - "version": "v2", - "title": "Google OAuth2 API", - "description": "[Deprecated] Obtains end-user authorization grants for use with other Google APIs.", - "discoveryRestUrl": "https://www.googleapis.com/discovery/v1/apis/oauth2/v2/rest", - "discoveryLink": "./apis/oauth2/v2/rest", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/accounts/docs/OAuth2", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "ondemandscanning:v1beta1", - "name": "ondemandscanning", - "version": "v1beta1", - "title": "On-Demand Scanning API", - "description": "A service to scan container images for vulnerabilities.", - "discoveryRestUrl": "https://ondemandscanning.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/container-analysis/docs/on-demand-scanning/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "ondemandscanning:v1", - "name": "ondemandscanning", - "version": "v1", - "title": "On-Demand Scanning API", - "description": "A service to scan container images for vulnerabilities.", - "discoveryRestUrl": "https://ondemandscanning.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/container-analysis/docs/on-demand-scanning/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "orgpolicy:v2", - "name": "orgpolicy", - "version": "v2", - "title": "Organization Policy API", - "description": "The Org Policy API allows users to configure governance rules on their GCP resources across the Cloud Resource Hierarchy.", - "discoveryRestUrl": "https://orgpolicy.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/orgpolicy/docs/reference/rest/index.html", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "osconfig:v1alpha", - "name": "osconfig", - "version": "v1alpha", - "title": "OS Config API", - "description": "OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.", - "discoveryRestUrl": "https://osconfig.googleapis.com/$discovery/rest?version=v1alpha", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/compute/docs/osconfig/rest", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "osconfig:v1beta", - "name": "osconfig", - "version": "v1beta", - "title": "OS Config API", - "description": "OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.", - "discoveryRestUrl": "https://osconfig.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/compute/docs/osconfig/rest", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "osconfig:v1", - "name": "osconfig", - "version": "v1", - "title": "OS Config API", - "description": "OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.", - "discoveryRestUrl": "https://osconfig.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/compute/docs/osconfig/rest", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "oslogin:v1alpha", - "name": "oslogin", - "version": "v1alpha", - "title": "Cloud OS Login API", - "description": "You can use OS Login to manage access to your VM instances using IAM roles.", - "discoveryRestUrl": "https://oslogin.googleapis.com/$discovery/rest?version=v1alpha", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/compute/docs/oslogin/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "oslogin:v1beta", - "name": "oslogin", - "version": "v1beta", - "title": "Cloud OS Login API", - "description": "You can use OS Login to manage access to your VM instances using IAM roles.", - "discoveryRestUrl": "https://oslogin.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/compute/docs/oslogin/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "oslogin:v1", - "name": "oslogin", - "version": "v1", - "title": "Cloud OS Login API", - "description": "You can use OS Login to manage access to your VM instances using IAM roles.", - "discoveryRestUrl": "https://oslogin.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/compute/docs/oslogin/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "pagespeedonline:v5", - "name": "pagespeedonline", - "version": "v5", - "title": "PageSpeed Insights API", - "description": "The PageSpeed Insights API lets you analyze the performance of your website with a simple API. It offers tailored suggestions for how you can optimize your site, and lets you easily integrate PageSpeed Insights analysis into your development tools and workflow.", - "discoveryRestUrl": "https://pagespeedonline.googleapis.com/$discovery/rest?version=v5", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/speed/docs/insights/v5/about", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "paymentsresellersubscription:v1", - "name": "paymentsresellersubscription", - "version": "v1", - "title": "Payments Reseller Subscription API", - "description": "", - "discoveryRestUrl": "https://paymentsresellersubscription.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/payments/reseller/subscription/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "people:v1", - "name": "people", - "version": "v1", - "title": "People API", - "description": "Provides access to information about profiles and contacts.", - "discoveryRestUrl": "https://people.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/people/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "playcustomapp:v1", - "name": "playcustomapp", - "version": "v1", - "title": "Google Play Custom App Publishing API", - "description": "API to create and publish custom Android apps", - "discoveryRestUrl": "https://playcustomapp.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/android/work/play/custom-app-api/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "playintegrity:v1", - "name": "playintegrity", - "version": "v1", - "title": "Google Play Integrity API", - "description": "Play Integrity", - "discoveryRestUrl": "https://playintegrity.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developer.android.com/google/play/integrity", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "policyanalyzer:v1beta1", - "name": "policyanalyzer", - "version": "v1beta1", - "title": "Policy Analyzer API", - "description": "", - "discoveryRestUrl": "https://policyanalyzer.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://www.google.com", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "policyanalyzer:v1", - "name": "policyanalyzer", - "version": "v1", - "title": "Policy Analyzer API", - "description": "", - "discoveryRestUrl": "https://policyanalyzer.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://www.google.com", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "policysimulator:v1beta1", - "name": "policysimulator", - "version": "v1beta1", - "title": "Policy Simulator API", - "description": "Policy Simulator is a collection of endpoints for creating, running, and viewing a [Replay][google.cloud.policysimulator.v1beta1.Replay]. A `Replay` is a type of simulation that lets you see how your members' access to resources might change if you changed your IAM policy. During a `Replay`, Policy Simulator re-evaluates, or replays, past access attempts under both the current policy and your proposed policy, and compares those results to determine how your members' access might change under the proposed policy.", - "discoveryRestUrl": "https://policysimulator.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/iam/docs/simulating-access", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "policysimulator:v1", - "name": "policysimulator", - "version": "v1", - "title": "Policy Simulator API", - "description": "Policy Simulator is a collection of endpoints for creating, running, and viewing a [Replay][google.cloud.policysimulator.v1beta1.Replay]. A `Replay` is a type of simulation that lets you see how your members' access to resources might change if you changed your IAM policy. During a `Replay`, Policy Simulator re-evaluates, or replays, past access attempts under both the current policy and your proposed policy, and compares those results to determine how your members' access might change under the proposed policy.", - "discoveryRestUrl": "https://policysimulator.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/iam/docs/simulating-access", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "policytroubleshooter:v1beta", - "name": "policytroubleshooter", - "version": "v1beta", - "title": "Policy Troubleshooter API", - "description": "", - "discoveryRestUrl": "https://policytroubleshooter.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/iam/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "policytroubleshooter:v1", - "name": "policytroubleshooter", - "version": "v1", - "title": "Policy Troubleshooter API", - "description": "", - "discoveryRestUrl": "https://policytroubleshooter.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/iam/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "poly:v1", - "name": "poly", - "version": "v1", - "title": "Poly API", - "description": "The Poly API provides read access to assets hosted on poly.google.com to all, and upload access to poly.google.com for whitelisted accounts.", - "discoveryRestUrl": "https://poly.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/poly/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "privateca:v1beta1", - "name": "privateca", - "version": "v1beta1", - "title": "Certificate Authority API", - "description": "The Certificate Authority Service API is a highly-available, scalable service that enables you to simplify and automate the management of private certificate authorities (CAs) while staying in control of your private keys.", - "discoveryRestUrl": "https://privateca.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "privateca:v1", - "name": "privateca", - "version": "v1", - "title": "Certificate Authority API", - "description": "The Certificate Authority Service API is a highly-available, scalable service that enables you to simplify and automate the management of private certificate authorities (CAs) while staying in control of your private keys.", - "discoveryRestUrl": "https://privateca.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "prod_tt_sasportal:v1alpha1", - "name": "prod_tt_sasportal", - "version": "v1alpha1", - "title": "SAS Portal API (Testing)", - "description": "", - "discoveryRestUrl": "https://prod-tt-sasportal.googleapis.com/$discovery/rest?version=v1alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/spectrum-access-system/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "pubsub:v1beta1a", - "name": "pubsub", - "version": "v1beta1a", - "title": "Cloud Pub/Sub API", - "description": "Provides reliable, many-to-many, asynchronous messaging between applications.", - "discoveryRestUrl": "https://pubsub.googleapis.com/$discovery/rest?version=v1beta1a", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/pubsub/docs", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "pubsub:v1beta2", - "name": "pubsub", - "version": "v1beta2", - "title": "Cloud Pub/Sub API", - "description": "Provides reliable, many-to-many, asynchronous messaging between applications.", - "discoveryRestUrl": "https://pubsub.googleapis.com/$discovery/rest?version=v1beta2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/pubsub/docs", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "pubsub:v1", - "name": "pubsub", - "version": "v1", - "title": "Cloud Pub/Sub API", - "description": "Provides reliable, many-to-many, asynchronous messaging between applications.", - "discoveryRestUrl": "https://pubsub.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/pubsub/docs", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "pubsublite:v1", - "name": "pubsublite", - "version": "v1", - "title": "Pub/Sub Lite API", - "description": "", - "discoveryRestUrl": "https://pubsublite.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/pubsub/lite/docs", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "realtimebidding:v1alpha", - "name": "realtimebidding", - "version": "v1alpha", - "title": "Real-time Bidding API", - "description": "Allows external bidders to manage their RTB integration with Google. This includes managing bidder endpoints, QPS quotas, configuring what ad inventory to receive via pretargeting, submitting creatives for verification, and accessing creative metadata such as approval status.", - "discoveryRestUrl": "https://realtimebidding.googleapis.com/$discovery/rest?version=v1alpha", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/authorized-buyers/apis/realtimebidding/reference/rest/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "realtimebidding:v1", - "name": "realtimebidding", - "version": "v1", - "title": "Real-time Bidding API", - "description": "Allows external bidders to manage their RTB integration with Google. This includes managing bidder endpoints, QPS quotas, configuring what ad inventory to receive via pretargeting, submitting creatives for verification, and accessing creative metadata such as approval status.", - "discoveryRestUrl": "https://realtimebidding.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/authorized-buyers/apis/realtimebidding/reference/rest/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "recaptchaenterprise:v1", - "name": "recaptchaenterprise", - "version": "v1", - "title": "reCAPTCHA Enterprise API", - "description": "", - "discoveryRestUrl": "https://recaptchaenterprise.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/recaptcha-enterprise/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "recommendationengine:v1beta1", - "name": "recommendationengine", - "version": "v1beta1", - "title": "Recommendations AI (Beta)", - "description": "Note that we now highly recommend new customers to use Retail API, which incorporates the GA version of the Recommendations AI funtionalities. To enable Retail API, please visit https://console.cloud.google.com/apis/library/retail.googleapis.com. The Recommendations AI service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud.", - "discoveryRestUrl": "https://recommendationengine.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/recommendations-ai/docs", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "recommender:v1beta1", - "name": "recommender", - "version": "v1beta1", - "title": "Recommender API", - "description": "", - "discoveryRestUrl": "https://recommender.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/recommender/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "recommender:v1", - "name": "recommender", - "version": "v1", - "title": "Recommender API", - "description": "", - "discoveryRestUrl": "https://recommender.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/recommender/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "redis:v1beta1", - "name": "redis", - "version": "v1beta1", - "title": "Google Cloud Memorystore for Redis API", - "description": "Creates and manages Redis instances on the Google Cloud Platform.", - "discoveryRestUrl": "https://redis.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/memorystore/docs/redis/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "redis:v1", - "name": "redis", - "version": "v1", - "title": "Google Cloud Memorystore for Redis API", - "description": "Creates and manages Redis instances on the Google Cloud Platform.", - "discoveryRestUrl": "https://redis.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/memorystore/docs/redis/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "reseller:v1", - "name": "reseller", - "version": "v1", - "title": "Google Workspace Reseller API", - "description": "Perform common functions that are available on the Channel Services console at scale, like placing orders and viewing customer information", - "discoveryRestUrl": "https://reseller.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/google-apps/reseller/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "resourcesettings:v1", - "name": "resourcesettings", - "version": "v1", - "title": "Resource Settings API", - "description": "The Resource Settings API allows users to control and modify the behavior of their GCP resources (e.g., VM, firewall, Project, etc.) across the Cloud Resource Hierarchy.", - "discoveryRestUrl": "https://resourcesettings.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/resource-manager/docs/resource-settings/overview", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "retail:v2alpha", - "name": "retail", - "version": "v2alpha", - "title": "Retail API", - "description": "Cloud Retail service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud.", - "discoveryRestUrl": "https://retail.googleapis.com/$discovery/rest?version=v2alpha", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/recommendations", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "retail:v2beta", - "name": "retail", - "version": "v2beta", - "title": "Retail API", - "description": "Cloud Retail service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud.", - "discoveryRestUrl": "https://retail.googleapis.com/$discovery/rest?version=v2beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/recommendations", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "retail:v2", - "name": "retail", - "version": "v2", - "title": "Retail API", - "description": "Cloud Retail service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud.", - "discoveryRestUrl": "https://retail.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/recommendations", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "run:v1alpha1", - "name": "run", - "version": "v1alpha1", - "title": "Cloud Run Admin API", - "description": "Deploy and manage user provided container images that scale automatically based on incoming requests. The Cloud Run Admin API v1 follows the Knative Serving API specification, while v2 is aligned with Google Cloud AIP-based API standards, as described in https://google.aip.dev/.", - "discoveryRestUrl": "https://run.googleapis.com/$discovery/rest?version=v1alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/run/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "run:v1", - "name": "run", - "version": "v1", - "title": "Cloud Run Admin API", - "description": "Deploy and manage user provided container images that scale automatically based on incoming requests. The Cloud Run Admin API v1 follows the Knative Serving API specification, while v2 is aligned with Google Cloud AIP-based API standards, as described in https://google.aip.dev/.", - "discoveryRestUrl": "https://run.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/run/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "run:v2", - "name": "run", - "version": "v2", - "title": "Cloud Run Admin API", - "description": "Deploy and manage user provided container images that scale automatically based on incoming requests. The Cloud Run Admin API v1 follows the Knative Serving API specification, while v2 is aligned with Google Cloud AIP-based API standards, as described in https://google.aip.dev/.", - "discoveryRestUrl": "https://run.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/run/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "runtimeconfig:v1beta1", - "name": "runtimeconfig", - "version": "v1beta1", - "title": "Cloud Runtime Configuration API", - "description": "The Runtime Configurator allows you to dynamically configure and expose variables through Google Cloud Platform. In addition, you can also set Watchers and Waiters that will watch for changes to your data and return based on certain conditions.", - "discoveryRestUrl": "https://runtimeconfig.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/deployment-manager/runtime-configurator/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "runtimeconfig:v1", - "name": "runtimeconfig", - "version": "v1", - "title": "Cloud Runtime Configuration API", - "description": "The Runtime Configurator allows you to dynamically configure and expose variables through Google Cloud Platform. In addition, you can also set Watchers and Waiters that will watch for changes to your data and return based on certain conditions.", - "discoveryRestUrl": "https://runtimeconfig.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/deployment-manager/runtime-configurator/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "safebrowsing:v4", - "name": "safebrowsing", - "version": "v4", - "title": "Safe Browsing API", - "description": "Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.", - "discoveryRestUrl": "https://safebrowsing.googleapis.com/$discovery/rest?version=v4", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/safe-browsing/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "sasportal:v1alpha1", - "name": "sasportal", - "version": "v1alpha1", - "title": "SAS Portal API", - "description": "", - "discoveryRestUrl": "https://sasportal.googleapis.com/$discovery/rest?version=v1alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/spectrum-access-system/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "script:v1", - "name": "script", - "version": "v1", - "title": "Apps Script API", - "description": "Manages and executes Google Apps Script projects.", - "discoveryRestUrl": "https://script.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/apps-script/api/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "searchconsole:v1", - "name": "searchconsole", - "version": "v1", - "title": "Google Search Console API", - "description": "The Search Console API provides access to both Search Console data (verified users only) and to public information on an URL basis (anyone)", - "discoveryRestUrl": "https://searchconsole.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/webmaster-tools/search-console-api/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "secretmanager:v1beta1", - "name": "secretmanager", - "version": "v1beta1", - "title": "Secret Manager API", - "description": "Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security.", - "discoveryRestUrl": "https://secretmanager.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/secret-manager/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "secretmanager:v1", - "name": "secretmanager", - "version": "v1", - "title": "Secret Manager API", - "description": "Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security.", - "discoveryRestUrl": "https://secretmanager.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/secret-manager/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "securitycenter:v1beta1", - "name": "securitycenter", - "version": "v1beta1", - "title": "Security Command Center API", - "description": "Security Command Center API provides access to temporal views of assets and findings within an organization.", - "discoveryRestUrl": "https://securitycenter.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/security-command-center", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "securitycenter:v1beta2", - "name": "securitycenter", - "version": "v1beta2", - "title": "Security Command Center API", - "description": "Security Command Center API provides access to temporal views of assets and findings within an organization.", - "discoveryRestUrl": "https://securitycenter.googleapis.com/$discovery/rest?version=v1beta2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/security-command-center", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "securitycenter:v1", - "name": "securitycenter", - "version": "v1", - "title": "Security Command Center API", - "description": "Security Command Center API provides access to temporal views of assets and findings within an organization.", - "discoveryRestUrl": "https://securitycenter.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/security-command-center", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "serviceconsumermanagement:v1beta1", - "name": "serviceconsumermanagement", - "version": "v1beta1", - "title": "Service Consumer Management API", - "description": "Manages the service consumers of a Service Infrastructure service.", - "discoveryRestUrl": "https://serviceconsumermanagement.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/service-consumer-management/docs/overview", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "serviceconsumermanagement:v1", - "name": "serviceconsumermanagement", - "version": "v1", - "title": "Service Consumer Management API", - "description": "Manages the service consumers of a Service Infrastructure service.", - "discoveryRestUrl": "https://serviceconsumermanagement.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/service-consumer-management/docs/overview", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "servicecontrol:v1", - "name": "servicecontrol", - "version": "v1", - "title": "Service Control API", - "description": "Provides admission control and telemetry reporting for services integrated with Service Infrastructure.", - "discoveryRestUrl": "https://servicecontrol.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/service-control/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "servicecontrol:v2", - "name": "servicecontrol", - "version": "v2", - "title": "Service Control API", - "description": "Provides admission control and telemetry reporting for services integrated with Service Infrastructure.", - "discoveryRestUrl": "https://servicecontrol.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/service-control/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "servicedirectory:v1beta1", - "name": "servicedirectory", - "version": "v1beta1", - "title": "Service Directory API", - "description": "Service Directory is a platform for discovering, publishing, and connecting services.", - "discoveryRestUrl": "https://servicedirectory.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/service-directory", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "servicedirectory:v1", - "name": "servicedirectory", - "version": "v1", - "title": "Service Directory API", - "description": "Service Directory is a platform for discovering, publishing, and connecting services.", - "discoveryRestUrl": "https://servicedirectory.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/service-directory", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "servicemanagement:v1", - "name": "servicemanagement", - "version": "v1", - "title": "Service Management API", - "description": "Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers.", - "discoveryRestUrl": "https://servicemanagement.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/service-management/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "servicenetworking:v1beta", - "name": "servicenetworking", - "version": "v1beta", - "title": "Service Networking API", - "description": "Provides automatic management of network configurations necessary for certain services.", - "discoveryRestUrl": "https://servicenetworking.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "servicenetworking:v1", - "name": "servicenetworking", - "version": "v1", - "title": "Service Networking API", - "description": "Provides automatic management of network configurations necessary for certain services.", - "discoveryRestUrl": "https://servicenetworking.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "serviceusage:v1beta1", - "name": "serviceusage", - "version": "v1beta1", - "title": "Service Usage API", - "description": "Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use.", - "discoveryRestUrl": "https://serviceusage.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/service-usage/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "serviceusage:v1", - "name": "serviceusage", - "version": "v1", - "title": "Service Usage API", - "description": "Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use.", - "discoveryRestUrl": "https://serviceusage.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/service-usage/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "sheets:v4", - "name": "sheets", - "version": "v4", - "title": "Google Sheets API", - "description": "Reads and writes Google Sheets.", - "discoveryRestUrl": "https://sheets.googleapis.com/$discovery/rest?version=v4", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/sheets/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "siteVerification:v1", - "name": "siteVerification", - "version": "v1", - "title": "Site Verification API", - "description": "The Google Site Verification API lets applications automate the process of managing ownership records for websites and domains.", - "discoveryRestUrl": "https://siteverification.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://code.google.com/apis/siteverification/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "slides:v1", - "name": "slides", - "version": "v1", - "title": "Google Slides API", - "description": "Reads and writes Google Slides presentations.", - "discoveryRestUrl": "https://slides.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/slides/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "smartdevicemanagement:v1", - "name": "smartdevicemanagement", - "version": "v1", - "title": "Smart Device Management API", - "description": "Allow select enterprise partners to access, control, and manage Google and Nest devices programmatically.", - "discoveryRestUrl": "https://smartdevicemanagement.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/nest/device-access", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "sourcerepo:v1", - "name": "sourcerepo", - "version": "v1", - "title": "Cloud Source Repositories API", - "description": "Accesses source code repositories hosted by Google.", - "discoveryRestUrl": "https://sourcerepo.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/source-repositories/docs/apis", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "spanner:v1", - "name": "spanner", - "version": "v1", - "title": "Cloud Spanner API", - "description": "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service.", - "discoveryRestUrl": "https://spanner.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/spanner/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "speech:v1p1beta1", - "name": "speech", - "version": "v1p1beta1", - "title": "Cloud Speech-to-Text API", - "description": "Converts audio to text by applying powerful neural network models.", - "discoveryRestUrl": "https://speech.googleapis.com/$discovery/rest?version=v1p1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/speech-to-text/docs/quickstart-protocol", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "speech:v2beta1", - "name": "speech", - "version": "v2beta1", - "title": "Cloud Speech-to-Text API", - "description": "Converts audio to text by applying powerful neural network models.", - "discoveryRestUrl": "https://speech.googleapis.com/$discovery/rest?version=v2beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/speech-to-text/docs/quickstart-protocol", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "speech:v1", - "name": "speech", - "version": "v1", - "title": "Cloud Speech-to-Text API", - "description": "Converts audio to text by applying powerful neural network models.", - "discoveryRestUrl": "https://speech.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/speech-to-text/docs/quickstart-protocol", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "sqladmin:v1beta4", - "name": "sqladmin", - "version": "v1beta4", - "title": "Cloud SQL Admin API", - "description": "API for Cloud SQL database instance management", - "discoveryRestUrl": "https://sqladmin.googleapis.com/$discovery/rest?version=v1beta4", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/cloud-sql/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "sqladmin:v1", - "name": "sqladmin", - "version": "v1", - "title": "Cloud SQL Admin API", - "description": "API for Cloud SQL database instance management", - "discoveryRestUrl": "https://sqladmin.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/cloud-sql/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "storage:v1", - "name": "storage", - "version": "v1", - "title": "Cloud Storage API", - "description": "Lets you store and retrieve potentially-large, immutable data objects.", - "discoveryRestUrl": "https://storage.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/storage/docs/json_api/v1/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "storagetransfer:v1", - "name": "storagetransfer", - "version": "v1", - "title": "Storage Transfer API", - "description": "Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets.", - "discoveryRestUrl": "https://storagetransfer.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/storage-transfer/docs", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "streetviewpublish:v1", - "name": "streetviewpublish", - "version": "v1", - "title": "Street View Publish API", - "description": "Publishes 360 photos to Google Maps, along with position, orientation, and connectivity metadata. Apps can offer an interface for positioning, connecting, and uploading user-generated Street View images.", - "discoveryRestUrl": "https://streetviewpublish.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/streetview/publish/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "sts:v1beta", - "name": "sts", - "version": "v1beta", - "title": "Security Token Service API", - "description": "The Security Token Service exchanges Google or third-party credentials for a short-lived access token to Google Cloud resources.", - "discoveryRestUrl": "https://sts.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "http://cloud.google.com/iam/docs/workload-identity-federation", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "sts:v1", - "name": "sts", - "version": "v1", - "title": "Security Token Service API", - "description": "The Security Token Service exchanges Google or third-party credentials for a short-lived access token to Google Cloud resources.", - "discoveryRestUrl": "https://sts.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "http://cloud.google.com/iam/docs/workload-identity-federation", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "tagmanager:v1", - "name": "tagmanager", - "version": "v1", - "title": "Tag Manager API", - "description": "This API allows clients to access and modify container and tag configuration.", - "discoveryRestUrl": "https://tagmanager.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/tag-manager", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "tagmanager:v2", - "name": "tagmanager", - "version": "v2", - "title": "Tag Manager API", - "description": "This API allows clients to access and modify container and tag configuration.", - "discoveryRestUrl": "https://tagmanager.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/tag-manager", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "tasks:v1", - "name": "tasks", - "version": "v1", - "title": "Tasks API", - "description": "The Google Tasks API lets you manage your tasks and task lists.", - "discoveryRestUrl": "https://tasks.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/tasks/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "testing:v1", - "name": "testing", - "version": "v1", - "title": "Cloud Testing API", - "description": "Allows developers to run automated tests for their mobile applications on Google infrastructure.", - "discoveryRestUrl": "https://testing.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/cloud-test-lab/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "texttospeech:v1beta1", - "name": "texttospeech", - "version": "v1beta1", - "title": "Cloud Text-to-Speech API", - "description": "Synthesizes natural-sounding speech by applying powerful neural network models.", - "discoveryRestUrl": "https://texttospeech.googleapis.com/$discovery/rest?version=v1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/text-to-speech/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "texttospeech:v1", - "name": "texttospeech", - "version": "v1", - "title": "Cloud Text-to-Speech API", - "description": "Synthesizes natural-sounding speech by applying powerful neural network models.", - "discoveryRestUrl": "https://texttospeech.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/text-to-speech/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "toolresults:v1beta3", - "name": "toolresults", - "version": "v1beta3", - "title": "Cloud Tool Results API", - "description": "API to publish and access results from developer tools.", - "discoveryRestUrl": "https://toolresults.googleapis.com/$discovery/rest?version=v1beta3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://firebase.google.com/docs/test-lab/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "tpu:v1alpha1", - "name": "tpu", - "version": "v1alpha1", - "title": "Cloud TPU API", - "description": "TPU API provides customers with access to Google TPU technology.", - "discoveryRestUrl": "https://tpu.googleapis.com/$discovery/rest?version=v1alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/tpu/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "tpu:v2alpha1", - "name": "tpu", - "version": "v2alpha1", - "title": "Cloud TPU API", - "description": "TPU API provides customers with access to Google TPU technology.", - "discoveryRestUrl": "https://tpu.googleapis.com/$discovery/rest?version=v2alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/tpu/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "tpu:v1", - "name": "tpu", - "version": "v1", - "title": "Cloud TPU API", - "description": "TPU API provides customers with access to Google TPU technology.", - "discoveryRestUrl": "https://tpu.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/tpu/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "trafficdirector:v2", - "name": "trafficdirector", - "version": "v2", - "title": "Traffic Director API", - "description": "", - "discoveryRestUrl": "https://trafficdirector.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/traffic-director", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "transcoder:v1", - "name": "transcoder", - "version": "v1", - "title": "Transcoder API", - "description": "This API converts video files into formats suitable for consumer distribution.", - "discoveryRestUrl": "https://transcoder.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/transcoder/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "translate:v3beta1", - "name": "translate", - "version": "v3beta1", - "title": "Cloud Translation API", - "description": "Integrates text translation into your website or application.", - "discoveryRestUrl": "https://translation.googleapis.com/$discovery/rest?version=v3beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/translate/docs/quickstarts", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "translate:v2", - "name": "translate", - "version": "v2", - "title": "Cloud Translation API", - "description": "Integrates text translation into your website or application.", - "discoveryRestUrl": "https://translation.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/translate/docs/quickstarts", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "translate:v3", - "name": "translate", - "version": "v3", - "title": "Cloud Translation API", - "description": "Integrates text translation into your website or application.", - "discoveryRestUrl": "https://translation.googleapis.com/$discovery/rest?version=v3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/translate/docs/quickstarts", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "vault:v1", - "name": "vault", - "version": "v1", - "title": "Google Vault API", - "description": "Retention and eDiscovery for Google Workspace. To work with Vault resources, the account must have the [required Vault privileges](https://support.google.com/vault/answer/2799699) and access to the matter. To access a matter, the account must have created the matter, have the matter shared with them, or have the **View All Matters** privilege. For example, to download an export, an account needs the **Manage Exports** privilege and the matter shared with them.", - "discoveryRestUrl": "https://vault.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/vault", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "verifiedaccess:v1", - "name": "verifiedaccess", - "version": "v1", - "title": "Chrome Verified Access API", - "description": "API for Verified Access chrome extension to provide credential verification for chrome devices connecting to an enterprise network", - "discoveryRestUrl": "https://verifiedaccess.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/chrome/verified-access", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "versionhistory:v1", - "name": "versionhistory", - "version": "v1", - "title": "Version History API", - "description": "Version History API - Prod", - "discoveryRestUrl": "https://versionhistory.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.chrome.com/versionhistory", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "videointelligence:v1p1beta1", - "name": "videointelligence", - "version": "v1p1beta1", - "title": "Cloud Video Intelligence API", - "description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API.", - "discoveryRestUrl": "https://videointelligence.googleapis.com/$discovery/rest?version=v1p1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/video-intelligence/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "videointelligence:v1p2beta1", - "name": "videointelligence", - "version": "v1p2beta1", - "title": "Cloud Video Intelligence API", - "description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API.", - "discoveryRestUrl": "https://videointelligence.googleapis.com/$discovery/rest?version=v1p2beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/video-intelligence/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "videointelligence:v1p3beta1", - "name": "videointelligence", - "version": "v1p3beta1", - "title": "Cloud Video Intelligence API", - "description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API.", - "discoveryRestUrl": "https://videointelligence.googleapis.com/$discovery/rest?version=v1p3beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/video-intelligence/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "videointelligence:v1beta2", - "name": "videointelligence", - "version": "v1beta2", - "title": "Cloud Video Intelligence API", - "description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API.", - "discoveryRestUrl": "https://videointelligence.googleapis.com/$discovery/rest?version=v1beta2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/video-intelligence/docs/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "videointelligence:v1", - "name": "videointelligence", - "version": "v1", - "title": "Cloud Video Intelligence API", - "description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API.", - "discoveryRestUrl": "https://videointelligence.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/video-intelligence/docs/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "vision:v1p1beta1", - "name": "vision", - "version": "v1p1beta1", - "title": "Cloud Vision API", - "description": "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.", - "discoveryRestUrl": "https://vision.googleapis.com/$discovery/rest?version=v1p1beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/vision/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "vision:v1p2beta1", - "name": "vision", - "version": "v1p2beta1", - "title": "Cloud Vision API", - "description": "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.", - "discoveryRestUrl": "https://vision.googleapis.com/$discovery/rest?version=v1p2beta1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/vision/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "vision:v1", - "name": "vision", - "version": "v1", - "title": "Cloud Vision API", - "description": "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.", - "discoveryRestUrl": "https://vision.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/vision/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "vmmigration:v1alpha1", - "name": "vmmigration", - "version": "v1alpha1", - "title": "VM Migration API", - "description": "Use the Migrate for Compute Engine API to programmatically migrate workloads.", - "discoveryRestUrl": "https://vmmigration.googleapis.com/$discovery/rest?version=v1alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/migrate/compute-engine", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "vmmigration:v1", - "name": "vmmigration", - "version": "v1", - "title": "VM Migration API", - "description": "Use the Migrate for Compute Engine API to programmatically migrate workloads.", - "discoveryRestUrl": "https://vmmigration.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/migrate/compute-engine", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "webfonts:v1", - "name": "webfonts", - "version": "v1", - "title": "Web Fonts Developer API", - "description": "The Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.", - "discoveryRestUrl": "https://webfonts.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/fonts/docs/developer_api", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "webrisk:v1", - "name": "webrisk", - "version": "v1", - "title": "Web Risk API", - "description": "", - "discoveryRestUrl": "https://webrisk.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/web-risk/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "websecurityscanner:v1alpha", - "name": "websecurityscanner", - "version": "v1alpha", - "title": "Web Security Scanner API", - "description": "Scans your Compute and App Engine apps for common web vulnerabilities.", - "discoveryRestUrl": "https://websecurityscanner.googleapis.com/$discovery/rest?version=v1alpha", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "websecurityscanner:v1beta", - "name": "websecurityscanner", - "version": "v1beta", - "title": "Web Security Scanner API", - "description": "Scans your Compute and App Engine apps for common web vulnerabilities.", - "discoveryRestUrl": "https://websecurityscanner.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "websecurityscanner:v1", - "name": "websecurityscanner", - "version": "v1", - "title": "Web Security Scanner API", - "description": "Scans your Compute and App Engine apps for common web vulnerabilities.", - "discoveryRestUrl": "https://websecurityscanner.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "workflowexecutions:v1beta", - "name": "workflowexecutions", - "version": "v1beta", - "title": "Workflow Executions API", - "description": "Execute workflows created with Workflows API.", - "discoveryRestUrl": "https://workflowexecutions.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/workflows", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "workflowexecutions:v1", - "name": "workflowexecutions", - "version": "v1", - "title": "Workflow Executions API", - "description": "Execute workflows created with Workflows API.", - "discoveryRestUrl": "https://workflowexecutions.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/workflows", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "workflows:v1beta", - "name": "workflows", - "version": "v1beta", - "title": "Workflows API", - "description": "Manage workflow definitions. To execute workflows and manage executions, see the Workflows Executions API.", - "discoveryRestUrl": "https://workflows.googleapis.com/$discovery/rest?version=v1beta", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/workflows", - "preferred": false - }, - { - "kind": "discovery#directoryItem", - "id": "workflows:v1", - "name": "workflows", - "version": "v1", - "title": "Workflows API", - "description": "Manage workflow definitions. To execute workflows and manage executions, see the Workflows Executions API.", - "discoveryRestUrl": "https://workflows.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/workflows", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "youtube:v3", - "name": "youtube", - "version": "v3", - "title": "YouTube Data API v3", - "description": "The YouTube Data API v3 is an API that provides access to YouTube data, such as videos, playlists, and channels.", - "discoveryRestUrl": "https://youtube.googleapis.com/$discovery/rest?version=v3", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/youtube/", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "youtubeAnalytics:v2", - "name": "youtubeAnalytics", - "version": "v2", - "title": "YouTube Analytics API", - "description": "Retrieves your YouTube Analytics data.", - "discoveryRestUrl": "https://youtubeanalytics.googleapis.com/$discovery/rest?version=v2", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/youtube/analytics", - "preferred": true - }, - { - "kind": "discovery#directoryItem", - "id": "youtubereporting:v1", - "name": "youtubereporting", - "version": "v1", - "title": "YouTube Reporting API", - "description": "Schedules reporting jobs containing your YouTube Analytics data and downloads the resulting bulk data reports in the form of CSV files.", - "discoveryRestUrl": "https://youtubereporting.googleapis.com/$discovery/rest?version=v1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/youtube/reporting/v1/reports/", + "documentationLink": "https://cloud.google.com/marketplace/docs/partners/commerce-procurement-api/reference/rest/", "preferred": true } ] diff --git a/etc/api/api-list.yaml b/etc/api/api-list.yaml index 5eadfd8f66..e7a5bef281 100644 --- a/etc/api/api-list.yaml +++ b/etc/api/api-list.yaml @@ -126,6 +126,8 @@ api: - v1 cloudchannel: - v1 + cloudcommerceprocurement: + - v1 clouddebugger: - v2 clouddeploy: diff --git a/etc/api/cloudcommerceprocurement/v1/cloudcommerceprocurement-api.json b/etc/api/cloudcommerceprocurement/v1/cloudcommerceprocurement-api.json new file mode 100644 index 0000000000..dbd42fcbc2 --- /dev/null +++ b/etc/api/cloudcommerceprocurement/v1/cloudcommerceprocurement-api.json @@ -0,0 +1,930 @@ +{ + "baseUrl": "https://cloudcommerceprocurement.googleapis.com/", + "fullyEncodeReservedExpansion": true, + "ownerName": "Google", + "protocol": "rest", + "batchPath": "batch", + "rootUrl": "https://cloudcommerceprocurement.googleapis.com/", + "documentationLink": "https://cloud.google.com/marketplace/docs/partners/", + "resources": { + "providers": { + "resources": { + "entitlements": { + "methods": { + "suspend": { + "flatPath": "v1/providers/{providersId}/entitlements/{entitlementsId}:suspend", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "request": { + "$ref": "SuspendEntitlementRequest" + }, + "response": { + "$ref": "Empty" + }, + "description": "Requests suspension of an active Entitlement. This is not yet supported.", + "id": "cloudcommerceprocurement.providers.entitlements.suspend", + "httpMethod": "POST", + "path": "v1/{+name}:suspend", + "parameters": { + "name": { + "type": "string", + "pattern": "^providers/[^/]+/entitlements/[^/]+$", + "location": "path", + "required": true, + "description": "Required. The name of the entitlement to suspend." + } + }, + "parameterOrder": [ + "name" + ] + }, + "rejectPlanChange": { + "parameterOrder": [ + "name" + ], + "request": { + "$ref": "RejectEntitlementPlanChangeRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameters": { + "name": { + "type": "string", + "description": "Required. The resource name of the entitlement.", + "location": "path", + "required": true, + "pattern": "^providers/[^/]+/entitlements/[^/]+$" + } + }, + "httpMethod": "POST", + "description": "Rejects an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to reject the plan change on the entitlement resource.", + "id": "cloudcommerceprocurement.providers.entitlements.rejectPlanChange", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "path": "v1/{+name}:rejectPlanChange", + "flatPath": "v1/providers/{providersId}/entitlements/{entitlementsId}:rejectPlanChange" + }, + "get": { + "flatPath": "v1/providers/{providersId}/entitlements/{entitlementsId}", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "response": { + "$ref": "Entitlement" + }, + "path": "v1/{+name}", + "httpMethod": "GET", + "id": "cloudcommerceprocurement.providers.entitlements.get", + "parameters": { + "name": { + "description": "Required. The name of the entitlement to retrieve.", + "type": "string", + "pattern": "^providers/[^/]+/entitlements/[^/]+$", + "required": true, + "location": "path" + } + }, + "description": "Gets a requested Entitlement resource.", + "parameterOrder": [ + "name" + ] + }, + "approve": { + "parameters": { + "name": { + "required": true, + "pattern": "^providers/[^/]+/entitlements/[^/]+$", + "type": "string", + "location": "path", + "description": "Required. The resource name of the entitlement, with the format `providers/{providerId}/entitlements/{entitlementId}`." + } + }, + "path": "v1/{+name}:approve", + "httpMethod": "POST", + "request": { + "$ref": "ApproveEntitlementRequest" + }, + "flatPath": "v1/providers/{providersId}/entitlements/{entitlementsId}:approve", + "response": { + "$ref": "Empty" + }, + "id": "cloudcommerceprocurement.providers.entitlements.approve", + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "description": "Approves an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to approve the creation of the entitlement resource." + }, + "list": { + "path": "v1/{+parent}/entitlements", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageToken": { + "description": "The token for fetching the next page.", + "location": "query", + "type": "string" + }, + "filter": { + "description": "The filter that can be used to limit the list request. The filter is a query string that can match a selected set of attributes with string values. For example `account=E-1234-5678-ABCD-EFGH`, `state=pending_cancellation`, and `plan!=foo-plan`. Supported query attributes are * `account` * `customer_billing_account` with value in the format of: `billingAccounts/{id}` * `product_external_name` * `quote_external_name` * `offer` * `new_pending_offer` * `plan` * `newPendingPlan` or `new_pending_plan` * `state` * `consumers.project` * `change_history.new_offer` Note that the consumers and change_history.new_offer match works on repeated structures, so equality (`consumers.project=projects/123456789`) is not supported. Set membership can be expressed with the `:` operator. For example, `consumers.project:projects/123456789` finds entitlements with at least one consumer with project field equal to `projects/123456789`. `change_history.new_offer` retrieves all entitlements that were once associated or are currently active with the offer. Also note that the state name match is case-insensitive and query can omit the prefix \"ENTITLEMENT_\". For example, `state=active` is equivalent to `state=ENTITLEMENT_ACTIVE`. If the query contains some special characters other than letters, underscore, or digits, the phrase must be quoted with double quotes. For example, `product=\"providerId:productId\"`, where the product name needs to be quoted because it contains special character colon. Queries can be combined with `AND`, `OR`, and `NOT` to form more complex queries. They can also be grouped to force a desired evaluation order. For example, `state=active AND (account=E-1234 OR account=5678) AND NOT (product=foo-product)`. Connective `AND` can be omitted between two predicates. For example `account=E-1234 state=active` is equivalent to `account=E-1234 AND state=active`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "The maximum number of entries that are requested. The default page size is 200.", + "format": "int32" + }, + "parent": { + "pattern": "^providers/[^/]+$", + "required": true, + "description": "Required. The parent resource name.", + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/providers/{providersId}/entitlements", + "response": { + "$ref": "ListEntitlementsResponse" + }, + "description": "Lists Entitlements for which the provider has read access.", + "parameterOrder": [ + "parent" + ], + "id": "cloudcommerceprocurement.providers.entitlements.list", + "httpMethod": "GET" + }, + "approvePlanChange": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "description": "Approves an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to approve the plan change on the entitlement resource.", + "path": "v1/{+name}:approvePlanChange", + "parameters": { + "name": { + "pattern": "^providers/[^/]+/entitlements/[^/]+$", + "type": "string", + "location": "path", + "description": "Required. The resource name of the entitlement.", + "required": true + } + }, + "id": "cloudcommerceprocurement.providers.entitlements.approvePlanChange", + "httpMethod": "POST", + "flatPath": "v1/providers/{providersId}/entitlements/{entitlementsId}:approvePlanChange", + "parameterOrder": [ + "name" + ], + "request": { + "$ref": "ApproveEntitlementPlanChangeRequest" + }, + "response": { + "$ref": "Empty" + } + }, + "patch": { + "id": "cloudcommerceprocurement.providers.entitlements.patch", + "request": { + "$ref": "Entitlement" + }, + "httpMethod": "PATCH", + "description": "Updates an existing Entitlement.", + "parameters": { + "name": { + "pattern": "^providers/[^/]+/entitlements/[^/]+$", + "required": true, + "type": "string", + "location": "path", + "description": "Required. The name of the entitlement to update." + }, + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "The update mask that applies to the resource. See the [FieldMask definition] (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) for more details.", + "type": "string" + } + }, + "path": "v1/{+name}", + "flatPath": "v1/providers/{providersId}/entitlements/{entitlementsId}", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Entitlement" + } + }, + "reject": { + "flatPath": "v1/providers/{providersId}/entitlements/{entitlementsId}:reject", + "response": { + "$ref": "Empty" + }, + "description": "Rejects an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to reject the creation of the entitlement resource.", + "parameters": { + "name": { + "description": "Required. The resource name of the entitlement.", + "pattern": "^providers/[^/]+/entitlements/[^/]+$", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:reject", + "parameterOrder": [ + "name" + ], + "id": "cloudcommerceprocurement.providers.entitlements.reject", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "httpMethod": "POST", + "request": { + "$ref": "RejectEntitlementRequest" + } + } + } + }, + "accounts": { + "methods": { + "approve": { + "description": "Grants an approval on an Account.", + "request": { + "$ref": "ApproveAccountRequest" + }, + "flatPath": "v1/providers/{providersId}/accounts/{accountsId}:approve", + "parameters": { + "name": { + "description": "Required. The resource name of the account, with the format `providers/{providerId}/accounts/{accountId}`.", + "required": true, + "type": "string", + "pattern": "^providers/[^/]+/accounts/[^/]+$", + "location": "path" + } + }, + "id": "cloudcommerceprocurement.providers.accounts.approve", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "httpMethod": "POST", + "response": { + "$ref": "Empty" + }, + "path": "v1/{+name}:approve", + "parameterOrder": [ + "name" + ] + }, + "reject": { + "httpMethod": "POST", + "flatPath": "v1/providers/{providersId}/accounts/{accountsId}:reject", + "id": "cloudcommerceprocurement.providers.accounts.reject", + "response": { + "$ref": "Empty" + }, + "path": "v1/{+name}:reject", + "parameterOrder": [ + "name" + ], + "request": { + "$ref": "RejectAccountRequest" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "required": true, + "pattern": "^providers/[^/]+/accounts/[^/]+$", + "description": "Required. The resource name of the account.", + "type": "string", + "location": "path" + } + }, + "description": "Rejects an approval on an Account." + }, + "reset": { + "httpMethod": "POST", + "description": "Resets an Account and cancels all associated Entitlements. Partner can only reset accounts they own rather than customer accounts.", + "path": "v1/{+name}:reset", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^providers/[^/]+/accounts/[^/]+$", + "required": true, + "description": "Required. The resource name of the account.", + "type": "string", + "location": "path" + } + }, + "parameterOrder": [ + "name" + ], + "flatPath": "v1/providers/{providersId}/accounts/{accountsId}:reset", + "id": "cloudcommerceprocurement.providers.accounts.reset", + "request": { + "$ref": "ResetAccountRequest" + }, + "response": { + "$ref": "Empty" + } + }, + "get": { + "path": "v1/{+name}", + "parameterOrder": [ + "name" + ], + "description": "Gets a requested Account resource.", + "id": "cloudcommerceprocurement.providers.accounts.get", + "response": { + "$ref": "Account" + }, + "parameters": { + "name": { + "description": "Required. The name of the account to retrieve.", + "pattern": "^providers/[^/]+/accounts/[^/]+$", + "required": true, + "type": "string", + "location": "path" + } + }, + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/providers/{providersId}/accounts/{accountsId}" + }, + "list": { + "flatPath": "v1/providers/{providersId}/accounts", + "id": "cloudcommerceprocurement.providers.accounts.list", + "description": "Lists Accounts that the provider has access to.", + "path": "v1/{+parent}/accounts", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "type": "integer", + "location": "query", + "description": "The maximum number of entries that are requested. The default page size is 25 and the maximum page size is 200.", + "format": "int32" + }, + "pageToken": { + "description": "The token for fetching the next page.", + "type": "string", + "location": "query" + }, + "parent": { + "type": "string", + "required": true, + "pattern": "^providers/[^/]+$", + "description": "Required. The parent resource name.", + "location": "path" + } + }, + "response": { + "$ref": "ListAccountsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "httpMethod": "GET" + } + } + } + } + } + }, + "canonicalName": "Cloud Commerce Partner Procurement Service", + "basePath": "", + "description": "Partner API for the Cloud Commerce Procurement Service.", + "version": "v1", + "version_module": true, + "title": "Cloud Commerce Partner Procurement API", + "mtlsRootUrl": "https://cloudcommerceprocurement.mtls.googleapis.com/", + "servicePath": "", + "kind": "discovery#restDescription", + "schemas": { + "ResetAccountRequest": { + "properties": {}, + "description": "Request message for PartnerProcurementService.ResetAccount.", + "type": "object", + "id": "ResetAccountRequest" + }, + "RejectEntitlementPlanChangeRequest": { + "properties": { + "reason": { + "description": "Free form text string explaining the rejection reason. Max allowed length: 256 bytes. Longer strings will be truncated.", + "type": "string" + }, + "pendingPlanName": { + "description": "Required. Name of the pending plan that is being rejected.", + "type": "string" + } + }, + "description": "Request message for PartnerProcurementService.RejectEntitlementPlanChange.", + "type": "object", + "id": "RejectEntitlementPlanChangeRequest" + }, + "RejectAccountRequest": { + "description": "Request message for PartnerProcurementService.RejectAccount.", + "type": "object", + "id": "RejectAccountRequest", + "properties": { + "reason": { + "type": "string", + "description": "Free form text string explaining the rejection reason. Max allowed length: 256 bytes. Longer strings will be truncated." + }, + "approvalName": { + "description": "The name of the approval being rejected. If absent and there is only one approval possible, that approval will be rejected. If absent and there are many approvals possible, the request will fail with a 400 Bad Request. Optional.", + "type": "string" + } + } + }, + "ListAccountsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "The token for fetching the next page." + }, + "accounts": { + "type": "array", + "items": { + "$ref": "Account" + }, + "description": "The list of accounts in this response." + } + }, + "id": "ListAccountsResponse", + "description": "Response message for [PartnerProcurementService.ListAccounts[]." + }, + "ListEntitlementsResponse": { + "id": "ListEntitlementsResponse", + "description": "Response message for PartnerProcurementService.ListEntitlements.", + "type": "object", + "properties": { + "entitlements": { + "description": "The list of entitlements in this response.", + "items": { + "$ref": "Entitlement" + }, + "type": "array" + }, + "nextPageToken": { + "type": "string", + "description": "The token for fetching the next page." + } + } + }, + "Entitlement": { + "properties": { + "usageReportingId": { + "description": "Output only. The consumerId to use when reporting usage through the Service Control API. See the consumerId field at [Reporting Metrics](https://cloud.google.com/service-control/reporting-metrics) for more details. This field is present only if the product has usage-based billing configured.", + "type": "string" + }, + "newPendingOffer": { + "description": "Output only. The name of the offer the entitlement is switching to upon a pending plan change. Only exists if the pending plan change is moving to an offer. This field isn't populated for entitlements which aren't active yet. Format: 'projects/{project}/services/{service}/privateOffers/{offer-id}' OR 'projects/{project}/services/{service}/standardOffers/{offer-id}', depending on whether the offer is private or public. The {service} in the name is the listing service of the offer. It could be either the product service that the offer is referencing, or a generic private offer parent service. We recommend that you don't build your integration to rely on the meaning of this {service} part.", + "type": "string", + "readOnly": true + }, + "productExternalName": { + "readOnly": true, + "type": "string", + "description": "Output only. The identifier of the product that was procured." + }, + "quoteExternalName": { + "description": "Output only. The identifier of the quote that was used to procure. Empty if the order is not purchased using a quote.", + "type": "string", + "readOnly": true + }, + "messageToUser": { + "type": "string", + "description": "Provider-supplied message that is displayed to the end user. Currently this is used to communicate progress and ETA for provisioning. This field can be updated only when a user is waiting for an action from the provider, i.e. entitlement state is EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED or EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL. This field is cleared automatically when the entitlement state changes." + }, + "subscriptionEndTime": { + "format": "google-datetime", + "readOnly": true, + "description": "Output only. End time for the subscription corresponding to this entitlement.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the entitlement. Entitlement names have the form `providers/{provider_id}/entitlements/{entitlement_id}`.", + "type": "string" + }, + "product": { + "description": "Output only. The identifier of the entity that was purchased. This may actually represent a product, quote, or offer. We strongly recommend that you use the following more explicit fields: productExternalName, quoteExternalName, or offer.", + "type": "string", + "deprecated": true + }, + "createTime": { + "format": "google-datetime", + "description": "Output only. The creation timestamp.", + "type": "string" + }, + "newOfferStartTime": { + "readOnly": true, + "description": "Output only. The timestamp when the new offer becomes effective. This field is populated even if the entitlement isn't active yet. If there's no upcoming offer, the field is empty.", + "format": "google-datetime", + "type": "string" + }, + "newOfferEndTime": { + "type": "string", + "format": "google-datetime", + "description": "Output only. The end time of the new offer. If the offer was created with a term instead of a specified end date, this field is empty. This field is populated even if the entitlement isn't active yet. If there's no upcoming offer, the field is be empty.", + "readOnly": true + }, + "newPendingPlan": { + "type": "string", + "description": "Output only. The identifier of the pending new plan. Required if the product has plans and the entitlement has a pending plan change." + }, + "offerDuration": { + "type": "string", + "readOnly": true, + "description": "Output only. The offer duration of the current offer in ISO 8601 duration format. Field is empty if entitlement was not made using an offer. If the offer was created with a specified end date instead of a duration, this field is empty." + }, + "newPendingOfferDuration": { + "description": "Output only. The duration of the new offer, in ISO 8601 duration format. This field isn't populated for entitlements which aren't active yet, only for pending offer changes. If the offer was created with a specified end date instead of a duration, this field is empty.", + "readOnly": true, + "type": "string" + }, + "state": { + "enum": [ + "ENTITLEMENT_STATE_UNSPECIFIED", + "ENTITLEMENT_ACTIVATION_REQUESTED", + "ENTITLEMENT_ACTIVE", + "ENTITLEMENT_PENDING_CANCELLATION", + "ENTITLEMENT_CANCELLED", + "ENTITLEMENT_PENDING_PLAN_CHANGE", + "ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL", + "ENTITLEMENT_SUSPENDED" + ], + "type": "string", + "enumDescriptions": [ + "Default state of the entitlement. It's only set to this value when the entitlement is first created and has not been initialized.", + "Indicates that the entitlement is being created and the backend has sent a notification to the provider for the activation approval. If the provider approves, then the entitlement will transition to the EntitlementState.ENTITLEMENT_ACTIVE state. Otherwise, the entitlement will be removed. Plan changes are not allowed in this state. Instead the entitlement is cancelled and re-created with a new plan name.", + "Indicates that the entitlement is active. The procured item is now usable and any associated billing events will start occurring. Entitlements in this state WILL renew. The analogous state for an unexpired but non-renewing entitlement is ENTITLEMENT_PENDING_CANCELLATION. In this state, the customer can decide to cancel the entitlement, which would change the state to EntitlementState.ENTITLEMENT_PENDING_CANCELLATION, and then EntitlementState.ENTITLEMENT_CANCELLED. The user can also request a change of plan, which will transition the state to EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE, and then back to EntitlementState.ENTITLEMENT_ACTIVE.", + "Indicates that the entitlement will expire at the end of its term. This could mean the customer has elected not to renew this entitlement or the customer elected to cancel an entitlement that only expires at term end. The entitlement typically stays in this state if the entitlement/plan allows use of the underlying resource until the end of the current billing cycle. Once the billing cycle completes, the resource will transition to EntitlementState.ENTITLEMENT_CANCELLED state. The resource cannot be modified during this state.", + "Indicates that the entitlement was cancelled. The entitlement can now be deleted.", + "Indicates that the entitlement is currently active, but there is a pending plan change that is requested by the customer. The entitlement typically stays in this state, if the entitlement/plan requires the completion of the current billing cycle before the plan can be changed. Once the billing cycle completes, the resource will transition to EntitlementState.ENTITLEMENT_ACTIVE, with its plan changed.", + "Indicates that the entitlement is currently active, but there is a plan change request pending provider approval. If the provider approves the plan change, then the entitlement will transition either to EntitlementState.ENTITLEMENT_ACTIVE or EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE depending on whether current plan requires that the billing cycle completes. If the provider rejects the plan change, then the pending plan change request is removed and the entitlement stays in EntitlementState.ENTITLEMENT_ACTIVE state with the old plan.", + "Indicates that the entitlement is suspended either by Google or provider request. This can be triggered for various external reasons (e.g. expiration of credit card on the billing account, violation of terms-of-service of the provider etc.). As such, any remediating action needs to be taken externally, before the entitlement can be activated. This is not yet supported." + ], + "description": "Output only. The state of the entitlement." + }, + "consumers": { + "description": "Output only. The resources using this entitlement, if applicable.", + "type": "array", + "items": { + "$ref": "Consumer" + } + }, + "orderId": { + "readOnly": true, + "type": "string", + "description": "Output only. The order ID of this entitlement, without any `orders/` resource name prefix." + }, + "provider": { + "type": "string", + "description": "Output only. The identifier of the service provider that this entitlement was created against. Each service provider is assigned a unique provider value when they onboard with Cloud Commerce platform." + }, + "updateTime": { + "type": "string", + "description": "Output only. The last update timestamp.", + "format": "google-datetime" + }, + "offer": { + "type": "string", + "readOnly": true, + "description": "Output only. The name of the offer that was procured. Field is empty if order was not made using an offer. Format: 'projects/{project}/services/{service}/privateOffers/{offer-id}' OR 'projects/{project}/services/{service}/standardOffers/{offer-id}', depending on whether the offer is private or public. The {service} in the name is the listing service of the offer. It could be either the product service that the offer is referencing, or a generic private offer parent service. We recommend that you don't build your integration to rely on the meaning of this {service} part." + }, + "offerEndTime": { + "type": "string", + "format": "google-datetime", + "readOnly": true, + "description": "Output only. End time for the Offer association corresponding to this entitlement. The field is only populated if the entitlement is currently associated with an Offer." + }, + "account": { + "description": "Output only. The resource name of the account that this entitlement is based on, if any.", + "type": "string" + }, + "plan": { + "description": "Output only. The identifier of the plan that was procured. Required if the product has plans.", + "type": "string" + }, + "cancellationReason": { + "type": "string", + "description": "Output only. The reason the entitlement was cancelled. If this entitlement wasn't cancelled, this field is empty. Possible values include \"unknown\", \"expired\", \"user-cancelled\", \"account-closed\", \"billing-disabled\" (if the customer has manually disabled billing to their resources), \"user-aborted\", and \"migrated\" (if the entitlement has migrated across products). Values of this field are subject to change, and we recommend that you don't build your technical integration to rely on these fields.", + "readOnly": true + }, + "entitlementBenefitIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Output only. The entitlement benefit IDs associated with the purchase.", + "readOnly": true + }, + "inputProperties": { + "description": "Output only. The custom properties that were collected from the user to create this entitlement.", + "deprecated": true, + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + } + } + }, + "id": "Entitlement", + "type": "object", + "description": "Represents a procured product of a customer." + }, + "ApproveAccountRequest": { + "description": "Request message for PartnerProcurementService.ApproveAccount.", + "type": "object", + "id": "ApproveAccountRequest", + "properties": { + "approvalName": { + "description": "The name of the approval being approved. If absent and there is only one approval possible, that approval will be granted. If absent and there are many approvals possible, the request will fail with a 400 Bad Request. Optional.", + "type": "string" + }, + "reason": { + "description": "Free form text string explaining the approval reason. Optional. Max allowed length: 256 bytes. Longer strings will be truncated.", + "type": "string" + }, + "properties": { + "description": "Set of properties that should be associated with the account. Optional.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "properties": {}, + "type": "object", + "id": "Empty" + }, + "SuspendEntitlementRequest": { + "id": "SuspendEntitlementRequest", + "properties": { + "reason": { + "description": "A free-form reason string, explaining the reason for suspension request.", + "type": "string" + } + }, + "description": "Request message for ParterProcurementService.SuspendEntitlement. This is not yet supported.", + "type": "object" + }, + "RejectEntitlementRequest": { + "properties": { + "reason": { + "description": "Free form text string explaining the rejection reason. Max allowed length: 256 bytes. Longer strings will be truncated.", + "type": "string" + } + }, + "type": "object", + "description": "Request message for PartnerProcurementService.RejectEntitlement.", + "id": "RejectEntitlementRequest" + }, + "Consumer": { + "properties": { + "project": { + "type": "string", + "description": "A project name with format `projects/`." + } + }, + "type": "object", + "description": "A resource using (consuming) this entitlement.", + "id": "Consumer" + }, + "Account": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Output only. The identifier of the service provider that this account was created against. Each service provider is assigned a unique provider value when they onboard with Cloud Commerce platform." + }, + "approvals": { + "items": { + "$ref": "Approval" + }, + "type": "array", + "description": "Output only. The approvals for this account. These approvals are used to track actions that are permitted or have been completed by a customer within the context of the provider. This might include a sign up flow or a provisioning step, for example, that the provider can admit to having happened." + }, + "name": { + "type": "string", + "description": "Output only. The resource name of the account. Account names have the form `accounts/{account_id}`." + }, + "createTime": { + "format": "google-datetime", + "description": "Output only. The creation timestamp.", + "type": "string" + }, + "state": { + "description": "Output only. The state of the account. This is used to decide whether the customer is in good standing with the provider and is able to make purchases. An account might not be able to make a purchase if the billing account is suspended, for example.", + "enum": [ + "ACCOUNT_STATE_UNSPECIFIED", + "ACCOUNT_ACTIVATION_REQUESTED", + "ACCOUNT_ACTIVE" + ], + "type": "string", + "enumDescriptions": [ + "Default state of the account. It's only set to this value when the account is first created and has not been initialized.", + "The customer has requested the creation of the account resource, and the provider notification message is dispatched. This state has been deprecated, as accounts now immediately transition to AccountState.ACCOUNT_ACTIVE.", + "The account is active and ready for use. The next possible states are: - Account getting deleted: After the user invokes delete from another API." + ] + }, + "updateTime": { + "description": "Output only. The last update timestamp.", + "type": "string", + "format": "google-datetime" + }, + "inputProperties": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Output only. The custom properties that were collected from the user to create this account.", + "deprecated": true, + "type": "object" + } + }, + "id": "Account", + "description": "Represents an account that was established by the customer on the service provider's system." + }, + "Approval": { + "type": "object", + "description": "An approval for some action on an account.", + "properties": { + "state": { + "type": "string", + "description": "Output only. The state of the approval.", + "enumDescriptions": [ + "Sentinel value; do not use.", + "The approval is pending response from the provider. The approval state can transition to Account.Approval.State.APPROVED or Account.Approval.State.REJECTED.", + "The approval has been granted by the provider.", + "The approval has been rejected by the provider. A provider may choose to approve a previously rejected approval, so is it possible to transition to Account.Approval.State.APPROVED." + ], + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "APPROVED", + "REJECTED" + ] + }, + "name": { + "type": "string", + "description": "Output only. The name of the approval." + }, + "reason": { + "type": "string", + "description": "Output only. An explanation for the state of the approval." + }, + "updateTime": { + "format": "google-datetime", + "type": "string", + "description": "Optional. The last update timestamp of the approval." + } + }, + "id": "Approval" + }, + "ApproveEntitlementRequest": { + "properties": { + "entitlementMigrated": { + "type": "string", + "description": "Optional. The resource name of the entitlement that was migrated, with the format `providers/{provider_id}/entitlements/{entitlement_id}`. Should only be sent when resources have been migrated from entitlement_migrated to the new entitlement. Optional." + }, + "properties": { + "deprecated": true, + "type": "object", + "description": "Set of properties that should be associated with the entitlement. Optional.", + "additionalProperties": { + "type": "string" + } + } + }, + "type": "object", + "description": "Request message for [PartnerProcurementService.ApproveEntitlement[].", + "id": "ApproveEntitlementRequest" + }, + "ApproveEntitlementPlanChangeRequest": { + "id": "ApproveEntitlementPlanChangeRequest", + "type": "object", + "properties": { + "pendingPlanName": { + "description": "Required. Name of the pending plan that's being approved.", + "type": "string" + } + }, + "description": "Request message for [PartnerProcurementService.ApproveEntitlementPlanChange[]." + } + }, + "revision": "20240804", + "ownerDomain": "google.com", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "name": "cloudcommerceprocurement", + "id": "cloudcommerceprocurement:v1", + "discoveryVersion": "v1", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "parameters": { + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string", + "location": "query" + }, + "access_token": { + "location": "query", + "type": "string", + "description": "OAuth access token." + }, + "callback": { + "type": "string", + "location": "query", + "description": "JSONP" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "oauth_token": { + "location": "query", + "type": "string", + "description": "OAuth 2.0 token for the current user." + }, + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "prettyPrint": { + "type": "boolean", + "location": "query", + "default": "true", + "description": "Returns response with indentations and line breaks." + }, + "upload_protocol": { + "type": "string", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query" + }, + "alt": { + "type": "string", + "default": "json", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string", + "description": "V1 error format.", + "enum": [ + "1", + "2" + ] + } + } +} diff --git a/gen/cloudcommerceprocurement1-cli/Cargo.toml b/gen/cloudcommerceprocurement1-cli/Cargo.toml new file mode 100644 index 0000000000..74bb8d698f --- /dev/null +++ b/gen/cloudcommerceprocurement1-cli/Cargo.toml @@ -0,0 +1,42 @@ +# DO NOT EDIT ! +# This file was generated automatically from 'src/generator/templates/Cargo.toml.mako' +# DO NOT EDIT ! +[package] + +name = "google-cloudcommerceprocurement1-cli" +version = "5.0.5+20240804" +authors = ["Sebastian Thiel "] +description = "A complete library to interact with Cloud Commerce Partner Procurement Service (protocol v1)" +repository = "https://github.com/Byron/google-apis-rs/tree/main/gen/cloudcommerceprocurement1-cli" +homepage = "https://cloud.google.com/marketplace/docs/partners/" +documentation = "http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli" +license = "MIT" +keywords = ["cloudcommerceprocure", "google", "cli"] +autobins = false +edition = "2018" + +[[bin]] +name = "cloudcommerceprocurement1" +path = "src/main.rs" + +[dependencies] +anyhow = "^ 1.0" +hyper-rustls = "0.25.0" +mime = "^ 0.3.0" +serde = { version = "^ 1.0", features = ["derive"] } +utoipa = { version = "^4.2", optional = true } +serde_json = "^ 1.0" +itertools = "0.13" +google-clis-common = { path = "../../google-clis-common", version = "6.0" } +clap = "^2.0" +http = "^0.2" +hyper = { version = "0.14", features = ["full"] } +tokio = { version = "^ 1.0", features = ["full"] } +tower-service = "^0.3.1" + + + +[dependencies.google-cloudcommerceprocurement1] +path = "../cloudcommerceprocurement1" +version = "5.0.5+20240804" + diff --git a/gen/cloudcommerceprocurement1-cli/LICENSE.md b/gen/cloudcommerceprocurement1-cli/LICENSE.md new file mode 100644 index 0000000000..c14f19eef3 --- /dev/null +++ b/gen/cloudcommerceprocurement1-cli/LICENSE.md @@ -0,0 +1,30 @@ + +The MIT License (MIT) +===================== + +Copyright 2015–2024 Sebastian Thiel + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/gen/cloudcommerceprocurement1-cli/README.md b/gen/cloudcommerceprocurement1-cli/README.md new file mode 100644 index 0000000000..d98543284e --- /dev/null +++ b/gen/cloudcommerceprocurement1-cli/README.md @@ -0,0 +1,117 @@ + +The `cloudcommerceprocurement1` command-line interface *(CLI)* allows to use most features of the *Google Cloud Commerce Partner Procurement Service* service from the comfort of your terminal. + +By default all output is printed to standard out, but flags can be set to direct it into a file independent of your shell's +capabilities. Errors will be printed to standard error, and cause the program's exit code to be non-zero. + +If data-structures are requested, these will be returned as pretty-printed JSON, to be useful as input to other tools. + +Everything else about the *Cloud Commerce Partner Procurement Service* API can be found at the +[official documentation site](https://cloud.google.com/marketplace/docs/partners/). + +# Installation and Source Code + +Install the command-line interface with cargo using: + +```bash +cargo install google-cloudcommerceprocurement1-cli +``` + +Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/cloudcommerceprocurement1-cli). + +# Usage + +This documentation was generated from the *Cloud Commerce Partner Procurement Service* API at revision *20240804*. The CLI is at version *5.0.5*. + +```bash +cloudcommerceprocurement1 [options] + providers + accounts-approve (-r )... [-p ]... [-o ] + accounts-get [-p ]... [-o ] + accounts-list [-p ]... [-o ] + accounts-reject (-r )... [-p ]... [-o ] + accounts-reset (-r )... [-p ]... [-o ] + entitlements-approve (-r )... [-p ]... [-o ] + entitlements-approve-plan-change (-r )... [-p ]... [-o ] + entitlements-get [-p ]... [-o ] + entitlements-list [-p ]... [-o ] + entitlements-patch (-r )... [-p ]... [-o ] + entitlements-reject (-r )... [-p ]... [-o ] + entitlements-reject-plan-change (-r )... [-p ]... [-o ] + entitlements-suspend (-r )... [-p ]... [-o ] + cloudcommerceprocurement1 --help + +Configuration: + [--scope ]... + Specify the authentication a method should be executed in. Each scope + requires the user to grant this application permission to use it. + If unset, it defaults to the shortest scope url for a particular method. + --config-dir + A directory into which we will store our persistent data. Defaults to + a user-writable directory that we will create during the first invocation. + [default: ~/.google-service-cli] + +``` + +# Configuration + +The program will store all persistent data in the `~/.google-service-cli` directory in *JSON* files prefixed with `cloudcommerceprocurement1-`. You can change the directory used to store configuration with the `--config-dir` flag on a per-invocation basis. + +More information about the various kinds of persistent data are given in the following paragraphs. + +# Authentication + +Most APIs require a user to authenticate any request. If this is the case, the [scope][scopes] determines the +set of permissions granted. The granularity of these is usually no more than *read-only* or *full-access*. + +If not set, the system will automatically select the smallest feasible scope, e.g. when invoking a +method that is read-only, it will ask only for a read-only scope. +You may use the `--scope` flag to specify a scope directly. +All applicable scopes are documented in the respective method's CLI documentation. + +The first time a scope is used, the user is asked for permission. Follow the instructions given +by the CLI to grant permissions, or to decline. + +If a scope was authenticated by the user, the respective information will be stored as *JSON* in the configuration +directory, e.g. `~/.google-service-cli/cloudcommerceprocurement1-token-.json`. No manual management of these tokens +is necessary. + +To revoke granted authentication, please refer to the [official documentation][revoke-access]. + +# Application Secrets + +In order to allow any application to use Google services, it will need to be registered using the +[Google Developer Console][google-dev-console]. APIs the application may use are then enabled for it +one by one. Most APIs can be used for free and have a daily quota. + +To allow more comfortable usage of the CLI without forcing anyone to register an own application, the CLI +comes with a default application secret that is configured accordingly. This also means that heavy usage +all around the world may deplete the daily quota. + +You can workaround this limitation by putting your own secrets file at this location: +`~/.google-service-cli/cloudcommerceprocurement1-secret.json`, assuming that the required *cloudcommerceprocurement* API +was enabled for it. Such a secret file can be downloaded in the *Google Developer Console* at +*APIs & auth -> Credentials -> Download JSON* and used as is. + +Learn more about how to setup Google projects and enable APIs using the [official documentation][google-project-new]. + + +# Debugging + +Even though the CLI does its best to provide usable error messages, sometimes it might be desirable to know +what exactly led to a particular issue. This is done by allowing all client-server communication to be +output to standard error *as-is*. + +The `--debug` flag will print errors using the `Debug` representation to standard error. + +You may consider redirecting standard error into a file for ease of use, e.g. `cloudcommerceprocurement1 --debug [options] 2>debug.txt`. + + +[scopes]: https://developers.google.com/+/api/oauth#scopes +[revoke-access]: http://webapps.stackexchange.com/a/30849 +[google-dev-console]: https://console.developers.google.com/ +[google-project-new]: https://developers.google.com/console/help/new/ diff --git a/gen/cloudcommerceprocurement1-cli/mkdocs.yml b/gen/cloudcommerceprocurement1-cli/mkdocs.yml new file mode 100644 index 0000000000..49e2ac9fc0 --- /dev/null +++ b/gen/cloudcommerceprocurement1-cli/mkdocs.yml @@ -0,0 +1,30 @@ +site_name: Cloud Commerce Partner Procurement Service v5.0.5+20240804 +site_url: http://byron.github.io/google-apis-rs/google-cloudcommerceprocurement1-cli +site_description: A complete library to interact with Cloud Commerce Partner Procurement Service (protocol v1) + +repo_url: https://github.com/Byron/google-apis-rs/tree/main/gen/cloudcommerceprocurement1-cli + +docs_dir: docs +site_dir: build_html + +nav: +- Home: 'index.md' +- 'Providers': + - 'Accounts Approve': 'providers_accounts-approve.md' + - 'Accounts Get': 'providers_accounts-get.md' + - 'Accounts List': 'providers_accounts-list.md' + - 'Accounts Reject': 'providers_accounts-reject.md' + - 'Accounts Reset': 'providers_accounts-reset.md' + - 'Entitlements Approve': 'providers_entitlements-approve.md' + - 'Entitlements Approve Plan Change': 'providers_entitlements-approve-plan-change.md' + - 'Entitlements Get': 'providers_entitlements-get.md' + - 'Entitlements List': 'providers_entitlements-list.md' + - 'Entitlements Patch': 'providers_entitlements-patch.md' + - 'Entitlements Reject': 'providers_entitlements-reject.md' + - 'Entitlements Reject Plan Change': 'providers_entitlements-reject-plan-change.md' + - 'Entitlements Suspend': 'providers_entitlements-suspend.md' + +theme: readthedocs + +copyright: Copyright © 2015–2024, `Sebastian Thiel` + diff --git a/gen/cloudcommerceprocurement1-cli/src/main.rs b/gen/cloudcommerceprocurement1-cli/src/main.rs new file mode 100644 index 0000000000..2939139d93 --- /dev/null +++ b/gen/cloudcommerceprocurement1-cli/src/main.rs @@ -0,0 +1,1640 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/generator/templates/cli/main.rs.mako' +// DO NOT EDIT ! +#![allow(unused_variables, unused_imports, dead_code, unused_mut)] + +#[macro_use] +extern crate clap; + +use std::env; +use std::io::{self, Write}; +use clap::{App, SubCommand, Arg}; + +use google_cloudcommerceprocurement1::{api, Error, oauth2, client::chrono, FieldMask}; + + +use google_clis_common as client; + +use client::{InvalidOptionsError, CLIError, arg_from_str, writer_from_opts, parse_kv_arg, + input_file_from_opts, input_mime_from_opts, FieldCursor, FieldError, CallType, UploadProtocol, + calltype_from_str, remove_json_null_values, ComplexType, JsonType, JsonTypeInfo}; + +use std::default::Default; +use std::error::Error as StdError; +use std::str::FromStr; + +use serde_json as json; +use clap::ArgMatches; +use http::Uri; +use hyper::client::connect; +use tokio::io::{AsyncRead, AsyncWrite}; +use tower_service; + +enum DoitError { + IoError(String, io::Error), + ApiError(Error), +} + +struct Engine<'n, S> { + opt: ArgMatches<'n>, + hub: api::CloudCommercePartnerProcurementService, + gp: Vec<&'static str>, + gpm: Vec<(&'static str, &'static str)>, +} + + +impl<'n, S> Engine<'n, S> +where + S: tower_service::Service + Clone + Send + Sync + 'static, + S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, + S::Future: Send + Unpin + 'static, + S::Error: Into>, +{ + async fn _providers_accounts_approve(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "approval-name" => Some(("approvalName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "reason" => Some(("reason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "properties" => Some(("properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["approval-name", "properties", "reason"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::ApproveAccountRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.providers().accounts_approve(request, opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit().await, + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema).expect("serde to work"); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + async fn _providers_accounts_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.providers().accounts_get(opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit().await, + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema).expect("serde to work"); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + async fn _providers_accounts_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.providers().accounts_list(opt.value_of("parent").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size( value.map(|v| arg_from_str(v, err, "page-size", "int32")).unwrap_or(-0)); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["page-size", "page-token"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit().await, + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema).expect("serde to work"); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + async fn _providers_accounts_reject(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "reason" => Some(("reason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "approval-name" => Some(("approvalName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["approval-name", "reason"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::RejectAccountRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.providers().accounts_reject(request, opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit().await, + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema).expect("serde to work"); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + async fn _providers_accounts_reset(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec![]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::ResetAccountRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.providers().accounts_reset(request, opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit().await, + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema).expect("serde to work"); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + async fn _providers_entitlements_approve(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "entitlement-migrated" => Some(("entitlementMigrated", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "properties" => Some(("properties", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Map })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["entitlement-migrated", "properties"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::ApproveEntitlementRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.providers().entitlements_approve(request, opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit().await, + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema).expect("serde to work"); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + async fn _providers_entitlements_approve_plan_change(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "pending-plan-name" => Some(("pendingPlanName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["pending-plan-name"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::ApproveEntitlementPlanChangeRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.providers().entitlements_approve_plan_change(request, opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit().await, + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema).expect("serde to work"); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + async fn _providers_entitlements_get(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.providers().entitlements_get(opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit().await, + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema).expect("serde to work"); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + async fn _providers_entitlements_list(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + let mut call = self.hub.providers().entitlements_list(opt.value_of("parent").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "page-token" => { + call = call.page_token(value.unwrap_or("")); + }, + "page-size" => { + call = call.page_size( value.map(|v| arg_from_str(v, err, "page-size", "int32")).unwrap_or(-0)); + }, + "filter" => { + call = call.filter(value.unwrap_or("")); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["filter", "page-size", "page-token"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit().await, + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema).expect("serde to work"); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + async fn _providers_entitlements_patch(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "usage-reporting-id" => Some(("usageReportingId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "new-pending-offer" => Some(("newPendingOffer", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "product-external-name" => Some(("productExternalName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "quote-external-name" => Some(("quoteExternalName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "message-to-user" => Some(("messageToUser", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "subscription-end-time" => Some(("subscriptionEndTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "name" => Some(("name", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "product" => Some(("product", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "create-time" => Some(("createTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "new-offer-start-time" => Some(("newOfferStartTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "new-offer-end-time" => Some(("newOfferEndTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "new-pending-plan" => Some(("newPendingPlan", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "offer-duration" => Some(("offerDuration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "new-pending-offer-duration" => Some(("newPendingOfferDuration", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "state" => Some(("state", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "order-id" => Some(("orderId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "provider" => Some(("provider", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "update-time" => Some(("updateTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "offer" => Some(("offer", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "offer-end-time" => Some(("offerEndTime", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "account" => Some(("account", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "plan" => Some(("plan", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "cancellation-reason" => Some(("cancellationReason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "entitlement-benefit-ids" => Some(("entitlementBenefitIds", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Vec })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["account", "cancellation-reason", "create-time", "entitlement-benefit-ids", "message-to-user", "name", "new-offer-end-time", "new-offer-start-time", "new-pending-offer", "new-pending-offer-duration", "new-pending-plan", "offer", "offer-duration", "offer-end-time", "order-id", "plan", "product", "product-external-name", "provider", "quote-external-name", "state", "subscription-end-time", "update-time", "usage-reporting-id"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::Entitlement = json::value::from_value(object).unwrap(); + let mut call = self.hub.providers().entitlements_patch(request, opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + "update-mask" => { + call = call.update_mask( value.map(|v| arg_from_str(v, err, "update-mask", "google-fieldmask")).unwrap_or(FieldMask::default())); + }, + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend(["update-mask"].iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit().await, + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema).expect("serde to work"); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + async fn _providers_entitlements_reject(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "reason" => Some(("reason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["reason"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::RejectEntitlementRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.providers().entitlements_reject(request, opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit().await, + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema).expect("serde to work"); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + async fn _providers_entitlements_reject_plan_change(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "reason" => Some(("reason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + "pending-plan-name" => Some(("pendingPlanName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["pending-plan-name", "reason"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::RejectEntitlementPlanChangeRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.providers().entitlements_reject_plan_change(request, opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit().await, + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema).expect("serde to work"); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + async fn _providers_entitlements_suspend(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError) + -> Result<(), DoitError> { + + let mut field_cursor = FieldCursor::default(); + let mut object = json::value::Value::Object(Default::default()); + + for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let last_errc = err.issues.len(); + let (key, value) = parse_kv_arg(&*kvarg, err, false); + let mut temp_cursor = field_cursor.clone(); + if let Err(field_err) = temp_cursor.set(&*key) { + err.issues.push(field_err); + } + if value.is_none() { + field_cursor = temp_cursor.clone(); + if err.issues.len() > last_errc { + err.issues.remove(last_errc); + } + continue; + } + + let type_info: Option<(&'static str, JsonTypeInfo)> = + match &temp_cursor.to_string()[..] { + "reason" => Some(("reason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })), + _ => { + let suggestion = FieldCursor::did_you_mean(key, &vec!["reason"]); + err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string())))); + None + } + }; + if let Some((field_cursor_str, type_info)) = type_info { + FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor); + } + } + let mut request: api::SuspendEntitlementRequest = json::value::from_value(object).unwrap(); + let mut call = self.hub.providers().entitlements_suspend(request, opt.value_of("name").unwrap_or("")); + for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + let (key, value) = parse_kv_arg(&*parg, err, false); + match key { + _ => { + let mut found = false; + for param in &self.gp { + if key == *param { + found = true; + call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset")); + break; + } + } + if !found { + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v } )); + } + } + } + } + let protocol = CallType::Standard; + if dry_run { + Ok(()) + } else { + assert!(err.issues.len() == 0); + for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() { + call = call.add_scope(scope); + } + let mut ostream = match writer_from_opts(opt.value_of("out")) { + Ok(mut f) => f, + Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)), + }; + match match protocol { + CallType::Standard => call.doit().await, + _ => unreachable!() + } { + Err(api_err) => Err(DoitError::ApiError(api_err)), + Ok((mut response, output_schema)) => { + let mut value = json::value::to_value(&output_schema).expect("serde to work"); + remove_json_null_values(&mut value); + json::to_writer_pretty(&mut ostream, &value).unwrap(); + ostream.flush().unwrap(); + Ok(()) + } + } + } + } + + async fn _doit(&self, dry_run: bool) -> Result, Option> { + let mut err = InvalidOptionsError::new(); + let mut call_result: Result<(), DoitError> = Ok(()); + let mut err_opt: Option = None; + match self.opt.subcommand() { + ("providers", Some(opt)) => { + match opt.subcommand() { + ("accounts-approve", Some(opt)) => { + call_result = self._providers_accounts_approve(opt, dry_run, &mut err).await; + }, + ("accounts-get", Some(opt)) => { + call_result = self._providers_accounts_get(opt, dry_run, &mut err).await; + }, + ("accounts-list", Some(opt)) => { + call_result = self._providers_accounts_list(opt, dry_run, &mut err).await; + }, + ("accounts-reject", Some(opt)) => { + call_result = self._providers_accounts_reject(opt, dry_run, &mut err).await; + }, + ("accounts-reset", Some(opt)) => { + call_result = self._providers_accounts_reset(opt, dry_run, &mut err).await; + }, + ("entitlements-approve", Some(opt)) => { + call_result = self._providers_entitlements_approve(opt, dry_run, &mut err).await; + }, + ("entitlements-approve-plan-change", Some(opt)) => { + call_result = self._providers_entitlements_approve_plan_change(opt, dry_run, &mut err).await; + }, + ("entitlements-get", Some(opt)) => { + call_result = self._providers_entitlements_get(opt, dry_run, &mut err).await; + }, + ("entitlements-list", Some(opt)) => { + call_result = self._providers_entitlements_list(opt, dry_run, &mut err).await; + }, + ("entitlements-patch", Some(opt)) => { + call_result = self._providers_entitlements_patch(opt, dry_run, &mut err).await; + }, + ("entitlements-reject", Some(opt)) => { + call_result = self._providers_entitlements_reject(opt, dry_run, &mut err).await; + }, + ("entitlements-reject-plan-change", Some(opt)) => { + call_result = self._providers_entitlements_reject_plan_change(opt, dry_run, &mut err).await; + }, + ("entitlements-suspend", Some(opt)) => { + call_result = self._providers_entitlements_suspend(opt, dry_run, &mut err).await; + }, + _ => { + err.issues.push(CLIError::MissingMethodError("providers".to_string())); + writeln!(io::stderr(), "{}\n", opt.usage()).ok(); + } + } + }, + _ => { + err.issues.push(CLIError::MissingCommandError); + writeln!(io::stderr(), "{}\n", self.opt.usage()).ok(); + } + } + + if dry_run { + if err.issues.len() > 0 { + err_opt = Some(err); + } + Err(err_opt) + } else { + Ok(call_result) + } + } + + // Please note that this call will fail if any part of the opt can't be handled + async fn new(opt: ArgMatches<'n>, connector: S) -> Result, InvalidOptionsError> { + let (config_dir, secret) = { + let config_dir = match client::assure_config_dir_exists(opt.value_of("folder").unwrap_or("~/.google-service-cli")) { + Err(e) => return Err(InvalidOptionsError::single(e, 3)), + Ok(p) => p, + }; + + match client::application_secret_from_directory(&config_dir, "cloudcommerceprocurement1-secret.json", + "{\"installed\":{\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"client_secret\":\"hCsslbCUyfehWMmbkG8vTYxG\",\"token_uri\":\"https://accounts.google.com/o/oauth2/token\",\"client_email\":\"\",\"redirect_uris\":[\"urn:ietf:wg:oauth:2.0:oob\",\"oob\"],\"client_x509_cert_url\":\"\",\"client_id\":\"620010449518-9ngf7o4dhs0dka470npqvor6dc5lqb9b.apps.googleusercontent.com\",\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\"}}") { + Ok(secret) => (config_dir, secret), + Err(e) => return Err(InvalidOptionsError::single(e, 4)) + } + }; + + let client = hyper::Client::builder().build(connector); + + let auth = oauth2::InstalledFlowAuthenticator::with_client( + secret, + oauth2::InstalledFlowReturnMethod::HTTPRedirect, + client.clone(), + ).persist_tokens_to_disk(format!("{}/cloudcommerceprocurement1", config_dir)).build().await.unwrap(); + + let engine = Engine { + opt: opt, + hub: api::CloudCommercePartnerProcurementService::new(client, auth), + gp: vec!["$-xgafv", "access-token", "alt", "callback", "fields", "key", "oauth-token", "pretty-print", "quota-user", "upload-type", "upload-protocol"], + gpm: vec![ + ("$-xgafv", "$.xgafv"), + ("access-token", "access_token"), + ("oauth-token", "oauth_token"), + ("pretty-print", "prettyPrint"), + ("quota-user", "quotaUser"), + ("upload-type", "uploadType"), + ("upload-protocol", "upload_protocol"), + ] + }; + + match engine._doit(true).await { + Err(Some(err)) => Err(err), + Err(None) => Ok(engine), + Ok(_) => unreachable!(), + } + } + + async fn doit(&self) -> Result<(), DoitError> { + match self._doit(false).await { + Ok(res) => res, + Err(_) => unreachable!(), + } + } +} + +#[tokio::main] +async fn main() { + let mut exit_status = 0i32; + let arg_data = [ + ("providers", "methods: 'accounts-approve', 'accounts-get', 'accounts-list', 'accounts-reject', 'accounts-reset', 'entitlements-approve', 'entitlements-approve-plan-change', 'entitlements-get', 'entitlements-list', 'entitlements-patch', 'entitlements-reject', 'entitlements-reject-plan-change' and 'entitlements-suspend'", vec![ + ("accounts-approve", + Some(r##"Grants an approval on an Account."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli/providers_accounts-approve", + vec![ + (Some(r##"name"##), + None, + Some(r##"Required. The resource name of the account, with the format `providers/{providerId}/accounts/{accountId}`."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("accounts-get", + Some(r##"Gets a requested Account resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli/providers_accounts-get", + vec![ + (Some(r##"name"##), + None, + Some(r##"Required. The name of the account to retrieve."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("accounts-list", + Some(r##"Lists Accounts that the provider has access to."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli/providers_accounts-list", + vec![ + (Some(r##"parent"##), + None, + Some(r##"Required. The parent resource name."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("accounts-reject", + Some(r##"Rejects an approval on an Account."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli/providers_accounts-reject", + vec![ + (Some(r##"name"##), + None, + Some(r##"Required. The resource name of the account."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("accounts-reset", + Some(r##"Resets an Account and cancels all associated Entitlements. Partner can only reset accounts they own rather than customer accounts."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli/providers_accounts-reset", + vec![ + (Some(r##"name"##), + None, + Some(r##"Required. The resource name of the account."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("entitlements-approve", + Some(r##"Approves an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to approve the creation of the entitlement resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli/providers_entitlements-approve", + vec![ + (Some(r##"name"##), + None, + Some(r##"Required. The resource name of the entitlement, with the format `providers/{providerId}/entitlements/{entitlementId}`."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("entitlements-approve-plan-change", + Some(r##"Approves an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to approve the plan change on the entitlement resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli/providers_entitlements-approve-plan-change", + vec![ + (Some(r##"name"##), + None, + Some(r##"Required. The resource name of the entitlement."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("entitlements-get", + Some(r##"Gets a requested Entitlement resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli/providers_entitlements-get", + vec![ + (Some(r##"name"##), + None, + Some(r##"Required. The name of the entitlement to retrieve."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("entitlements-list", + Some(r##"Lists Entitlements for which the provider has read access."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli/providers_entitlements-list", + vec![ + (Some(r##"parent"##), + None, + Some(r##"Required. The parent resource name."##), + Some(true), + Some(false)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("entitlements-patch", + Some(r##"Updates an existing Entitlement."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli/providers_entitlements-patch", + vec![ + (Some(r##"name"##), + None, + Some(r##"Required. The name of the entitlement to update."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("entitlements-reject", + Some(r##"Rejects an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to reject the creation of the entitlement resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli/providers_entitlements-reject", + vec![ + (Some(r##"name"##), + None, + Some(r##"Required. The resource name of the entitlement."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("entitlements-reject-plan-change", + Some(r##"Rejects an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to reject the plan change on the entitlement resource."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli/providers_entitlements-reject-plan-change", + vec![ + (Some(r##"name"##), + None, + Some(r##"Required. The resource name of the entitlement."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ("entitlements-suspend", + Some(r##"Requests suspension of an active Entitlement. This is not yet supported."##), + "Details at http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli/providers_entitlements-suspend", + vec![ + (Some(r##"name"##), + None, + Some(r##"Required. The name of the entitlement to suspend."##), + Some(true), + Some(false)), + + (Some(r##"kv"##), + Some(r##"r"##), + Some(r##"Set various fields of the request structure, matching the key=value form"##), + Some(true), + Some(true)), + + (Some(r##"v"##), + Some(r##"p"##), + Some(r##"Set various optional parameters, matching the key=value form"##), + Some(false), + Some(true)), + + (Some(r##"out"##), + Some(r##"o"##), + Some(r##"Specify the file into which to write the program's output"##), + Some(false), + Some(false)), + ]), + ]), + + ]; + + let mut app = App::new("cloudcommerceprocurement1") + .author("Sebastian Thiel ") + .version("5.0.5+20240804") + .about("Partner API for the Cloud Commerce Procurement Service.") + .after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_cloudcommerceprocurement1_cli") + .arg(Arg::with_name("url") + .long("scope") + .help("Specify the authentication a method should be executed in. Each scope requires the user to grant this application permission to use it.If unset, it defaults to the shortest scope url for a particular method.") + .multiple(true) + .takes_value(true)) + .arg(Arg::with_name("folder") + .long("config-dir") + .help("A directory into which we will store our persistent data. Defaults to a user-writable directory that we will create during the first invocation.[default: ~/.google-service-cli") + .multiple(false) + .takes_value(true)) + .arg(Arg::with_name("debug") + .long("debug") + .help("Debug print all errors") + .multiple(false) + .takes_value(false)); + + for &(main_command_name, about, ref subcommands) in arg_data.iter() { + let mut mcmd = SubCommand::with_name(main_command_name).about(about); + + for &(sub_command_name, ref desc, url_info, ref args) in subcommands { + let mut scmd = SubCommand::with_name(sub_command_name); + if let &Some(desc) = desc { + scmd = scmd.about(desc); + } + scmd = scmd.after_help(url_info); + + for &(ref arg_name, ref flag, ref desc, ref required, ref multi) in args { + let arg_name_str = + match (arg_name, flag) { + (&Some(an), _ ) => an, + (_ , &Some(f)) => f, + _ => unreachable!(), + }; + let mut arg = Arg::with_name(arg_name_str) + .empty_values(false); + if let &Some(short_flag) = flag { + arg = arg.short(short_flag); + } + if let &Some(desc) = desc { + arg = arg.help(desc); + } + if arg_name.is_some() && flag.is_some() { + arg = arg.takes_value(true); + } + if let &Some(required) = required { + arg = arg.required(required); + } + if let &Some(multi) = multi { + arg = arg.multiple(multi); + } + scmd = scmd.arg(arg); + } + mcmd = mcmd.subcommand(scmd); + } + app = app.subcommand(mcmd); + } + + let matches = app.get_matches(); + + let debug = matches.is_present("adebug"); + let connector = hyper_rustls::HttpsConnectorBuilder::new().with_native_roots() + .unwrap() + .https_or_http() + .enable_http1() + .build(); + + match Engine::new(matches, connector).await { + Err(err) => { + exit_status = err.exit_code; + writeln!(io::stderr(), "{}", err).ok(); + }, + Ok(engine) => { + if let Err(doit_err) = engine.doit().await { + exit_status = 1; + match doit_err { + DoitError::IoError(path, err) => { + writeln!(io::stderr(), "Failed to open output file '{}': {}", path, err).ok(); + }, + DoitError::ApiError(err) => { + if debug { + writeln!(io::stderr(), "{:#?}", err).ok(); + } else { + writeln!(io::stderr(), "{}", err).ok(); + } + } + } + } + } + } + + std::process::exit(exit_status); +} diff --git a/gen/cloudcommerceprocurement1/Cargo.toml b/gen/cloudcommerceprocurement1/Cargo.toml new file mode 100644 index 0000000000..6b54abd389 --- /dev/null +++ b/gen/cloudcommerceprocurement1/Cargo.toml @@ -0,0 +1,39 @@ +# DO NOT EDIT ! +# This file was generated automatically from 'src/generator/templates/Cargo.toml.mako' +# DO NOT EDIT ! +[package] + +name = "google-cloudcommerceprocurement1" +version = "5.0.5+20240804" +authors = ["Sebastian Thiel "] +description = "A complete library to interact with Cloud Commerce Partner Procurement Service (protocol v1)" +repository = "https://github.com/Byron/google-apis-rs/tree/main/gen/cloudcommerceprocurement1" +homepage = "https://cloud.google.com/marketplace/docs/partners/" +documentation = "https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804" +license = "MIT" +keywords = ["cloudcommerceprocure", "google", "protocol", "web", "api"] +autobins = false +edition = "2018" + + +[dependencies] +anyhow = "^ 1.0" +hyper-rustls = "0.25.0" +mime = "^ 0.3.0" +serde = { version = "^ 1.0", features = ["derive"] } +utoipa = { version = "^4.2", optional = true } +serde_json = "^ 1.0" +itertools = "0.13" +google-apis-common = { path = "../../google-apis-common", version = "6.0.3" } +hyper = "^ 0.14" +http = "^0.2" +tokio = "^1.0" +tower-service = "^0.3.1" +url = "= 1.7" + + + +[features] +yup-oauth2 = ["google-apis-common/yup-oauth2"] +default = ["yup-oauth2"] +utoipa = ["dep:utoipa"] diff --git a/gen/cloudcommerceprocurement1/LICENSE.md b/gen/cloudcommerceprocurement1/LICENSE.md new file mode 100644 index 0000000000..c14f19eef3 --- /dev/null +++ b/gen/cloudcommerceprocurement1/LICENSE.md @@ -0,0 +1,30 @@ + +The MIT License (MIT) +===================== + +Copyright 2015–2024 Sebastian Thiel + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/gen/cloudcommerceprocurement1/README.md b/gen/cloudcommerceprocurement1/README.md new file mode 100644 index 0000000000..d6d2090b64 --- /dev/null +++ b/gen/cloudcommerceprocurement1/README.md @@ -0,0 +1,197 @@ + +The `google-cloudcommerceprocurement1` library allows access to all features of the *Google Cloud Commerce Partner Procurement Service* service. + +This documentation was generated from *Cloud Commerce Partner Procurement Service* crate version *5.0.5+20240804*, where *20240804* is the exact revision of the *cloudcommerceprocurement:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.5*. + +Everything else about the *Cloud Commerce Partner Procurement Service* *v1* API can be found at the +[official documentation site](https://cloud.google.com/marketplace/docs/partners/). +# Features + +Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/CloudCommercePartnerProcurementService) ... + +* providers + * [*accounts approve*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/api::ProviderAccountApproveCall), [*accounts get*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/api::ProviderAccountGetCall), [*accounts list*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/api::ProviderAccountListCall), [*accounts reject*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/api::ProviderAccountRejectCall), [*accounts reset*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/api::ProviderAccountResetCall), [*entitlements approve*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/api::ProviderEntitlementApproveCall), [*entitlements approve plan change*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/api::ProviderEntitlementApprovePlanChangeCall), [*entitlements get*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/api::ProviderEntitlementGetCall), [*entitlements list*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/api::ProviderEntitlementListCall), [*entitlements patch*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/api::ProviderEntitlementPatchCall), [*entitlements reject*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/api::ProviderEntitlementRejectCall), [*entitlements reject plan change*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/api::ProviderEntitlementRejectPlanChangeCall) and [*entitlements suspend*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/api::ProviderEntitlementSuspendCall) + + + + +# Structure of this Library + +The API is structured into the following primary items: + +* **[Hub](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/CloudCommercePartnerProcurementService)** + * a central object to maintain state and allow accessing all *Activities* + * creates [*Method Builders*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::MethodsBuilder) which in turn + allow access to individual [*Call Builders*](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::CallBuilder) +* **[Resources](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::Resource)** + * primary types that you can apply *Activities* to + * a collection of properties and *Parts* + * **[Parts](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::Part)** + * a collection of properties + * never directly used in *Activities* +* **[Activities](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::CallBuilder)** + * 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 +let r = hub.resource().activity(...).doit().await +``` + +Or specifically ... + +```ignore +let r = hub.providers().entitlements_suspend(...).doit().await +let r = hub.providers().entitlements_reject_plan_change(...).doit().await +let r = hub.providers().entitlements_approve(...).doit().await +let r = hub.providers().entitlements_approve_plan_change(...).doit().await +let r = hub.providers().entitlements_reject(...).doit().await +let r = hub.providers().accounts_approve(...).doit().await +let r = hub.providers().accounts_reject(...).doit().await +let r = hub.providers().accounts_reset(...).doit().await +``` + +The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` +supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be +specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired. +The `doit()` method performs the actual communication with the server and returns the respective result. + +# Usage + +## Setting up your Project + +To use this library, you would put the following lines into your `Cargo.toml` file: + +```toml +[dependencies] +google-cloudcommerceprocurement1 = "*" +serde = "^1.0" +serde_json = "^1.0" +``` + +## A complete example + +```Rust +extern crate hyper; +extern crate hyper_rustls; +extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +use cloudcommerceprocurement1::api::SuspendEntitlementRequest; +use cloudcommerceprocurement1::{Result, Error}; +use std::default::Default; +use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; + +// Get an ApplicationSecret instance by some means. It contains the `client_id` and +// `client_secret`, among other things. +let secret: oauth2::ApplicationSecret = Default::default(); +// Instantiate the authenticator. It will choose a suitable authentication flow for you, +// unless you replace `None` with the desired Flow. +// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about +// what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and +// retrieve them from storage. +let auth = oauth2::InstalledFlowAuthenticator::builder( + secret, + oauth2::InstalledFlowReturnMethod::HTTPRedirect, + ).build().await.unwrap(); +let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +// As the method needs a request, you would usually fill it with the desired information +// into the respective structure. Some of the parts shown here might not be applicable ! +// Values shown here are possibly random and not representative ! +let mut req = SuspendEntitlementRequest::default(); + +// You can configure optional parameters by calling the respective setters at will, and +// execute the final call using `doit()`. +// Values shown here are possibly random and not representative ! +let result = hub.providers().entitlements_suspend(req, "name") + .doit().await; + +match result { + Err(e) => match e { + // The Error enum provides details about what exactly happened. + // You can also just use its `Debug`, `Display` or `Error` traits + Error::HttpError(_) + |Error::Io(_) + |Error::MissingAPIKey + |Error::MissingToken(_) + |Error::Cancelled + |Error::UploadSizeLimitExceeded(_, _) + |Error::Failure(_) + |Error::BadRequest(_) + |Error::FieldClash(_) + |Error::JsonDecodeError(_, _) => println!("{}", e), + }, + Ok(res) => println!("Success: {:?}", res), +} + +``` +## Handling Errors + +All errors produced by the system are provided either as [Result](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::Result) enumeration as return value of +the doit() methods, or handed as possibly intermediate results to either the +[Hub Delegate](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). + +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 Downloads +If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::Result), should be +read by you to obtain the media. +If such a method also supports a [Response Result](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::ResponseResult), it will return that by default. +You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making +this call: `.param("alt", "media")`. + +Methods supporting uploads can do so using up to 2 different protocols: +*simple* and *resumable*. The distinctiveness of each is represented by customized +`doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively. + +## Customization and Callbacks + +You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::Delegate) to the +[Method Builder](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::CallBuilder) before making the final `doit()` call. +Respective methods will be called to provide progress information, as well as determine whether the system should +retry on failure. + +The [delegate trait](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::Delegate) is default-implemented, allowing you to customize it with minimal effort. + +## Optional Parts in Server-Requests + +All structures provided by this library are made to be [encodable](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::RequestValue) and +[decodable](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses +are valid. +Most optionals are are considered [Parts](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::Part) 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 + +Using [method builders](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods. +These will always take a single argument, for which the following statements are true. + +* [PODs][wiki-pod] are handed by copy +* strings are passed as `&str` +* [request values](https://docs.rs/google-cloudcommerceprocurement1/5.0.5+20240804/google_cloudcommerceprocurement1/client::RequestValue) are moved + +Arguments will always be copied or cloned into the builder, to make them independent of their original life times. + +[wiki-pod]: http://en.wikipedia.org/wiki/Plain_old_data_structure +[builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern +[google-go-api]: https://github.com/google/google-api-go-client + +## Cargo Features + +* `utoipa` - Add support for [utoipa](https://crates.io/crates/utoipa) and derive `utoipa::ToSchema` on all +the types. You'll have to import and register the required types in `#[openapi(schemas(...))]`, otherwise the +generated `openapi` spec would be invalid. + + +# License +The **cloudcommerceprocurement1** library was generated by Sebastian Thiel, and is placed +under the *MIT* license. +You can read the full text at the repository's [license file][repo-license]. + +[repo-license]: https://github.com/Byron/google-apis-rsblob/main/LICENSE.md + diff --git a/gen/cloudcommerceprocurement1/src/api.rs b/gen/cloudcommerceprocurement1/src/api.rs new file mode 100644 index 0000000000..5eaf5a1c6e --- /dev/null +++ b/gen/cloudcommerceprocurement1/src/api.rs @@ -0,0 +1,4660 @@ +use std::collections::HashMap; +use std::cell::RefCell; +use std::default::Default; +use std::collections::BTreeSet; +use std::error::Error as StdError; +use serde_json as json; +use std::io; +use std::fs; +use std::mem; + +use hyper::client::connect; +use tokio::io::{AsyncRead, AsyncWrite}; +use tokio::time::sleep; +use tower_service; +use serde::{Serialize, Deserialize}; + +use crate::{client, client::GetToken, client::serde_with}; + +// ############## +// UTILITIES ### +// ############ + +/// Identifies the an OAuth2 authorization scope. +/// A scope is needed when requesting an +/// [authorization token](https://developers.google.com/youtube/v3/guides/authentication). +#[derive(PartialEq, Eq, Ord, PartialOrd, Hash, Debug, Clone, Copy)] +pub enum Scope { + /// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. + CloudPlatform, +} + +impl AsRef for Scope { + fn as_ref(&self) -> &str { + match *self { + Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform", + } + } +} + +impl Default for Scope { + fn default() -> Scope { + Scope::CloudPlatform + } +} + + + +// ######## +// HUB ### +// ###### + +/// Central instance to access all CloudCommercePartnerProcurementService related resource activities +/// +/// # Examples +/// +/// Instantiate a new hub +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate hyper_rustls; +/// extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// use cloudcommerceprocurement1::api::SuspendEntitlementRequest; +/// use cloudcommerceprocurement1::{Result, Error}; +/// # async fn dox() { +/// use std::default::Default; +/// use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and +/// // `client_secret`, among other things. +/// let secret: oauth2::ApplicationSecret = Default::default(); +/// // Instantiate the authenticator. It will choose a suitable authentication flow for you, +/// // unless you replace `None` with the desired Flow. +/// // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about +/// // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and +/// // retrieve them from storage. +/// let auth = oauth2::InstalledFlowAuthenticator::builder( +/// secret, +/// oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// ).build().await.unwrap(); +/// let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = SuspendEntitlementRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.providers().entitlements_suspend(req, "name") +/// .doit().await; +/// +/// match result { +/// Err(e) => match e { +/// // The Error enum provides details about what exactly happened. +/// // You can also just use its `Debug`, `Display` or `Error` traits +/// Error::HttpError(_) +/// |Error::Io(_) +/// |Error::MissingAPIKey +/// |Error::MissingToken(_) +/// |Error::Cancelled +/// |Error::UploadSizeLimitExceeded(_, _) +/// |Error::Failure(_) +/// |Error::BadRequest(_) +/// |Error::FieldClash(_) +/// |Error::JsonDecodeError(_, _) => println!("{}", e), +/// }, +/// Ok(res) => println!("Success: {:?}", res), +/// } +/// # } +/// ``` +#[derive(Clone)] +pub struct CloudCommercePartnerProcurementService { + pub client: hyper::Client, + pub auth: Box, + _user_agent: String, + _base_url: String, + _root_url: String, +} + +impl<'a, S> client::Hub for CloudCommercePartnerProcurementService {} + +impl<'a, S> CloudCommercePartnerProcurementService { + + pub fn new(client: hyper::Client, auth: A) -> CloudCommercePartnerProcurementService { + CloudCommercePartnerProcurementService { + client, + auth: Box::new(auth), + _user_agent: "google-api-rust-client/5.0.5".to_string(), + _base_url: "https://cloudcommerceprocurement.googleapis.com/".to_string(), + _root_url: "https://cloudcommerceprocurement.googleapis.com/".to_string(), + } + } + + pub fn providers(&'a self) -> ProviderMethods<'a, S> { + ProviderMethods { hub: &self } + } + + /// Set the user-agent header field to use in all requests to the server. + /// It defaults to `google-api-rust-client/5.0.5`. + /// + /// Returns the previously set user-agent. + pub fn user_agent(&mut self, agent_name: String) -> String { + mem::replace(&mut self._user_agent, agent_name) + } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://cloudcommerceprocurement.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + mem::replace(&mut self._base_url, new_base_url) + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://cloudcommerceprocurement.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + mem::replace(&mut self._root_url, new_root_url) + } +} + + +// ############ +// SCHEMAS ### +// ########## +/// Request message for PartnerProcurementService.ResetAccount. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [accounts reset providers](ProviderAccountResetCall) (request) +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ResetAccountRequest { _never_set: Option } + +impl client::RequestValue for ResetAccountRequest {} + + +/// Request message for PartnerProcurementService.RejectEntitlementPlanChange. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [entitlements reject plan change providers](ProviderEntitlementRejectPlanChangeCall) (request) +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct RejectEntitlementPlanChangeRequest { + /// Free form text string explaining the rejection reason. Max allowed length: 256 bytes. Longer strings will be truncated. + + pub reason: Option, + /// Required. Name of the pending plan that is being rejected. + #[serde(rename="pendingPlanName")] + + pub pending_plan_name: Option, +} + +impl client::RequestValue for RejectEntitlementPlanChangeRequest {} + + +/// Request message for PartnerProcurementService.RejectAccount. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [accounts reject providers](ProviderAccountRejectCall) (request) +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct RejectAccountRequest { + /// Free form text string explaining the rejection reason. Max allowed length: 256 bytes. Longer strings will be truncated. + + pub reason: Option, + /// The name of the approval being rejected. If absent and there is only one approval possible, that approval will be rejected. If absent and there are many approvals possible, the request will fail with a 400 Bad Request. Optional. + #[serde(rename="approvalName")] + + pub approval_name: Option, +} + +impl client::RequestValue for RejectAccountRequest {} + + +/// Response message for \[PartnerProcurementService.ListAccounts\[\]. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [accounts list providers](ProviderAccountListCall) (response) +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListAccountsResponse { + /// The token for fetching the next page. + #[serde(rename="nextPageToken")] + + pub next_page_token: Option, + /// The list of accounts in this response. + + pub accounts: Option>, +} + +impl client::ResponseResult for ListAccountsResponse {} + + +/// Response message for PartnerProcurementService.ListEntitlements. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [entitlements list providers](ProviderEntitlementListCall) (response) +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ListEntitlementsResponse { + /// The list of entitlements in this response. + + pub entitlements: Option>, + /// The token for fetching the next page. + #[serde(rename="nextPageToken")] + + pub next_page_token: Option, +} + +impl client::ResponseResult for ListEntitlementsResponse {} + + +/// Represents a procured product of a customer. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [entitlements get providers](ProviderEntitlementGetCall) (response) +/// * [entitlements patch providers](ProviderEntitlementPatchCall) (request|response) +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Entitlement { + /// Output only. The consumerId to use when reporting usage through the Service Control API. See the consumerId field at [Reporting Metrics](https://cloud.google.com/service-control/reporting-metrics) for more details. This field is present only if the product has usage-based billing configured. + #[serde(rename="usageReportingId")] + + pub usage_reporting_id: Option, + /// Output only. The name of the offer the entitlement is switching to upon a pending plan change. Only exists if the pending plan change is moving to an offer. This field isn't populated for entitlements which aren't active yet. Format: 'projects/{project}/services/{service}/privateOffers/{offer-id}' OR 'projects/{project}/services/{service}/standardOffers/{offer-id}', depending on whether the offer is private or public. The {service} in the name is the listing service of the offer. It could be either the product service that the offer is referencing, or a generic private offer parent service. We recommend that you don't build your integration to rely on the meaning of this {service} part. + #[serde(rename="newPendingOffer")] + + pub new_pending_offer: Option, + /// Output only. The identifier of the product that was procured. + #[serde(rename="productExternalName")] + + pub product_external_name: Option, + /// Output only. The identifier of the quote that was used to procure. Empty if the order is not purchased using a quote. + #[serde(rename="quoteExternalName")] + + pub quote_external_name: Option, + /// Provider-supplied message that is displayed to the end user. Currently this is used to communicate progress and ETA for provisioning. This field can be updated only when a user is waiting for an action from the provider, i.e. entitlement state is EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED or EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL. This field is cleared automatically when the entitlement state changes. + #[serde(rename="messageToUser")] + + pub message_to_user: Option, + /// Output only. End time for the subscription corresponding to this entitlement. + #[serde(rename="subscriptionEndTime")] + + pub subscription_end_time: Option>, + /// Output only. The resource name of the entitlement. Entitlement names have the form `providers/{provider_id}/entitlements/{entitlement_id}`. + + pub name: Option, + /// Output only. The identifier of the entity that was purchased. This may actually represent a product, quote, or offer. We strongly recommend that you use the following more explicit fields: productExternalName, quoteExternalName, or offer. + + pub product: Option, + /// Output only. The creation timestamp. + #[serde(rename="createTime")] + + pub create_time: Option>, + /// Output only. The timestamp when the new offer becomes effective. This field is populated even if the entitlement isn't active yet. If there's no upcoming offer, the field is empty. + #[serde(rename="newOfferStartTime")] + + pub new_offer_start_time: Option>, + /// Output only. The end time of the new offer. If the offer was created with a term instead of a specified end date, this field is empty. This field is populated even if the entitlement isn't active yet. If there's no upcoming offer, the field is be empty. + #[serde(rename="newOfferEndTime")] + + pub new_offer_end_time: Option>, + /// Output only. The identifier of the pending new plan. Required if the product has plans and the entitlement has a pending plan change. + #[serde(rename="newPendingPlan")] + + pub new_pending_plan: Option, + /// Output only. The offer duration of the current offer in ISO 8601 duration format. Field is empty if entitlement was not made using an offer. If the offer was created with a specified end date instead of a duration, this field is empty. + #[serde(rename="offerDuration")] + + pub offer_duration: Option, + /// Output only. The duration of the new offer, in ISO 8601 duration format. This field isn't populated for entitlements which aren't active yet, only for pending offer changes. If the offer was created with a specified end date instead of a duration, this field is empty. + #[serde(rename="newPendingOfferDuration")] + + pub new_pending_offer_duration: Option, + /// Output only. The state of the entitlement. + + pub state: Option, + /// Output only. The resources using this entitlement, if applicable. + + pub consumers: Option>, + /// Output only. The order ID of this entitlement, without any `orders/` resource name prefix. + #[serde(rename="orderId")] + + pub order_id: Option, + /// Output only. The identifier of the service provider that this entitlement was created against. Each service provider is assigned a unique provider value when they onboard with Cloud Commerce platform. + + pub provider: Option, + /// Output only. The last update timestamp. + #[serde(rename="updateTime")] + + pub update_time: Option>, + /// Output only. The name of the offer that was procured. Field is empty if order was not made using an offer. Format: 'projects/{project}/services/{service}/privateOffers/{offer-id}' OR 'projects/{project}/services/{service}/standardOffers/{offer-id}', depending on whether the offer is private or public. The {service} in the name is the listing service of the offer. It could be either the product service that the offer is referencing, or a generic private offer parent service. We recommend that you don't build your integration to rely on the meaning of this {service} part. + + pub offer: Option, + /// Output only. End time for the Offer association corresponding to this entitlement. The field is only populated if the entitlement is currently associated with an Offer. + #[serde(rename="offerEndTime")] + + pub offer_end_time: Option>, + /// Output only. The resource name of the account that this entitlement is based on, if any. + + pub account: Option, + /// Output only. The identifier of the plan that was procured. Required if the product has plans. + + pub plan: Option, + /// Output only. The reason the entitlement was cancelled. If this entitlement wasn't cancelled, this field is empty. Possible values include "unknown", "expired", "user-cancelled", "account-closed", "billing-disabled" (if the customer has manually disabled billing to their resources), "user-aborted", and "migrated" (if the entitlement has migrated across products). Values of this field are subject to change, and we recommend that you don't build your technical integration to rely on these fields. + #[serde(rename="cancellationReason")] + + pub cancellation_reason: Option, + /// Output only. The entitlement benefit IDs associated with the purchase. + #[serde(rename="entitlementBenefitIds")] + + pub entitlement_benefit_ids: Option>, + /// Output only. The custom properties that were collected from the user to create this entitlement. + #[serde(rename="inputProperties")] + + pub input_properties: Option>, +} + +impl client::RequestValue for Entitlement {} +impl client::ResponseResult for Entitlement {} + + +/// Request message for PartnerProcurementService.ApproveAccount. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [accounts approve providers](ProviderAccountApproveCall) (request) +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ApproveAccountRequest { + /// The name of the approval being approved. If absent and there is only one approval possible, that approval will be granted. If absent and there are many approvals possible, the request will fail with a 400 Bad Request. Optional. + #[serde(rename="approvalName")] + + pub approval_name: Option, + /// Free form text string explaining the approval reason. Optional. Max allowed length: 256 bytes. Longer strings will be truncated. + + pub reason: Option, + /// Set of properties that should be associated with the account. Optional. + + pub properties: Option>, +} + +impl client::RequestValue for ApproveAccountRequest {} + + +/// A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [entitlements suspend providers](ProviderEntitlementSuspendCall) (response) +/// * [entitlements reject plan change providers](ProviderEntitlementRejectPlanChangeCall) (response) +/// * [entitlements approve providers](ProviderEntitlementApproveCall) (response) +/// * [entitlements approve plan change providers](ProviderEntitlementApprovePlanChangeCall) (response) +/// * [entitlements reject providers](ProviderEntitlementRejectCall) (response) +/// * [accounts approve providers](ProviderAccountApproveCall) (response) +/// * [accounts reject providers](ProviderAccountRejectCall) (response) +/// * [accounts reset providers](ProviderAccountResetCall) (response) +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Empty { _never_set: Option } + +impl client::ResponseResult for Empty {} + + +/// Request message for ParterProcurementService.SuspendEntitlement. This is not yet supported. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [entitlements suspend providers](ProviderEntitlementSuspendCall) (request) +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct SuspendEntitlementRequest { + /// A free-form reason string, explaining the reason for suspension request. + + pub reason: Option, +} + +impl client::RequestValue for SuspendEntitlementRequest {} + + +/// Request message for PartnerProcurementService.RejectEntitlement. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [entitlements reject providers](ProviderEntitlementRejectCall) (request) +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct RejectEntitlementRequest { + /// Free form text string explaining the rejection reason. Max allowed length: 256 bytes. Longer strings will be truncated. + + pub reason: Option, +} + +impl client::RequestValue for RejectEntitlementRequest {} + + +/// A resource using (consuming) this entitlement. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Consumer { + /// A project name with format `projects/`. + + pub project: Option, +} + +impl client::Part for Consumer {} + + +/// Represents an account that was established by the customer on the service provider’s system. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [accounts get providers](ProviderAccountGetCall) (response) +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Account { + /// Output only. The identifier of the service provider that this account was created against. Each service provider is assigned a unique provider value when they onboard with Cloud Commerce platform. + + pub provider: Option, + /// Output only. The approvals for this account. These approvals are used to track actions that are permitted or have been completed by a customer within the context of the provider. This might include a sign up flow or a provisioning step, for example, that the provider can admit to having happened. + + pub approvals: Option>, + /// Output only. The resource name of the account. Account names have the form `accounts/{account_id}`. + + pub name: Option, + /// Output only. The creation timestamp. + #[serde(rename="createTime")] + + pub create_time: Option>, + /// Output only. The state of the account. This is used to decide whether the customer is in good standing with the provider and is able to make purchases. An account might not be able to make a purchase if the billing account is suspended, for example. + + pub state: Option, + /// Output only. The last update timestamp. + #[serde(rename="updateTime")] + + pub update_time: Option>, + /// Output only. The custom properties that were collected from the user to create this account. + #[serde(rename="inputProperties")] + + pub input_properties: Option>, +} + +impl client::ResponseResult for Account {} + + +/// An approval for some action on an account. +/// +/// This type is not used in any activity, and only used as *part* of another schema. +/// +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct Approval { + /// Output only. The state of the approval. + + pub state: Option, + /// Output only. The name of the approval. + + pub name: Option, + /// Output only. An explanation for the state of the approval. + + pub reason: Option, + /// Optional. The last update timestamp of the approval. + #[serde(rename="updateTime")] + + pub update_time: Option>, +} + +impl client::Part for Approval {} + + +/// Request message for \[PartnerProcurementService.ApproveEntitlement\[\]. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [entitlements approve providers](ProviderEntitlementApproveCall) (request) +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ApproveEntitlementRequest { + /// Optional. The resource name of the entitlement that was migrated, with the format `providers/{provider_id}/entitlements/{entitlement_id}`. Should only be sent when resources have been migrated from entitlement_migrated to the new entitlement. Optional. + #[serde(rename="entitlementMigrated")] + + pub entitlement_migrated: Option, + /// Set of properties that should be associated with the entitlement. Optional. + + pub properties: Option>, +} + +impl client::RequestValue for ApproveEntitlementRequest {} + + +/// Request message for \[PartnerProcurementService.ApproveEntitlementPlanChange\[\]. +/// +/// # Activities +/// +/// This type is used in activities, which are methods you may call on this type or where this type is involved in. +/// The list links the activity name, along with information about where it is used (one of *request* and *response*). +/// +/// * [entitlements approve plan change providers](ProviderEntitlementApprovePlanChangeCall) (request) +#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))] +#[serde_with::serde_as(crate = "::client::serde_with")] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] +pub struct ApproveEntitlementPlanChangeRequest { + /// Required. Name of the pending plan that's being approved. + #[serde(rename="pendingPlanName")] + + pub pending_plan_name: Option, +} + +impl client::RequestValue for ApproveEntitlementPlanChangeRequest {} + + + +// ################### +// MethodBuilders ### +// ################# + +/// A builder providing access to all methods supported on *provider* resources. +/// It is not used directly, but through the [`CloudCommercePartnerProcurementService`] hub. +/// +/// # Example +/// +/// Instantiate a resource builder +/// +/// ```test_harness,no_run +/// extern crate hyper; +/// extern crate hyper_rustls; +/// extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// +/// # async fn dox() { +/// use std::default::Default; +/// use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// let secret: oauth2::ApplicationSecret = Default::default(); +/// let auth = oauth2::InstalledFlowAuthenticator::builder( +/// secret, +/// oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// ).build().await.unwrap(); +/// let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* +/// // like `accounts_approve(...)`, `accounts_get(...)`, `accounts_list(...)`, `accounts_reject(...)`, `accounts_reset(...)`, `entitlements_approve(...)`, `entitlements_approve_plan_change(...)`, `entitlements_get(...)`, `entitlements_list(...)`, `entitlements_patch(...)`, `entitlements_reject(...)`, `entitlements_reject_plan_change(...)` and `entitlements_suspend(...)` +/// // to build up your call. +/// let rb = hub.providers(); +/// # } +/// ``` +pub struct ProviderMethods<'a, S> + where S: 'a { + + hub: &'a CloudCommercePartnerProcurementService, +} + +impl<'a, S> client::MethodsBuilder for ProviderMethods<'a, S> {} + +impl<'a, S> ProviderMethods<'a, S> { + + /// Create a builder to help you perform the following task: + /// + /// Requests suspension of an active Entitlement. This is not yet supported. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - Required. The name of the entitlement to suspend. + pub fn entitlements_suspend(&self, request: SuspendEntitlementRequest, name: &str) -> ProviderEntitlementSuspendCall<'a, S> { + ProviderEntitlementSuspendCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _additional_params: Default::default(), + _scopes: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Rejects an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to reject the plan change on the entitlement resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - Required. The resource name of the entitlement. + pub fn entitlements_reject_plan_change(&self, request: RejectEntitlementPlanChangeRequest, name: &str) -> ProviderEntitlementRejectPlanChangeCall<'a, S> { + ProviderEntitlementRejectPlanChangeCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _additional_params: Default::default(), + _scopes: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets a requested Entitlement resource. + /// + /// # Arguments + /// + /// * `name` - Required. The name of the entitlement to retrieve. + pub fn entitlements_get(&self, name: &str) -> ProviderEntitlementGetCall<'a, S> { + ProviderEntitlementGetCall { + hub: self.hub, + _name: name.to_string(), + _delegate: Default::default(), + _additional_params: Default::default(), + _scopes: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Approves an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to approve the creation of the entitlement resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - Required. The resource name of the entitlement, with the format `providers/{providerId}/entitlements/{entitlementId}`. + pub fn entitlements_approve(&self, request: ApproveEntitlementRequest, name: &str) -> ProviderEntitlementApproveCall<'a, S> { + ProviderEntitlementApproveCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _additional_params: Default::default(), + _scopes: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists Entitlements for which the provider has read access. + /// + /// # Arguments + /// + /// * `parent` - Required. The parent resource name. + pub fn entitlements_list(&self, parent: &str) -> ProviderEntitlementListCall<'a, S> { + ProviderEntitlementListCall { + hub: self.hub, + _parent: parent.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _filter: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + _scopes: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Approves an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to approve the plan change on the entitlement resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - Required. The resource name of the entitlement. + pub fn entitlements_approve_plan_change(&self, request: ApproveEntitlementPlanChangeRequest, name: &str) -> ProviderEntitlementApprovePlanChangeCall<'a, S> { + ProviderEntitlementApprovePlanChangeCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _additional_params: Default::default(), + _scopes: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Updates an existing Entitlement. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - Required. The name of the entitlement to update. + pub fn entitlements_patch(&self, request: Entitlement, name: &str) -> ProviderEntitlementPatchCall<'a, S> { + ProviderEntitlementPatchCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _update_mask: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + _scopes: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Rejects an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to reject the creation of the entitlement resource. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - Required. The resource name of the entitlement. + pub fn entitlements_reject(&self, request: RejectEntitlementRequest, name: &str) -> ProviderEntitlementRejectCall<'a, S> { + ProviderEntitlementRejectCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _additional_params: Default::default(), + _scopes: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Grants an approval on an Account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - Required. The resource name of the account, with the format `providers/{providerId}/accounts/{accountId}`. + pub fn accounts_approve(&self, request: ApproveAccountRequest, name: &str) -> ProviderAccountApproveCall<'a, S> { + ProviderAccountApproveCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _additional_params: Default::default(), + _scopes: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Rejects an approval on an Account. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - Required. The resource name of the account. + pub fn accounts_reject(&self, request: RejectAccountRequest, name: &str) -> ProviderAccountRejectCall<'a, S> { + ProviderAccountRejectCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _additional_params: Default::default(), + _scopes: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Resets an Account and cancels all associated Entitlements. Partner can only reset accounts they own rather than customer accounts. + /// + /// # Arguments + /// + /// * `request` - No description provided. + /// * `name` - Required. The resource name of the account. + pub fn accounts_reset(&self, request: ResetAccountRequest, name: &str) -> ProviderAccountResetCall<'a, S> { + ProviderAccountResetCall { + hub: self.hub, + _request: request, + _name: name.to_string(), + _delegate: Default::default(), + _additional_params: Default::default(), + _scopes: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Gets a requested Account resource. + /// + /// # Arguments + /// + /// * `name` - Required. The name of the account to retrieve. + pub fn accounts_get(&self, name: &str) -> ProviderAccountGetCall<'a, S> { + ProviderAccountGetCall { + hub: self.hub, + _name: name.to_string(), + _delegate: Default::default(), + _additional_params: Default::default(), + _scopes: Default::default(), + } + } + + /// Create a builder to help you perform the following task: + /// + /// Lists Accounts that the provider has access to. + /// + /// # Arguments + /// + /// * `parent` - Required. The parent resource name. + pub fn accounts_list(&self, parent: &str) -> ProviderAccountListCall<'a, S> { + ProviderAccountListCall { + hub: self.hub, + _parent: parent.to_string(), + _page_token: Default::default(), + _page_size: Default::default(), + _delegate: Default::default(), + _additional_params: Default::default(), + _scopes: Default::default(), + } + } +} + + + + + +// ################### +// CallBuilders ### +// ################# + +/// Requests suspension of an active Entitlement. This is not yet supported. +/// +/// A builder for the *entitlements.suspend* method supported by a *provider* resource. +/// It is not used directly, but through a [`ProviderMethods`] instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate hyper_rustls; +/// # extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// use cloudcommerceprocurement1::api::SuspendEntitlementRequest; +/// # async fn dox() { +/// # use std::default::Default; +/// # use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// # let secret: oauth2::ApplicationSecret = Default::default(); +/// # let auth = oauth2::InstalledFlowAuthenticator::builder( +/// # secret, +/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// # ).build().await.unwrap(); +/// # let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = SuspendEntitlementRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.providers().entitlements_suspend(req, "name") +/// .doit().await; +/// # } +/// ``` +pub struct ProviderEntitlementSuspendCall<'a, S> + where S: 'a { + + hub: &'a CloudCommercePartnerProcurementService, + _request: SuspendEntitlementRequest, + _name: String, + _delegate: Option<&'a mut dyn client::Delegate>, + _additional_params: HashMap, + _scopes: BTreeSet +} + +impl<'a, S> client::CallBuilder for ProviderEntitlementSuspendCall<'a, S> {} + +impl<'a, S> ProviderEntitlementSuspendCall<'a, S> +where + S: tower_service::Service + Clone + Send + Sync + 'static, + S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, + S::Future: Send + Unpin + 'static, + S::Error: Into>, +{ + + + /// Perform the operation you have build so far. + pub async fn doit(mut self) -> client::Result<(hyper::Response, Empty)> { + use std::io::{Read, Seek}; + use hyper::header::{CONTENT_TYPE, CONTENT_LENGTH, AUTHORIZATION, USER_AGENT, LOCATION}; + use client::{ToParts, url::Params}; + use std::borrow::Cow; + + let mut dd = client::DefaultDelegate; + let mut dlg: &mut dyn client::Delegate = self._delegate.unwrap_or(&mut dd); + dlg.begin(client::MethodInfo { id: "cloudcommerceprocurement.providers.entitlements.suspend", + http_method: hyper::Method::POST }); + + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(client::Error::FieldClash(field)); + } + } + + let mut params = Params::with_capacity(4 + self._additional_params.len()); + params.push("name", self._name); + + params.extend(self._additional_params.iter()); + + params.push("alt", "json"); + let mut url = self.hub._base_url.clone() + "v1/{+name}:suspend"; + if self._scopes.is_empty() { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + url = params.uri_replacement(url, param_name, find_this, true); + } + { + let to_remove = ["name"]; + params.remove_params(&to_remove); + } + + let url = params.parse_with_url(&url); + + let mut json_mime_type = mime::APPLICATION_JSON; + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + client::remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.get_token(&self._scopes.iter().map(String::as_str).collect::>()[..]).await { + Ok(token) => token, + Err(e) => { + match dlg.token(e) { + Ok(token) => token, + Err(e) => { + dlg.finished(false); + return Err(client::Error::MissingToken(e)); + } + } + } + }; + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let client = &self.hub.client; + dlg.pre_request(); + let mut req_builder = hyper::Request::builder() + .method(hyper::Method::POST) + .uri(url.as_str()) + .header(USER_AGENT, self.hub._user_agent.clone()); + + if let Some(token) = token.as_ref() { + req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token)); + } + + + let request = req_builder + .header(CONTENT_TYPE, json_mime_type.to_string()) + .header(CONTENT_LENGTH, request_size as u64) + .body(hyper::body::Body::from(request_value_reader.get_ref().clone())); + + client.request(request.unwrap()).await + + }; + + match req_result { + Err(err) => { + if let client::Retry::After(d) = dlg.http_error(&err) { + sleep(d).await; + continue; + } + dlg.finished(false); + return Err(client::Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status().is_success() { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + let (parts, _) = res.into_parts(); + let body = hyper::Body::from(res_body_string.clone()); + let restored_response = hyper::Response::from_parts(parts, body); + + let server_response = json::from_str::(&res_body_string).ok(); + + if let client::Retry::After(d) = dlg.http_failure(&restored_response, server_response.clone()) { + sleep(d).await; + continue; + } + + dlg.finished(false); + + return match server_response { + Some(error_value) => Err(client::Error::BadRequest(error_value)), + None => Err(client::Error::Failure(restored_response)), + } + } + let result_value = { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + + match json::from_str(&res_body_string) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&res_body_string, &err); + return Err(client::Error::JsonDecodeError(res_body_string, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: SuspendEntitlementRequest) -> ProviderEntitlementSuspendCall<'a, S> { + self._request = new_value; + self + } + /// Required. The name of the entitlement to suspend. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProviderEntitlementSuspendCall<'a, S> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// ````text + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// ```` + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProviderEntitlementSuspendCall<'a, S> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known parameters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *access_token* (query-string) - OAuth access token. + /// * *callback* (query-string) - JSONP + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProviderEntitlementSuspendCall<'a, S> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant + /// [`Scope::CloudPlatform`]. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: St) -> ProviderEntitlementSuspendCall<'a, S> + where St: AsRef { + self._scopes.insert(String::from(scope.as_ref())); + self + } + /// Identifies the authorization scope(s) for the method you are building. + /// + /// See [`Self::add_scope()`] for details. + pub fn add_scopes(mut self, scopes: I) -> ProviderEntitlementSuspendCall<'a, S> + where I: IntoIterator, + St: AsRef { + self._scopes + .extend(scopes.into_iter().map(|s| String::from(s.as_ref()))); + self + } + + /// Removes all scopes, and no default scope will be used either. + /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`] + /// for details). + pub fn clear_scopes(mut self) -> ProviderEntitlementSuspendCall<'a, S> { + self._scopes.clear(); + self + } +} + + +/// Rejects an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to reject the plan change on the entitlement resource. +/// +/// A builder for the *entitlements.rejectPlanChange* method supported by a *provider* resource. +/// It is not used directly, but through a [`ProviderMethods`] instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate hyper_rustls; +/// # extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// use cloudcommerceprocurement1::api::RejectEntitlementPlanChangeRequest; +/// # async fn dox() { +/// # use std::default::Default; +/// # use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// # let secret: oauth2::ApplicationSecret = Default::default(); +/// # let auth = oauth2::InstalledFlowAuthenticator::builder( +/// # secret, +/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// # ).build().await.unwrap(); +/// # let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = RejectEntitlementPlanChangeRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.providers().entitlements_reject_plan_change(req, "name") +/// .doit().await; +/// # } +/// ``` +pub struct ProviderEntitlementRejectPlanChangeCall<'a, S> + where S: 'a { + + hub: &'a CloudCommercePartnerProcurementService, + _request: RejectEntitlementPlanChangeRequest, + _name: String, + _delegate: Option<&'a mut dyn client::Delegate>, + _additional_params: HashMap, + _scopes: BTreeSet +} + +impl<'a, S> client::CallBuilder for ProviderEntitlementRejectPlanChangeCall<'a, S> {} + +impl<'a, S> ProviderEntitlementRejectPlanChangeCall<'a, S> +where + S: tower_service::Service + Clone + Send + Sync + 'static, + S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, + S::Future: Send + Unpin + 'static, + S::Error: Into>, +{ + + + /// Perform the operation you have build so far. + pub async fn doit(mut self) -> client::Result<(hyper::Response, Empty)> { + use std::io::{Read, Seek}; + use hyper::header::{CONTENT_TYPE, CONTENT_LENGTH, AUTHORIZATION, USER_AGENT, LOCATION}; + use client::{ToParts, url::Params}; + use std::borrow::Cow; + + let mut dd = client::DefaultDelegate; + let mut dlg: &mut dyn client::Delegate = self._delegate.unwrap_or(&mut dd); + dlg.begin(client::MethodInfo { id: "cloudcommerceprocurement.providers.entitlements.rejectPlanChange", + http_method: hyper::Method::POST }); + + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(client::Error::FieldClash(field)); + } + } + + let mut params = Params::with_capacity(4 + self._additional_params.len()); + params.push("name", self._name); + + params.extend(self._additional_params.iter()); + + params.push("alt", "json"); + let mut url = self.hub._base_url.clone() + "v1/{+name}:rejectPlanChange"; + if self._scopes.is_empty() { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + url = params.uri_replacement(url, param_name, find_this, true); + } + { + let to_remove = ["name"]; + params.remove_params(&to_remove); + } + + let url = params.parse_with_url(&url); + + let mut json_mime_type = mime::APPLICATION_JSON; + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + client::remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.get_token(&self._scopes.iter().map(String::as_str).collect::>()[..]).await { + Ok(token) => token, + Err(e) => { + match dlg.token(e) { + Ok(token) => token, + Err(e) => { + dlg.finished(false); + return Err(client::Error::MissingToken(e)); + } + } + } + }; + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let client = &self.hub.client; + dlg.pre_request(); + let mut req_builder = hyper::Request::builder() + .method(hyper::Method::POST) + .uri(url.as_str()) + .header(USER_AGENT, self.hub._user_agent.clone()); + + if let Some(token) = token.as_ref() { + req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token)); + } + + + let request = req_builder + .header(CONTENT_TYPE, json_mime_type.to_string()) + .header(CONTENT_LENGTH, request_size as u64) + .body(hyper::body::Body::from(request_value_reader.get_ref().clone())); + + client.request(request.unwrap()).await + + }; + + match req_result { + Err(err) => { + if let client::Retry::After(d) = dlg.http_error(&err) { + sleep(d).await; + continue; + } + dlg.finished(false); + return Err(client::Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status().is_success() { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + let (parts, _) = res.into_parts(); + let body = hyper::Body::from(res_body_string.clone()); + let restored_response = hyper::Response::from_parts(parts, body); + + let server_response = json::from_str::(&res_body_string).ok(); + + if let client::Retry::After(d) = dlg.http_failure(&restored_response, server_response.clone()) { + sleep(d).await; + continue; + } + + dlg.finished(false); + + return match server_response { + Some(error_value) => Err(client::Error::BadRequest(error_value)), + None => Err(client::Error::Failure(restored_response)), + } + } + let result_value = { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + + match json::from_str(&res_body_string) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&res_body_string, &err); + return Err(client::Error::JsonDecodeError(res_body_string, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: RejectEntitlementPlanChangeRequest) -> ProviderEntitlementRejectPlanChangeCall<'a, S> { + self._request = new_value; + self + } + /// Required. The resource name of the entitlement. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProviderEntitlementRejectPlanChangeCall<'a, S> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// ````text + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// ```` + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProviderEntitlementRejectPlanChangeCall<'a, S> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known parameters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *access_token* (query-string) - OAuth access token. + /// * *callback* (query-string) - JSONP + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProviderEntitlementRejectPlanChangeCall<'a, S> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant + /// [`Scope::CloudPlatform`]. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: St) -> ProviderEntitlementRejectPlanChangeCall<'a, S> + where St: AsRef { + self._scopes.insert(String::from(scope.as_ref())); + self + } + /// Identifies the authorization scope(s) for the method you are building. + /// + /// See [`Self::add_scope()`] for details. + pub fn add_scopes(mut self, scopes: I) -> ProviderEntitlementRejectPlanChangeCall<'a, S> + where I: IntoIterator, + St: AsRef { + self._scopes + .extend(scopes.into_iter().map(|s| String::from(s.as_ref()))); + self + } + + /// Removes all scopes, and no default scope will be used either. + /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`] + /// for details). + pub fn clear_scopes(mut self) -> ProviderEntitlementRejectPlanChangeCall<'a, S> { + self._scopes.clear(); + self + } +} + + +/// Gets a requested Entitlement resource. +/// +/// A builder for the *entitlements.get* method supported by a *provider* resource. +/// It is not used directly, but through a [`ProviderMethods`] instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate hyper_rustls; +/// # extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// # async fn dox() { +/// # use std::default::Default; +/// # use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// # let secret: oauth2::ApplicationSecret = Default::default(); +/// # let auth = oauth2::InstalledFlowAuthenticator::builder( +/// # secret, +/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// # ).build().await.unwrap(); +/// # let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.providers().entitlements_get("name") +/// .doit().await; +/// # } +/// ``` +pub struct ProviderEntitlementGetCall<'a, S> + where S: 'a { + + hub: &'a CloudCommercePartnerProcurementService, + _name: String, + _delegate: Option<&'a mut dyn client::Delegate>, + _additional_params: HashMap, + _scopes: BTreeSet +} + +impl<'a, S> client::CallBuilder for ProviderEntitlementGetCall<'a, S> {} + +impl<'a, S> ProviderEntitlementGetCall<'a, S> +where + S: tower_service::Service + Clone + Send + Sync + 'static, + S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, + S::Future: Send + Unpin + 'static, + S::Error: Into>, +{ + + + /// Perform the operation you have build so far. + pub async fn doit(mut self) -> client::Result<(hyper::Response, Entitlement)> { + use std::io::{Read, Seek}; + use hyper::header::{CONTENT_TYPE, CONTENT_LENGTH, AUTHORIZATION, USER_AGENT, LOCATION}; + use client::{ToParts, url::Params}; + use std::borrow::Cow; + + let mut dd = client::DefaultDelegate; + let mut dlg: &mut dyn client::Delegate = self._delegate.unwrap_or(&mut dd); + dlg.begin(client::MethodInfo { id: "cloudcommerceprocurement.providers.entitlements.get", + http_method: hyper::Method::GET }); + + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(client::Error::FieldClash(field)); + } + } + + let mut params = Params::with_capacity(3 + self._additional_params.len()); + params.push("name", self._name); + + params.extend(self._additional_params.iter()); + + params.push("alt", "json"); + let mut url = self.hub._base_url.clone() + "v1/{+name}"; + if self._scopes.is_empty() { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + url = params.uri_replacement(url, param_name, find_this, true); + } + { + let to_remove = ["name"]; + params.remove_params(&to_remove); + } + + let url = params.parse_with_url(&url); + + + + loop { + let token = match self.hub.auth.get_token(&self._scopes.iter().map(String::as_str).collect::>()[..]).await { + Ok(token) => token, + Err(e) => { + match dlg.token(e) { + Ok(token) => token, + Err(e) => { + dlg.finished(false); + return Err(client::Error::MissingToken(e)); + } + } + } + }; + let mut req_result = { + let client = &self.hub.client; + dlg.pre_request(); + let mut req_builder = hyper::Request::builder() + .method(hyper::Method::GET) + .uri(url.as_str()) + .header(USER_AGENT, self.hub._user_agent.clone()); + + if let Some(token) = token.as_ref() { + req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token)); + } + + + let request = req_builder + .header(CONTENT_LENGTH, 0_u64) + .body(hyper::body::Body::empty()); + + client.request(request.unwrap()).await + + }; + + match req_result { + Err(err) => { + if let client::Retry::After(d) = dlg.http_error(&err) { + sleep(d).await; + continue; + } + dlg.finished(false); + return Err(client::Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status().is_success() { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + let (parts, _) = res.into_parts(); + let body = hyper::Body::from(res_body_string.clone()); + let restored_response = hyper::Response::from_parts(parts, body); + + let server_response = json::from_str::(&res_body_string).ok(); + + if let client::Retry::After(d) = dlg.http_failure(&restored_response, server_response.clone()) { + sleep(d).await; + continue; + } + + dlg.finished(false); + + return match server_response { + Some(error_value) => Err(client::Error::BadRequest(error_value)), + None => Err(client::Error::Failure(restored_response)), + } + } + let result_value = { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + + match json::from_str(&res_body_string) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&res_body_string, &err); + return Err(client::Error::JsonDecodeError(res_body_string, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Required. The name of the entitlement to retrieve. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProviderEntitlementGetCall<'a, S> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// ````text + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// ```` + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProviderEntitlementGetCall<'a, S> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known parameters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *access_token* (query-string) - OAuth access token. + /// * *callback* (query-string) - JSONP + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProviderEntitlementGetCall<'a, S> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant + /// [`Scope::CloudPlatform`]. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: St) -> ProviderEntitlementGetCall<'a, S> + where St: AsRef { + self._scopes.insert(String::from(scope.as_ref())); + self + } + /// Identifies the authorization scope(s) for the method you are building. + /// + /// See [`Self::add_scope()`] for details. + pub fn add_scopes(mut self, scopes: I) -> ProviderEntitlementGetCall<'a, S> + where I: IntoIterator, + St: AsRef { + self._scopes + .extend(scopes.into_iter().map(|s| String::from(s.as_ref()))); + self + } + + /// Removes all scopes, and no default scope will be used either. + /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`] + /// for details). + pub fn clear_scopes(mut self) -> ProviderEntitlementGetCall<'a, S> { + self._scopes.clear(); + self + } +} + + +/// Approves an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to approve the creation of the entitlement resource. +/// +/// A builder for the *entitlements.approve* method supported by a *provider* resource. +/// It is not used directly, but through a [`ProviderMethods`] instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate hyper_rustls; +/// # extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// use cloudcommerceprocurement1::api::ApproveEntitlementRequest; +/// # async fn dox() { +/// # use std::default::Default; +/// # use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// # let secret: oauth2::ApplicationSecret = Default::default(); +/// # let auth = oauth2::InstalledFlowAuthenticator::builder( +/// # secret, +/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// # ).build().await.unwrap(); +/// # let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = ApproveEntitlementRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.providers().entitlements_approve(req, "name") +/// .doit().await; +/// # } +/// ``` +pub struct ProviderEntitlementApproveCall<'a, S> + where S: 'a { + + hub: &'a CloudCommercePartnerProcurementService, + _request: ApproveEntitlementRequest, + _name: String, + _delegate: Option<&'a mut dyn client::Delegate>, + _additional_params: HashMap, + _scopes: BTreeSet +} + +impl<'a, S> client::CallBuilder for ProviderEntitlementApproveCall<'a, S> {} + +impl<'a, S> ProviderEntitlementApproveCall<'a, S> +where + S: tower_service::Service + Clone + Send + Sync + 'static, + S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, + S::Future: Send + Unpin + 'static, + S::Error: Into>, +{ + + + /// Perform the operation you have build so far. + pub async fn doit(mut self) -> client::Result<(hyper::Response, Empty)> { + use std::io::{Read, Seek}; + use hyper::header::{CONTENT_TYPE, CONTENT_LENGTH, AUTHORIZATION, USER_AGENT, LOCATION}; + use client::{ToParts, url::Params}; + use std::borrow::Cow; + + let mut dd = client::DefaultDelegate; + let mut dlg: &mut dyn client::Delegate = self._delegate.unwrap_or(&mut dd); + dlg.begin(client::MethodInfo { id: "cloudcommerceprocurement.providers.entitlements.approve", + http_method: hyper::Method::POST }); + + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(client::Error::FieldClash(field)); + } + } + + let mut params = Params::with_capacity(4 + self._additional_params.len()); + params.push("name", self._name); + + params.extend(self._additional_params.iter()); + + params.push("alt", "json"); + let mut url = self.hub._base_url.clone() + "v1/{+name}:approve"; + if self._scopes.is_empty() { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + url = params.uri_replacement(url, param_name, find_this, true); + } + { + let to_remove = ["name"]; + params.remove_params(&to_remove); + } + + let url = params.parse_with_url(&url); + + let mut json_mime_type = mime::APPLICATION_JSON; + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + client::remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.get_token(&self._scopes.iter().map(String::as_str).collect::>()[..]).await { + Ok(token) => token, + Err(e) => { + match dlg.token(e) { + Ok(token) => token, + Err(e) => { + dlg.finished(false); + return Err(client::Error::MissingToken(e)); + } + } + } + }; + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let client = &self.hub.client; + dlg.pre_request(); + let mut req_builder = hyper::Request::builder() + .method(hyper::Method::POST) + .uri(url.as_str()) + .header(USER_AGENT, self.hub._user_agent.clone()); + + if let Some(token) = token.as_ref() { + req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token)); + } + + + let request = req_builder + .header(CONTENT_TYPE, json_mime_type.to_string()) + .header(CONTENT_LENGTH, request_size as u64) + .body(hyper::body::Body::from(request_value_reader.get_ref().clone())); + + client.request(request.unwrap()).await + + }; + + match req_result { + Err(err) => { + if let client::Retry::After(d) = dlg.http_error(&err) { + sleep(d).await; + continue; + } + dlg.finished(false); + return Err(client::Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status().is_success() { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + let (parts, _) = res.into_parts(); + let body = hyper::Body::from(res_body_string.clone()); + let restored_response = hyper::Response::from_parts(parts, body); + + let server_response = json::from_str::(&res_body_string).ok(); + + if let client::Retry::After(d) = dlg.http_failure(&restored_response, server_response.clone()) { + sleep(d).await; + continue; + } + + dlg.finished(false); + + return match server_response { + Some(error_value) => Err(client::Error::BadRequest(error_value)), + None => Err(client::Error::Failure(restored_response)), + } + } + let result_value = { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + + match json::from_str(&res_body_string) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&res_body_string, &err); + return Err(client::Error::JsonDecodeError(res_body_string, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: ApproveEntitlementRequest) -> ProviderEntitlementApproveCall<'a, S> { + self._request = new_value; + self + } + /// Required. The resource name of the entitlement, with the format `providers/{providerId}/entitlements/{entitlementId}`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProviderEntitlementApproveCall<'a, S> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// ````text + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// ```` + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProviderEntitlementApproveCall<'a, S> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known parameters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *access_token* (query-string) - OAuth access token. + /// * *callback* (query-string) - JSONP + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProviderEntitlementApproveCall<'a, S> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant + /// [`Scope::CloudPlatform`]. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: St) -> ProviderEntitlementApproveCall<'a, S> + where St: AsRef { + self._scopes.insert(String::from(scope.as_ref())); + self + } + /// Identifies the authorization scope(s) for the method you are building. + /// + /// See [`Self::add_scope()`] for details. + pub fn add_scopes(mut self, scopes: I) -> ProviderEntitlementApproveCall<'a, S> + where I: IntoIterator, + St: AsRef { + self._scopes + .extend(scopes.into_iter().map(|s| String::from(s.as_ref()))); + self + } + + /// Removes all scopes, and no default scope will be used either. + /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`] + /// for details). + pub fn clear_scopes(mut self) -> ProviderEntitlementApproveCall<'a, S> { + self._scopes.clear(); + self + } +} + + +/// Lists Entitlements for which the provider has read access. +/// +/// A builder for the *entitlements.list* method supported by a *provider* resource. +/// It is not used directly, but through a [`ProviderMethods`] instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate hyper_rustls; +/// # extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// # async fn dox() { +/// # use std::default::Default; +/// # use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// # let secret: oauth2::ApplicationSecret = Default::default(); +/// # let auth = oauth2::InstalledFlowAuthenticator::builder( +/// # secret, +/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// # ).build().await.unwrap(); +/// # let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.providers().entitlements_list("parent") +/// .page_token("amet.") +/// .page_size(-59) +/// .filter("amet.") +/// .doit().await; +/// # } +/// ``` +pub struct ProviderEntitlementListCall<'a, S> + where S: 'a { + + hub: &'a CloudCommercePartnerProcurementService, + _parent: String, + _page_token: Option, + _page_size: Option, + _filter: Option, + _delegate: Option<&'a mut dyn client::Delegate>, + _additional_params: HashMap, + _scopes: BTreeSet +} + +impl<'a, S> client::CallBuilder for ProviderEntitlementListCall<'a, S> {} + +impl<'a, S> ProviderEntitlementListCall<'a, S> +where + S: tower_service::Service + Clone + Send + Sync + 'static, + S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, + S::Future: Send + Unpin + 'static, + S::Error: Into>, +{ + + + /// Perform the operation you have build so far. + pub async fn doit(mut self) -> client::Result<(hyper::Response, ListEntitlementsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{CONTENT_TYPE, CONTENT_LENGTH, AUTHORIZATION, USER_AGENT, LOCATION}; + use client::{ToParts, url::Params}; + use std::borrow::Cow; + + let mut dd = client::DefaultDelegate; + let mut dlg: &mut dyn client::Delegate = self._delegate.unwrap_or(&mut dd); + dlg.begin(client::MethodInfo { id: "cloudcommerceprocurement.providers.entitlements.list", + http_method: hyper::Method::GET }); + + for &field in ["alt", "parent", "pageToken", "pageSize", "filter"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(client::Error::FieldClash(field)); + } + } + + let mut params = Params::with_capacity(6 + self._additional_params.len()); + params.push("parent", self._parent); + if let Some(value) = self._page_token.as_ref() { + params.push("pageToken", value); + } + if let Some(value) = self._page_size.as_ref() { + params.push("pageSize", value.to_string()); + } + if let Some(value) = self._filter.as_ref() { + params.push("filter", value); + } + + params.extend(self._additional_params.iter()); + + params.push("alt", "json"); + let mut url = self.hub._base_url.clone() + "v1/{+parent}/entitlements"; + if self._scopes.is_empty() { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string()); + } + + for &(find_this, param_name) in [("{+parent}", "parent")].iter() { + url = params.uri_replacement(url, param_name, find_this, true); + } + { + let to_remove = ["parent"]; + params.remove_params(&to_remove); + } + + let url = params.parse_with_url(&url); + + + + loop { + let token = match self.hub.auth.get_token(&self._scopes.iter().map(String::as_str).collect::>()[..]).await { + Ok(token) => token, + Err(e) => { + match dlg.token(e) { + Ok(token) => token, + Err(e) => { + dlg.finished(false); + return Err(client::Error::MissingToken(e)); + } + } + } + }; + let mut req_result = { + let client = &self.hub.client; + dlg.pre_request(); + let mut req_builder = hyper::Request::builder() + .method(hyper::Method::GET) + .uri(url.as_str()) + .header(USER_AGENT, self.hub._user_agent.clone()); + + if let Some(token) = token.as_ref() { + req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token)); + } + + + let request = req_builder + .header(CONTENT_LENGTH, 0_u64) + .body(hyper::body::Body::empty()); + + client.request(request.unwrap()).await + + }; + + match req_result { + Err(err) => { + if let client::Retry::After(d) = dlg.http_error(&err) { + sleep(d).await; + continue; + } + dlg.finished(false); + return Err(client::Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status().is_success() { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + let (parts, _) = res.into_parts(); + let body = hyper::Body::from(res_body_string.clone()); + let restored_response = hyper::Response::from_parts(parts, body); + + let server_response = json::from_str::(&res_body_string).ok(); + + if let client::Retry::After(d) = dlg.http_failure(&restored_response, server_response.clone()) { + sleep(d).await; + continue; + } + + dlg.finished(false); + + return match server_response { + Some(error_value) => Err(client::Error::BadRequest(error_value)), + None => Err(client::Error::Failure(restored_response)), + } + } + let result_value = { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + + match json::from_str(&res_body_string) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&res_body_string, &err); + return Err(client::Error::JsonDecodeError(res_body_string, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Required. The parent resource name. + /// + /// Sets the *parent* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn parent(mut self, new_value: &str) -> ProviderEntitlementListCall<'a, S> { + self._parent = new_value.to_string(); + self + } + /// The token for fetching the next page. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProviderEntitlementListCall<'a, S> { + self._page_token = Some(new_value.to_string()); + self + } + /// The maximum number of entries that are requested. The default page size is 200. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProviderEntitlementListCall<'a, S> { + self._page_size = Some(new_value); + self + } + /// The filter that can be used to limit the list request. The filter is a query string that can match a selected set of attributes with string values. For example `account=E-1234-5678-ABCD-EFGH`, `state=pending_cancellation`, and `plan!=foo-plan`. Supported query attributes are * `account` * `customer_billing_account` with value in the format of: `billingAccounts/{id}` * `product_external_name` * `quote_external_name` * `offer` * `new_pending_offer` * `plan` * `newPendingPlan` or `new_pending_plan` * `state` * `consumers.project` * `change_history.new_offer` Note that the consumers and change_history.new_offer match works on repeated structures, so equality (`consumers.project=projects/123456789`) is not supported. Set membership can be expressed with the `:` operator. For example, `consumers.project:projects/123456789` finds entitlements with at least one consumer with project field equal to `projects/123456789`. `change_history.new_offer` retrieves all entitlements that were once associated or are currently active with the offer. Also note that the state name match is case-insensitive and query can omit the prefix "ENTITLEMENT_". For example, `state=active` is equivalent to `state=ENTITLEMENT_ACTIVE`. If the query contains some special characters other than letters, underscore, or digits, the phrase must be quoted with double quotes. For example, `product="providerId:productId"`, where the product name needs to be quoted because it contains special character colon. Queries can be combined with `AND`, `OR`, and `NOT` to form more complex queries. They can also be grouped to force a desired evaluation order. For example, `state=active AND (account=E-1234 OR account=5678) AND NOT (product=foo-product)`. Connective `AND` can be omitted between two predicates. For example `account=E-1234 state=active` is equivalent to `account=E-1234 AND state=active`. + /// + /// Sets the *filter* query property to the given value. + pub fn filter(mut self, new_value: &str) -> ProviderEntitlementListCall<'a, S> { + self._filter = Some(new_value.to_string()); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// ````text + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// ```` + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProviderEntitlementListCall<'a, S> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known parameters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *access_token* (query-string) - OAuth access token. + /// * *callback* (query-string) - JSONP + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProviderEntitlementListCall<'a, S> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant + /// [`Scope::CloudPlatform`]. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: St) -> ProviderEntitlementListCall<'a, S> + where St: AsRef { + self._scopes.insert(String::from(scope.as_ref())); + self + } + /// Identifies the authorization scope(s) for the method you are building. + /// + /// See [`Self::add_scope()`] for details. + pub fn add_scopes(mut self, scopes: I) -> ProviderEntitlementListCall<'a, S> + where I: IntoIterator, + St: AsRef { + self._scopes + .extend(scopes.into_iter().map(|s| String::from(s.as_ref()))); + self + } + + /// Removes all scopes, and no default scope will be used either. + /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`] + /// for details). + pub fn clear_scopes(mut self) -> ProviderEntitlementListCall<'a, S> { + self._scopes.clear(); + self + } +} + + +/// Approves an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. This method is invoked by the provider to approve the plan change on the entitlement resource. +/// +/// A builder for the *entitlements.approvePlanChange* method supported by a *provider* resource. +/// It is not used directly, but through a [`ProviderMethods`] instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate hyper_rustls; +/// # extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// use cloudcommerceprocurement1::api::ApproveEntitlementPlanChangeRequest; +/// # async fn dox() { +/// # use std::default::Default; +/// # use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// # let secret: oauth2::ApplicationSecret = Default::default(); +/// # let auth = oauth2::InstalledFlowAuthenticator::builder( +/// # secret, +/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// # ).build().await.unwrap(); +/// # let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = ApproveEntitlementPlanChangeRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.providers().entitlements_approve_plan_change(req, "name") +/// .doit().await; +/// # } +/// ``` +pub struct ProviderEntitlementApprovePlanChangeCall<'a, S> + where S: 'a { + + hub: &'a CloudCommercePartnerProcurementService, + _request: ApproveEntitlementPlanChangeRequest, + _name: String, + _delegate: Option<&'a mut dyn client::Delegate>, + _additional_params: HashMap, + _scopes: BTreeSet +} + +impl<'a, S> client::CallBuilder for ProviderEntitlementApprovePlanChangeCall<'a, S> {} + +impl<'a, S> ProviderEntitlementApprovePlanChangeCall<'a, S> +where + S: tower_service::Service + Clone + Send + Sync + 'static, + S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, + S::Future: Send + Unpin + 'static, + S::Error: Into>, +{ + + + /// Perform the operation you have build so far. + pub async fn doit(mut self) -> client::Result<(hyper::Response, Empty)> { + use std::io::{Read, Seek}; + use hyper::header::{CONTENT_TYPE, CONTENT_LENGTH, AUTHORIZATION, USER_AGENT, LOCATION}; + use client::{ToParts, url::Params}; + use std::borrow::Cow; + + let mut dd = client::DefaultDelegate; + let mut dlg: &mut dyn client::Delegate = self._delegate.unwrap_or(&mut dd); + dlg.begin(client::MethodInfo { id: "cloudcommerceprocurement.providers.entitlements.approvePlanChange", + http_method: hyper::Method::POST }); + + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(client::Error::FieldClash(field)); + } + } + + let mut params = Params::with_capacity(4 + self._additional_params.len()); + params.push("name", self._name); + + params.extend(self._additional_params.iter()); + + params.push("alt", "json"); + let mut url = self.hub._base_url.clone() + "v1/{+name}:approvePlanChange"; + if self._scopes.is_empty() { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + url = params.uri_replacement(url, param_name, find_this, true); + } + { + let to_remove = ["name"]; + params.remove_params(&to_remove); + } + + let url = params.parse_with_url(&url); + + let mut json_mime_type = mime::APPLICATION_JSON; + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + client::remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.get_token(&self._scopes.iter().map(String::as_str).collect::>()[..]).await { + Ok(token) => token, + Err(e) => { + match dlg.token(e) { + Ok(token) => token, + Err(e) => { + dlg.finished(false); + return Err(client::Error::MissingToken(e)); + } + } + } + }; + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let client = &self.hub.client; + dlg.pre_request(); + let mut req_builder = hyper::Request::builder() + .method(hyper::Method::POST) + .uri(url.as_str()) + .header(USER_AGENT, self.hub._user_agent.clone()); + + if let Some(token) = token.as_ref() { + req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token)); + } + + + let request = req_builder + .header(CONTENT_TYPE, json_mime_type.to_string()) + .header(CONTENT_LENGTH, request_size as u64) + .body(hyper::body::Body::from(request_value_reader.get_ref().clone())); + + client.request(request.unwrap()).await + + }; + + match req_result { + Err(err) => { + if let client::Retry::After(d) = dlg.http_error(&err) { + sleep(d).await; + continue; + } + dlg.finished(false); + return Err(client::Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status().is_success() { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + let (parts, _) = res.into_parts(); + let body = hyper::Body::from(res_body_string.clone()); + let restored_response = hyper::Response::from_parts(parts, body); + + let server_response = json::from_str::(&res_body_string).ok(); + + if let client::Retry::After(d) = dlg.http_failure(&restored_response, server_response.clone()) { + sleep(d).await; + continue; + } + + dlg.finished(false); + + return match server_response { + Some(error_value) => Err(client::Error::BadRequest(error_value)), + None => Err(client::Error::Failure(restored_response)), + } + } + let result_value = { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + + match json::from_str(&res_body_string) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&res_body_string, &err); + return Err(client::Error::JsonDecodeError(res_body_string, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: ApproveEntitlementPlanChangeRequest) -> ProviderEntitlementApprovePlanChangeCall<'a, S> { + self._request = new_value; + self + } + /// Required. The resource name of the entitlement. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProviderEntitlementApprovePlanChangeCall<'a, S> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// ````text + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// ```` + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProviderEntitlementApprovePlanChangeCall<'a, S> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known parameters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *access_token* (query-string) - OAuth access token. + /// * *callback* (query-string) - JSONP + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProviderEntitlementApprovePlanChangeCall<'a, S> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant + /// [`Scope::CloudPlatform`]. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: St) -> ProviderEntitlementApprovePlanChangeCall<'a, S> + where St: AsRef { + self._scopes.insert(String::from(scope.as_ref())); + self + } + /// Identifies the authorization scope(s) for the method you are building. + /// + /// See [`Self::add_scope()`] for details. + pub fn add_scopes(mut self, scopes: I) -> ProviderEntitlementApprovePlanChangeCall<'a, S> + where I: IntoIterator, + St: AsRef { + self._scopes + .extend(scopes.into_iter().map(|s| String::from(s.as_ref()))); + self + } + + /// Removes all scopes, and no default scope will be used either. + /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`] + /// for details). + pub fn clear_scopes(mut self) -> ProviderEntitlementApprovePlanChangeCall<'a, S> { + self._scopes.clear(); + self + } +} + + +/// Updates an existing Entitlement. +/// +/// A builder for the *entitlements.patch* method supported by a *provider* resource. +/// It is not used directly, but through a [`ProviderMethods`] instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate hyper_rustls; +/// # extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// use cloudcommerceprocurement1::api::Entitlement; +/// # async fn dox() { +/// # use std::default::Default; +/// # use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// # let secret: oauth2::ApplicationSecret = Default::default(); +/// # let auth = oauth2::InstalledFlowAuthenticator::builder( +/// # secret, +/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// # ).build().await.unwrap(); +/// # let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = Entitlement::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.providers().entitlements_patch(req, "name") +/// .update_mask(FieldMask::new::<&str>(&[])) +/// .doit().await; +/// # } +/// ``` +pub struct ProviderEntitlementPatchCall<'a, S> + where S: 'a { + + hub: &'a CloudCommercePartnerProcurementService, + _request: Entitlement, + _name: String, + _update_mask: Option, + _delegate: Option<&'a mut dyn client::Delegate>, + _additional_params: HashMap, + _scopes: BTreeSet +} + +impl<'a, S> client::CallBuilder for ProviderEntitlementPatchCall<'a, S> {} + +impl<'a, S> ProviderEntitlementPatchCall<'a, S> +where + S: tower_service::Service + Clone + Send + Sync + 'static, + S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, + S::Future: Send + Unpin + 'static, + S::Error: Into>, +{ + + + /// Perform the operation you have build so far. + pub async fn doit(mut self) -> client::Result<(hyper::Response, Entitlement)> { + use std::io::{Read, Seek}; + use hyper::header::{CONTENT_TYPE, CONTENT_LENGTH, AUTHORIZATION, USER_AGENT, LOCATION}; + use client::{ToParts, url::Params}; + use std::borrow::Cow; + + let mut dd = client::DefaultDelegate; + let mut dlg: &mut dyn client::Delegate = self._delegate.unwrap_or(&mut dd); + dlg.begin(client::MethodInfo { id: "cloudcommerceprocurement.providers.entitlements.patch", + http_method: hyper::Method::PATCH }); + + for &field in ["alt", "name", "updateMask"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(client::Error::FieldClash(field)); + } + } + + let mut params = Params::with_capacity(5 + self._additional_params.len()); + params.push("name", self._name); + if let Some(value) = self._update_mask.as_ref() { + params.push("updateMask", value.to_string()); + } + + params.extend(self._additional_params.iter()); + + params.push("alt", "json"); + let mut url = self.hub._base_url.clone() + "v1/{+name}"; + if self._scopes.is_empty() { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + url = params.uri_replacement(url, param_name, find_this, true); + } + { + let to_remove = ["name"]; + params.remove_params(&to_remove); + } + + let url = params.parse_with_url(&url); + + let mut json_mime_type = mime::APPLICATION_JSON; + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + client::remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.get_token(&self._scopes.iter().map(String::as_str).collect::>()[..]).await { + Ok(token) => token, + Err(e) => { + match dlg.token(e) { + Ok(token) => token, + Err(e) => { + dlg.finished(false); + return Err(client::Error::MissingToken(e)); + } + } + } + }; + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let client = &self.hub.client; + dlg.pre_request(); + let mut req_builder = hyper::Request::builder() + .method(hyper::Method::PATCH) + .uri(url.as_str()) + .header(USER_AGENT, self.hub._user_agent.clone()); + + if let Some(token) = token.as_ref() { + req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token)); + } + + + let request = req_builder + .header(CONTENT_TYPE, json_mime_type.to_string()) + .header(CONTENT_LENGTH, request_size as u64) + .body(hyper::body::Body::from(request_value_reader.get_ref().clone())); + + client.request(request.unwrap()).await + + }; + + match req_result { + Err(err) => { + if let client::Retry::After(d) = dlg.http_error(&err) { + sleep(d).await; + continue; + } + dlg.finished(false); + return Err(client::Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status().is_success() { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + let (parts, _) = res.into_parts(); + let body = hyper::Body::from(res_body_string.clone()); + let restored_response = hyper::Response::from_parts(parts, body); + + let server_response = json::from_str::(&res_body_string).ok(); + + if let client::Retry::After(d) = dlg.http_failure(&restored_response, server_response.clone()) { + sleep(d).await; + continue; + } + + dlg.finished(false); + + return match server_response { + Some(error_value) => Err(client::Error::BadRequest(error_value)), + None => Err(client::Error::Failure(restored_response)), + } + } + let result_value = { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + + match json::from_str(&res_body_string) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&res_body_string, &err); + return Err(client::Error::JsonDecodeError(res_body_string, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: Entitlement) -> ProviderEntitlementPatchCall<'a, S> { + self._request = new_value; + self + } + /// Required. The name of the entitlement to update. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProviderEntitlementPatchCall<'a, S> { + self._name = new_value.to_string(); + self + } + /// The update mask that applies to the resource. See the [FieldMask definition] (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) for more details. + /// + /// Sets the *update mask* query property to the given value. + pub fn update_mask(mut self, new_value: client::FieldMask) -> ProviderEntitlementPatchCall<'a, S> { + self._update_mask = Some(new_value); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// ````text + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// ```` + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProviderEntitlementPatchCall<'a, S> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known parameters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *access_token* (query-string) - OAuth access token. + /// * *callback* (query-string) - JSONP + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProviderEntitlementPatchCall<'a, S> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant + /// [`Scope::CloudPlatform`]. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: St) -> ProviderEntitlementPatchCall<'a, S> + where St: AsRef { + self._scopes.insert(String::from(scope.as_ref())); + self + } + /// Identifies the authorization scope(s) for the method you are building. + /// + /// See [`Self::add_scope()`] for details. + pub fn add_scopes(mut self, scopes: I) -> ProviderEntitlementPatchCall<'a, S> + where I: IntoIterator, + St: AsRef { + self._scopes + .extend(scopes.into_iter().map(|s| String::from(s.as_ref()))); + self + } + + /// Removes all scopes, and no default scope will be used either. + /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`] + /// for details). + pub fn clear_scopes(mut self) -> ProviderEntitlementPatchCall<'a, S> { + self._scopes.clear(); + self + } +} + + +/// Rejects an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. This method is invoked by the provider to reject the creation of the entitlement resource. +/// +/// A builder for the *entitlements.reject* method supported by a *provider* resource. +/// It is not used directly, but through a [`ProviderMethods`] instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate hyper_rustls; +/// # extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// use cloudcommerceprocurement1::api::RejectEntitlementRequest; +/// # async fn dox() { +/// # use std::default::Default; +/// # use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// # let secret: oauth2::ApplicationSecret = Default::default(); +/// # let auth = oauth2::InstalledFlowAuthenticator::builder( +/// # secret, +/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// # ).build().await.unwrap(); +/// # let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = RejectEntitlementRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.providers().entitlements_reject(req, "name") +/// .doit().await; +/// # } +/// ``` +pub struct ProviderEntitlementRejectCall<'a, S> + where S: 'a { + + hub: &'a CloudCommercePartnerProcurementService, + _request: RejectEntitlementRequest, + _name: String, + _delegate: Option<&'a mut dyn client::Delegate>, + _additional_params: HashMap, + _scopes: BTreeSet +} + +impl<'a, S> client::CallBuilder for ProviderEntitlementRejectCall<'a, S> {} + +impl<'a, S> ProviderEntitlementRejectCall<'a, S> +where + S: tower_service::Service + Clone + Send + Sync + 'static, + S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, + S::Future: Send + Unpin + 'static, + S::Error: Into>, +{ + + + /// Perform the operation you have build so far. + pub async fn doit(mut self) -> client::Result<(hyper::Response, Empty)> { + use std::io::{Read, Seek}; + use hyper::header::{CONTENT_TYPE, CONTENT_LENGTH, AUTHORIZATION, USER_AGENT, LOCATION}; + use client::{ToParts, url::Params}; + use std::borrow::Cow; + + let mut dd = client::DefaultDelegate; + let mut dlg: &mut dyn client::Delegate = self._delegate.unwrap_or(&mut dd); + dlg.begin(client::MethodInfo { id: "cloudcommerceprocurement.providers.entitlements.reject", + http_method: hyper::Method::POST }); + + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(client::Error::FieldClash(field)); + } + } + + let mut params = Params::with_capacity(4 + self._additional_params.len()); + params.push("name", self._name); + + params.extend(self._additional_params.iter()); + + params.push("alt", "json"); + let mut url = self.hub._base_url.clone() + "v1/{+name}:reject"; + if self._scopes.is_empty() { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + url = params.uri_replacement(url, param_name, find_this, true); + } + { + let to_remove = ["name"]; + params.remove_params(&to_remove); + } + + let url = params.parse_with_url(&url); + + let mut json_mime_type = mime::APPLICATION_JSON; + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + client::remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.get_token(&self._scopes.iter().map(String::as_str).collect::>()[..]).await { + Ok(token) => token, + Err(e) => { + match dlg.token(e) { + Ok(token) => token, + Err(e) => { + dlg.finished(false); + return Err(client::Error::MissingToken(e)); + } + } + } + }; + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let client = &self.hub.client; + dlg.pre_request(); + let mut req_builder = hyper::Request::builder() + .method(hyper::Method::POST) + .uri(url.as_str()) + .header(USER_AGENT, self.hub._user_agent.clone()); + + if let Some(token) = token.as_ref() { + req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token)); + } + + + let request = req_builder + .header(CONTENT_TYPE, json_mime_type.to_string()) + .header(CONTENT_LENGTH, request_size as u64) + .body(hyper::body::Body::from(request_value_reader.get_ref().clone())); + + client.request(request.unwrap()).await + + }; + + match req_result { + Err(err) => { + if let client::Retry::After(d) = dlg.http_error(&err) { + sleep(d).await; + continue; + } + dlg.finished(false); + return Err(client::Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status().is_success() { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + let (parts, _) = res.into_parts(); + let body = hyper::Body::from(res_body_string.clone()); + let restored_response = hyper::Response::from_parts(parts, body); + + let server_response = json::from_str::(&res_body_string).ok(); + + if let client::Retry::After(d) = dlg.http_failure(&restored_response, server_response.clone()) { + sleep(d).await; + continue; + } + + dlg.finished(false); + + return match server_response { + Some(error_value) => Err(client::Error::BadRequest(error_value)), + None => Err(client::Error::Failure(restored_response)), + } + } + let result_value = { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + + match json::from_str(&res_body_string) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&res_body_string, &err); + return Err(client::Error::JsonDecodeError(res_body_string, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: RejectEntitlementRequest) -> ProviderEntitlementRejectCall<'a, S> { + self._request = new_value; + self + } + /// Required. The resource name of the entitlement. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProviderEntitlementRejectCall<'a, S> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// ````text + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// ```` + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProviderEntitlementRejectCall<'a, S> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known parameters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *access_token* (query-string) - OAuth access token. + /// * *callback* (query-string) - JSONP + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProviderEntitlementRejectCall<'a, S> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant + /// [`Scope::CloudPlatform`]. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: St) -> ProviderEntitlementRejectCall<'a, S> + where St: AsRef { + self._scopes.insert(String::from(scope.as_ref())); + self + } + /// Identifies the authorization scope(s) for the method you are building. + /// + /// See [`Self::add_scope()`] for details. + pub fn add_scopes(mut self, scopes: I) -> ProviderEntitlementRejectCall<'a, S> + where I: IntoIterator, + St: AsRef { + self._scopes + .extend(scopes.into_iter().map(|s| String::from(s.as_ref()))); + self + } + + /// Removes all scopes, and no default scope will be used either. + /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`] + /// for details). + pub fn clear_scopes(mut self) -> ProviderEntitlementRejectCall<'a, S> { + self._scopes.clear(); + self + } +} + + +/// Grants an approval on an Account. +/// +/// A builder for the *accounts.approve* method supported by a *provider* resource. +/// It is not used directly, but through a [`ProviderMethods`] instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate hyper_rustls; +/// # extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// use cloudcommerceprocurement1::api::ApproveAccountRequest; +/// # async fn dox() { +/// # use std::default::Default; +/// # use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// # let secret: oauth2::ApplicationSecret = Default::default(); +/// # let auth = oauth2::InstalledFlowAuthenticator::builder( +/// # secret, +/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// # ).build().await.unwrap(); +/// # let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = ApproveAccountRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.providers().accounts_approve(req, "name") +/// .doit().await; +/// # } +/// ``` +pub struct ProviderAccountApproveCall<'a, S> + where S: 'a { + + hub: &'a CloudCommercePartnerProcurementService, + _request: ApproveAccountRequest, + _name: String, + _delegate: Option<&'a mut dyn client::Delegate>, + _additional_params: HashMap, + _scopes: BTreeSet +} + +impl<'a, S> client::CallBuilder for ProviderAccountApproveCall<'a, S> {} + +impl<'a, S> ProviderAccountApproveCall<'a, S> +where + S: tower_service::Service + Clone + Send + Sync + 'static, + S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, + S::Future: Send + Unpin + 'static, + S::Error: Into>, +{ + + + /// Perform the operation you have build so far. + pub async fn doit(mut self) -> client::Result<(hyper::Response, Empty)> { + use std::io::{Read, Seek}; + use hyper::header::{CONTENT_TYPE, CONTENT_LENGTH, AUTHORIZATION, USER_AGENT, LOCATION}; + use client::{ToParts, url::Params}; + use std::borrow::Cow; + + let mut dd = client::DefaultDelegate; + let mut dlg: &mut dyn client::Delegate = self._delegate.unwrap_or(&mut dd); + dlg.begin(client::MethodInfo { id: "cloudcommerceprocurement.providers.accounts.approve", + http_method: hyper::Method::POST }); + + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(client::Error::FieldClash(field)); + } + } + + let mut params = Params::with_capacity(4 + self._additional_params.len()); + params.push("name", self._name); + + params.extend(self._additional_params.iter()); + + params.push("alt", "json"); + let mut url = self.hub._base_url.clone() + "v1/{+name}:approve"; + if self._scopes.is_empty() { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + url = params.uri_replacement(url, param_name, find_this, true); + } + { + let to_remove = ["name"]; + params.remove_params(&to_remove); + } + + let url = params.parse_with_url(&url); + + let mut json_mime_type = mime::APPLICATION_JSON; + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + client::remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.get_token(&self._scopes.iter().map(String::as_str).collect::>()[..]).await { + Ok(token) => token, + Err(e) => { + match dlg.token(e) { + Ok(token) => token, + Err(e) => { + dlg.finished(false); + return Err(client::Error::MissingToken(e)); + } + } + } + }; + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let client = &self.hub.client; + dlg.pre_request(); + let mut req_builder = hyper::Request::builder() + .method(hyper::Method::POST) + .uri(url.as_str()) + .header(USER_AGENT, self.hub._user_agent.clone()); + + if let Some(token) = token.as_ref() { + req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token)); + } + + + let request = req_builder + .header(CONTENT_TYPE, json_mime_type.to_string()) + .header(CONTENT_LENGTH, request_size as u64) + .body(hyper::body::Body::from(request_value_reader.get_ref().clone())); + + client.request(request.unwrap()).await + + }; + + match req_result { + Err(err) => { + if let client::Retry::After(d) = dlg.http_error(&err) { + sleep(d).await; + continue; + } + dlg.finished(false); + return Err(client::Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status().is_success() { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + let (parts, _) = res.into_parts(); + let body = hyper::Body::from(res_body_string.clone()); + let restored_response = hyper::Response::from_parts(parts, body); + + let server_response = json::from_str::(&res_body_string).ok(); + + if let client::Retry::After(d) = dlg.http_failure(&restored_response, server_response.clone()) { + sleep(d).await; + continue; + } + + dlg.finished(false); + + return match server_response { + Some(error_value) => Err(client::Error::BadRequest(error_value)), + None => Err(client::Error::Failure(restored_response)), + } + } + let result_value = { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + + match json::from_str(&res_body_string) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&res_body_string, &err); + return Err(client::Error::JsonDecodeError(res_body_string, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: ApproveAccountRequest) -> ProviderAccountApproveCall<'a, S> { + self._request = new_value; + self + } + /// Required. The resource name of the account, with the format `providers/{providerId}/accounts/{accountId}`. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProviderAccountApproveCall<'a, S> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// ````text + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// ```` + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProviderAccountApproveCall<'a, S> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known parameters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *access_token* (query-string) - OAuth access token. + /// * *callback* (query-string) - JSONP + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProviderAccountApproveCall<'a, S> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant + /// [`Scope::CloudPlatform`]. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: St) -> ProviderAccountApproveCall<'a, S> + where St: AsRef { + self._scopes.insert(String::from(scope.as_ref())); + self + } + /// Identifies the authorization scope(s) for the method you are building. + /// + /// See [`Self::add_scope()`] for details. + pub fn add_scopes(mut self, scopes: I) -> ProviderAccountApproveCall<'a, S> + where I: IntoIterator, + St: AsRef { + self._scopes + .extend(scopes.into_iter().map(|s| String::from(s.as_ref()))); + self + } + + /// Removes all scopes, and no default scope will be used either. + /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`] + /// for details). + pub fn clear_scopes(mut self) -> ProviderAccountApproveCall<'a, S> { + self._scopes.clear(); + self + } +} + + +/// Rejects an approval on an Account. +/// +/// A builder for the *accounts.reject* method supported by a *provider* resource. +/// It is not used directly, but through a [`ProviderMethods`] instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate hyper_rustls; +/// # extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// use cloudcommerceprocurement1::api::RejectAccountRequest; +/// # async fn dox() { +/// # use std::default::Default; +/// # use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// # let secret: oauth2::ApplicationSecret = Default::default(); +/// # let auth = oauth2::InstalledFlowAuthenticator::builder( +/// # secret, +/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// # ).build().await.unwrap(); +/// # let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = RejectAccountRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.providers().accounts_reject(req, "name") +/// .doit().await; +/// # } +/// ``` +pub struct ProviderAccountRejectCall<'a, S> + where S: 'a { + + hub: &'a CloudCommercePartnerProcurementService, + _request: RejectAccountRequest, + _name: String, + _delegate: Option<&'a mut dyn client::Delegate>, + _additional_params: HashMap, + _scopes: BTreeSet +} + +impl<'a, S> client::CallBuilder for ProviderAccountRejectCall<'a, S> {} + +impl<'a, S> ProviderAccountRejectCall<'a, S> +where + S: tower_service::Service + Clone + Send + Sync + 'static, + S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, + S::Future: Send + Unpin + 'static, + S::Error: Into>, +{ + + + /// Perform the operation you have build so far. + pub async fn doit(mut self) -> client::Result<(hyper::Response, Empty)> { + use std::io::{Read, Seek}; + use hyper::header::{CONTENT_TYPE, CONTENT_LENGTH, AUTHORIZATION, USER_AGENT, LOCATION}; + use client::{ToParts, url::Params}; + use std::borrow::Cow; + + let mut dd = client::DefaultDelegate; + let mut dlg: &mut dyn client::Delegate = self._delegate.unwrap_or(&mut dd); + dlg.begin(client::MethodInfo { id: "cloudcommerceprocurement.providers.accounts.reject", + http_method: hyper::Method::POST }); + + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(client::Error::FieldClash(field)); + } + } + + let mut params = Params::with_capacity(4 + self._additional_params.len()); + params.push("name", self._name); + + params.extend(self._additional_params.iter()); + + params.push("alt", "json"); + let mut url = self.hub._base_url.clone() + "v1/{+name}:reject"; + if self._scopes.is_empty() { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + url = params.uri_replacement(url, param_name, find_this, true); + } + { + let to_remove = ["name"]; + params.remove_params(&to_remove); + } + + let url = params.parse_with_url(&url); + + let mut json_mime_type = mime::APPLICATION_JSON; + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + client::remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.get_token(&self._scopes.iter().map(String::as_str).collect::>()[..]).await { + Ok(token) => token, + Err(e) => { + match dlg.token(e) { + Ok(token) => token, + Err(e) => { + dlg.finished(false); + return Err(client::Error::MissingToken(e)); + } + } + } + }; + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let client = &self.hub.client; + dlg.pre_request(); + let mut req_builder = hyper::Request::builder() + .method(hyper::Method::POST) + .uri(url.as_str()) + .header(USER_AGENT, self.hub._user_agent.clone()); + + if let Some(token) = token.as_ref() { + req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token)); + } + + + let request = req_builder + .header(CONTENT_TYPE, json_mime_type.to_string()) + .header(CONTENT_LENGTH, request_size as u64) + .body(hyper::body::Body::from(request_value_reader.get_ref().clone())); + + client.request(request.unwrap()).await + + }; + + match req_result { + Err(err) => { + if let client::Retry::After(d) = dlg.http_error(&err) { + sleep(d).await; + continue; + } + dlg.finished(false); + return Err(client::Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status().is_success() { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + let (parts, _) = res.into_parts(); + let body = hyper::Body::from(res_body_string.clone()); + let restored_response = hyper::Response::from_parts(parts, body); + + let server_response = json::from_str::(&res_body_string).ok(); + + if let client::Retry::After(d) = dlg.http_failure(&restored_response, server_response.clone()) { + sleep(d).await; + continue; + } + + dlg.finished(false); + + return match server_response { + Some(error_value) => Err(client::Error::BadRequest(error_value)), + None => Err(client::Error::Failure(restored_response)), + } + } + let result_value = { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + + match json::from_str(&res_body_string) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&res_body_string, &err); + return Err(client::Error::JsonDecodeError(res_body_string, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: RejectAccountRequest) -> ProviderAccountRejectCall<'a, S> { + self._request = new_value; + self + } + /// Required. The resource name of the account. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProviderAccountRejectCall<'a, S> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// ````text + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// ```` + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProviderAccountRejectCall<'a, S> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known parameters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *access_token* (query-string) - OAuth access token. + /// * *callback* (query-string) - JSONP + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProviderAccountRejectCall<'a, S> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant + /// [`Scope::CloudPlatform`]. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: St) -> ProviderAccountRejectCall<'a, S> + where St: AsRef { + self._scopes.insert(String::from(scope.as_ref())); + self + } + /// Identifies the authorization scope(s) for the method you are building. + /// + /// See [`Self::add_scope()`] for details. + pub fn add_scopes(mut self, scopes: I) -> ProviderAccountRejectCall<'a, S> + where I: IntoIterator, + St: AsRef { + self._scopes + .extend(scopes.into_iter().map(|s| String::from(s.as_ref()))); + self + } + + /// Removes all scopes, and no default scope will be used either. + /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`] + /// for details). + pub fn clear_scopes(mut self) -> ProviderAccountRejectCall<'a, S> { + self._scopes.clear(); + self + } +} + + +/// Resets an Account and cancels all associated Entitlements. Partner can only reset accounts they own rather than customer accounts. +/// +/// A builder for the *accounts.reset* method supported by a *provider* resource. +/// It is not used directly, but through a [`ProviderMethods`] instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate hyper_rustls; +/// # extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// use cloudcommerceprocurement1::api::ResetAccountRequest; +/// # async fn dox() { +/// # use std::default::Default; +/// # use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// # let secret: oauth2::ApplicationSecret = Default::default(); +/// # let auth = oauth2::InstalledFlowAuthenticator::builder( +/// # secret, +/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// # ).build().await.unwrap(); +/// # let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // As the method needs a request, you would usually fill it with the desired information +/// // into the respective structure. Some of the parts shown here might not be applicable ! +/// // Values shown here are possibly random and not representative ! +/// let mut req = ResetAccountRequest::default(); +/// +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.providers().accounts_reset(req, "name") +/// .doit().await; +/// # } +/// ``` +pub struct ProviderAccountResetCall<'a, S> + where S: 'a { + + hub: &'a CloudCommercePartnerProcurementService, + _request: ResetAccountRequest, + _name: String, + _delegate: Option<&'a mut dyn client::Delegate>, + _additional_params: HashMap, + _scopes: BTreeSet +} + +impl<'a, S> client::CallBuilder for ProviderAccountResetCall<'a, S> {} + +impl<'a, S> ProviderAccountResetCall<'a, S> +where + S: tower_service::Service + Clone + Send + Sync + 'static, + S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, + S::Future: Send + Unpin + 'static, + S::Error: Into>, +{ + + + /// Perform the operation you have build so far. + pub async fn doit(mut self) -> client::Result<(hyper::Response, Empty)> { + use std::io::{Read, Seek}; + use hyper::header::{CONTENT_TYPE, CONTENT_LENGTH, AUTHORIZATION, USER_AGENT, LOCATION}; + use client::{ToParts, url::Params}; + use std::borrow::Cow; + + let mut dd = client::DefaultDelegate; + let mut dlg: &mut dyn client::Delegate = self._delegate.unwrap_or(&mut dd); + dlg.begin(client::MethodInfo { id: "cloudcommerceprocurement.providers.accounts.reset", + http_method: hyper::Method::POST }); + + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(client::Error::FieldClash(field)); + } + } + + let mut params = Params::with_capacity(4 + self._additional_params.len()); + params.push("name", self._name); + + params.extend(self._additional_params.iter()); + + params.push("alt", "json"); + let mut url = self.hub._base_url.clone() + "v1/{+name}:reset"; + if self._scopes.is_empty() { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + url = params.uri_replacement(url, param_name, find_this, true); + } + { + let to_remove = ["name"]; + params.remove_params(&to_remove); + } + + let url = params.parse_with_url(&url); + + let mut json_mime_type = mime::APPLICATION_JSON; + let mut request_value_reader = + { + let mut value = json::value::to_value(&self._request).expect("serde to work"); + client::remove_json_null_values(&mut value); + let mut dst = io::Cursor::new(Vec::with_capacity(128)); + json::to_writer(&mut dst, &value).unwrap(); + dst + }; + let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap(); + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + + + loop { + let token = match self.hub.auth.get_token(&self._scopes.iter().map(String::as_str).collect::>()[..]).await { + Ok(token) => token, + Err(e) => { + match dlg.token(e) { + Ok(token) => token, + Err(e) => { + dlg.finished(false); + return Err(client::Error::MissingToken(e)); + } + } + } + }; + request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); + let mut req_result = { + let client = &self.hub.client; + dlg.pre_request(); + let mut req_builder = hyper::Request::builder() + .method(hyper::Method::POST) + .uri(url.as_str()) + .header(USER_AGENT, self.hub._user_agent.clone()); + + if let Some(token) = token.as_ref() { + req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token)); + } + + + let request = req_builder + .header(CONTENT_TYPE, json_mime_type.to_string()) + .header(CONTENT_LENGTH, request_size as u64) + .body(hyper::body::Body::from(request_value_reader.get_ref().clone())); + + client.request(request.unwrap()).await + + }; + + match req_result { + Err(err) => { + if let client::Retry::After(d) = dlg.http_error(&err) { + sleep(d).await; + continue; + } + dlg.finished(false); + return Err(client::Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status().is_success() { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + let (parts, _) = res.into_parts(); + let body = hyper::Body::from(res_body_string.clone()); + let restored_response = hyper::Response::from_parts(parts, body); + + let server_response = json::from_str::(&res_body_string).ok(); + + if let client::Retry::After(d) = dlg.http_failure(&restored_response, server_response.clone()) { + sleep(d).await; + continue; + } + + dlg.finished(false); + + return match server_response { + Some(error_value) => Err(client::Error::BadRequest(error_value)), + None => Err(client::Error::Failure(restored_response)), + } + } + let result_value = { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + + match json::from_str(&res_body_string) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&res_body_string, &err); + return Err(client::Error::JsonDecodeError(res_body_string, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// + /// Sets the *request* property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn request(mut self, new_value: ResetAccountRequest) -> ProviderAccountResetCall<'a, S> { + self._request = new_value; + self + } + /// Required. The resource name of the account. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProviderAccountResetCall<'a, S> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// ````text + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// ```` + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProviderAccountResetCall<'a, S> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known parameters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *access_token* (query-string) - OAuth access token. + /// * *callback* (query-string) - JSONP + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProviderAccountResetCall<'a, S> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant + /// [`Scope::CloudPlatform`]. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: St) -> ProviderAccountResetCall<'a, S> + where St: AsRef { + self._scopes.insert(String::from(scope.as_ref())); + self + } + /// Identifies the authorization scope(s) for the method you are building. + /// + /// See [`Self::add_scope()`] for details. + pub fn add_scopes(mut self, scopes: I) -> ProviderAccountResetCall<'a, S> + where I: IntoIterator, + St: AsRef { + self._scopes + .extend(scopes.into_iter().map(|s| String::from(s.as_ref()))); + self + } + + /// Removes all scopes, and no default scope will be used either. + /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`] + /// for details). + pub fn clear_scopes(mut self) -> ProviderAccountResetCall<'a, S> { + self._scopes.clear(); + self + } +} + + +/// Gets a requested Account resource. +/// +/// A builder for the *accounts.get* method supported by a *provider* resource. +/// It is not used directly, but through a [`ProviderMethods`] instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate hyper_rustls; +/// # extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// # async fn dox() { +/// # use std::default::Default; +/// # use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// # let secret: oauth2::ApplicationSecret = Default::default(); +/// # let auth = oauth2::InstalledFlowAuthenticator::builder( +/// # secret, +/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// # ).build().await.unwrap(); +/// # let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.providers().accounts_get("name") +/// .doit().await; +/// # } +/// ``` +pub struct ProviderAccountGetCall<'a, S> + where S: 'a { + + hub: &'a CloudCommercePartnerProcurementService, + _name: String, + _delegate: Option<&'a mut dyn client::Delegate>, + _additional_params: HashMap, + _scopes: BTreeSet +} + +impl<'a, S> client::CallBuilder for ProviderAccountGetCall<'a, S> {} + +impl<'a, S> ProviderAccountGetCall<'a, S> +where + S: tower_service::Service + Clone + Send + Sync + 'static, + S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, + S::Future: Send + Unpin + 'static, + S::Error: Into>, +{ + + + /// Perform the operation you have build so far. + pub async fn doit(mut self) -> client::Result<(hyper::Response, Account)> { + use std::io::{Read, Seek}; + use hyper::header::{CONTENT_TYPE, CONTENT_LENGTH, AUTHORIZATION, USER_AGENT, LOCATION}; + use client::{ToParts, url::Params}; + use std::borrow::Cow; + + let mut dd = client::DefaultDelegate; + let mut dlg: &mut dyn client::Delegate = self._delegate.unwrap_or(&mut dd); + dlg.begin(client::MethodInfo { id: "cloudcommerceprocurement.providers.accounts.get", + http_method: hyper::Method::GET }); + + for &field in ["alt", "name"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(client::Error::FieldClash(field)); + } + } + + let mut params = Params::with_capacity(3 + self._additional_params.len()); + params.push("name", self._name); + + params.extend(self._additional_params.iter()); + + params.push("alt", "json"); + let mut url = self.hub._base_url.clone() + "v1/{+name}"; + if self._scopes.is_empty() { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string()); + } + + for &(find_this, param_name) in [("{+name}", "name")].iter() { + url = params.uri_replacement(url, param_name, find_this, true); + } + { + let to_remove = ["name"]; + params.remove_params(&to_remove); + } + + let url = params.parse_with_url(&url); + + + + loop { + let token = match self.hub.auth.get_token(&self._scopes.iter().map(String::as_str).collect::>()[..]).await { + Ok(token) => token, + Err(e) => { + match dlg.token(e) { + Ok(token) => token, + Err(e) => { + dlg.finished(false); + return Err(client::Error::MissingToken(e)); + } + } + } + }; + let mut req_result = { + let client = &self.hub.client; + dlg.pre_request(); + let mut req_builder = hyper::Request::builder() + .method(hyper::Method::GET) + .uri(url.as_str()) + .header(USER_AGENT, self.hub._user_agent.clone()); + + if let Some(token) = token.as_ref() { + req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token)); + } + + + let request = req_builder + .header(CONTENT_LENGTH, 0_u64) + .body(hyper::body::Body::empty()); + + client.request(request.unwrap()).await + + }; + + match req_result { + Err(err) => { + if let client::Retry::After(d) = dlg.http_error(&err) { + sleep(d).await; + continue; + } + dlg.finished(false); + return Err(client::Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status().is_success() { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + let (parts, _) = res.into_parts(); + let body = hyper::Body::from(res_body_string.clone()); + let restored_response = hyper::Response::from_parts(parts, body); + + let server_response = json::from_str::(&res_body_string).ok(); + + if let client::Retry::After(d) = dlg.http_failure(&restored_response, server_response.clone()) { + sleep(d).await; + continue; + } + + dlg.finished(false); + + return match server_response { + Some(error_value) => Err(client::Error::BadRequest(error_value)), + None => Err(client::Error::Failure(restored_response)), + } + } + let result_value = { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + + match json::from_str(&res_body_string) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&res_body_string, &err); + return Err(client::Error::JsonDecodeError(res_body_string, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Required. The name of the account to retrieve. + /// + /// Sets the *name* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn name(mut self, new_value: &str) -> ProviderAccountGetCall<'a, S> { + self._name = new_value.to_string(); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// ````text + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// ```` + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProviderAccountGetCall<'a, S> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known parameters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *access_token* (query-string) - OAuth access token. + /// * *callback* (query-string) - JSONP + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProviderAccountGetCall<'a, S> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant + /// [`Scope::CloudPlatform`]. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: St) -> ProviderAccountGetCall<'a, S> + where St: AsRef { + self._scopes.insert(String::from(scope.as_ref())); + self + } + /// Identifies the authorization scope(s) for the method you are building. + /// + /// See [`Self::add_scope()`] for details. + pub fn add_scopes(mut self, scopes: I) -> ProviderAccountGetCall<'a, S> + where I: IntoIterator, + St: AsRef { + self._scopes + .extend(scopes.into_iter().map(|s| String::from(s.as_ref()))); + self + } + + /// Removes all scopes, and no default scope will be used either. + /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`] + /// for details). + pub fn clear_scopes(mut self) -> ProviderAccountGetCall<'a, S> { + self._scopes.clear(); + self + } +} + + +/// Lists Accounts that the provider has access to. +/// +/// A builder for the *accounts.list* method supported by a *provider* resource. +/// It is not used directly, but through a [`ProviderMethods`] instance. +/// +/// # Example +/// +/// Instantiate a resource method builder +/// +/// ```test_harness,no_run +/// # extern crate hyper; +/// # extern crate hyper_rustls; +/// # extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +/// # async fn dox() { +/// # use std::default::Default; +/// # use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +/// +/// # let secret: oauth2::ApplicationSecret = Default::default(); +/// # let auth = oauth2::InstalledFlowAuthenticator::builder( +/// # secret, +/// # oauth2::InstalledFlowReturnMethod::HTTPRedirect, +/// # ).build().await.unwrap(); +/// # let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +/// // You can configure optional parameters by calling the respective setters at will, and +/// // execute the final call using `doit()`. +/// // Values shown here are possibly random and not representative ! +/// let result = hub.providers().accounts_list("parent") +/// .page_token("ipsum") +/// .page_size(-88) +/// .doit().await; +/// # } +/// ``` +pub struct ProviderAccountListCall<'a, S> + where S: 'a { + + hub: &'a CloudCommercePartnerProcurementService, + _parent: String, + _page_token: Option, + _page_size: Option, + _delegate: Option<&'a mut dyn client::Delegate>, + _additional_params: HashMap, + _scopes: BTreeSet +} + +impl<'a, S> client::CallBuilder for ProviderAccountListCall<'a, S> {} + +impl<'a, S> ProviderAccountListCall<'a, S> +where + S: tower_service::Service + Clone + Send + Sync + 'static, + S::Response: hyper::client::connect::Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, + S::Future: Send + Unpin + 'static, + S::Error: Into>, +{ + + + /// Perform the operation you have build so far. + pub async fn doit(mut self) -> client::Result<(hyper::Response, ListAccountsResponse)> { + use std::io::{Read, Seek}; + use hyper::header::{CONTENT_TYPE, CONTENT_LENGTH, AUTHORIZATION, USER_AGENT, LOCATION}; + use client::{ToParts, url::Params}; + use std::borrow::Cow; + + let mut dd = client::DefaultDelegate; + let mut dlg: &mut dyn client::Delegate = self._delegate.unwrap_or(&mut dd); + dlg.begin(client::MethodInfo { id: "cloudcommerceprocurement.providers.accounts.list", + http_method: hyper::Method::GET }); + + for &field in ["alt", "parent", "pageToken", "pageSize"].iter() { + if self._additional_params.contains_key(field) { + dlg.finished(false); + return Err(client::Error::FieldClash(field)); + } + } + + let mut params = Params::with_capacity(5 + self._additional_params.len()); + params.push("parent", self._parent); + if let Some(value) = self._page_token.as_ref() { + params.push("pageToken", value); + } + if let Some(value) = self._page_size.as_ref() { + params.push("pageSize", value.to_string()); + } + + params.extend(self._additional_params.iter()); + + params.push("alt", "json"); + let mut url = self.hub._base_url.clone() + "v1/{+parent}/accounts"; + if self._scopes.is_empty() { + self._scopes.insert(Scope::CloudPlatform.as_ref().to_string()); + } + + for &(find_this, param_name) in [("{+parent}", "parent")].iter() { + url = params.uri_replacement(url, param_name, find_this, true); + } + { + let to_remove = ["parent"]; + params.remove_params(&to_remove); + } + + let url = params.parse_with_url(&url); + + + + loop { + let token = match self.hub.auth.get_token(&self._scopes.iter().map(String::as_str).collect::>()[..]).await { + Ok(token) => token, + Err(e) => { + match dlg.token(e) { + Ok(token) => token, + Err(e) => { + dlg.finished(false); + return Err(client::Error::MissingToken(e)); + } + } + } + }; + let mut req_result = { + let client = &self.hub.client; + dlg.pre_request(); + let mut req_builder = hyper::Request::builder() + .method(hyper::Method::GET) + .uri(url.as_str()) + .header(USER_AGENT, self.hub._user_agent.clone()); + + if let Some(token) = token.as_ref() { + req_builder = req_builder.header(AUTHORIZATION, format!("Bearer {}", token)); + } + + + let request = req_builder + .header(CONTENT_LENGTH, 0_u64) + .body(hyper::body::Body::empty()); + + client.request(request.unwrap()).await + + }; + + match req_result { + Err(err) => { + if let client::Retry::After(d) = dlg.http_error(&err) { + sleep(d).await; + continue; + } + dlg.finished(false); + return Err(client::Error::HttpError(err)) + } + Ok(mut res) => { + if !res.status().is_success() { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + let (parts, _) = res.into_parts(); + let body = hyper::Body::from(res_body_string.clone()); + let restored_response = hyper::Response::from_parts(parts, body); + + let server_response = json::from_str::(&res_body_string).ok(); + + if let client::Retry::After(d) = dlg.http_failure(&restored_response, server_response.clone()) { + sleep(d).await; + continue; + } + + dlg.finished(false); + + return match server_response { + Some(error_value) => Err(client::Error::BadRequest(error_value)), + None => Err(client::Error::Failure(restored_response)), + } + } + let result_value = { + let res_body_string = client::get_body_as_string(res.body_mut()).await; + + match json::from_str(&res_body_string) { + Ok(decoded) => (res, decoded), + Err(err) => { + dlg.response_json_decode_error(&res_body_string, &err); + return Err(client::Error::JsonDecodeError(res_body_string, err)); + } + } + }; + + dlg.finished(true); + return Ok(result_value) + } + } + } + } + + + /// Required. The parent resource name. + /// + /// Sets the *parent* path property to the given value. + /// + /// Even though the property as already been set when instantiating this call, + /// we provide this method for API completeness. + pub fn parent(mut self, new_value: &str) -> ProviderAccountListCall<'a, S> { + self._parent = new_value.to_string(); + self + } + /// The token for fetching the next page. + /// + /// Sets the *page token* query property to the given value. + pub fn page_token(mut self, new_value: &str) -> ProviderAccountListCall<'a, S> { + self._page_token = Some(new_value.to_string()); + self + } + /// The maximum number of entries that are requested. The default page size is 25 and the maximum page size is 200. + /// + /// Sets the *page size* query property to the given value. + pub fn page_size(mut self, new_value: i32) -> ProviderAccountListCall<'a, S> { + self._page_size = Some(new_value); + self + } + /// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong + /// while executing the actual API request. + /// + /// ````text + /// It should be used to handle progress information, and to implement a certain level of resilience. + /// ```` + /// + /// Sets the *delegate* property to the given value. + pub fn delegate(mut self, new_value: &'a mut dyn client::Delegate) -> ProviderAccountListCall<'a, S> { + self._delegate = Some(new_value); + self + } + + /// Set any additional parameter of the query string used in the request. + /// It should be used to set parameters which are not yet available through their own + /// setters. + /// + /// Please note that this method must not be used to set any of the known parameters + /// which have their own setter method. If done anyway, the request will fail. + /// + /// # Additional Parameters + /// + /// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + /// * *access_token* (query-string) - OAuth access token. + /// * *callback* (query-string) - JSONP + /// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart"). + /// * *oauth_token* (query-string) - OAuth 2.0 token for the current user. + /// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + /// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks. + /// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart"). + /// * *alt* (query-string) - Data format for response. + /// * *fields* (query-string) - Selector specifying which fields to include in a partial response. + /// * *$.xgafv* (query-string) - V1 error format. + pub fn param(mut self, name: T, value: T) -> ProviderAccountListCall<'a, S> + where T: AsRef { + self._additional_params.insert(name.as_ref().to_string(), value.as_ref().to_string()); + self + } + + /// Identifies the authorization scope for the method you are building. + /// + /// Use this method to actively specify which scope should be used, instead of the default [`Scope`] variant + /// [`Scope::CloudPlatform`]. + /// + /// The `scope` will be added to a set of scopes. This is important as one can maintain access + /// tokens for more than one scope. + /// + /// Usually there is more than one suitable scope to authorize an operation, some of which may + /// encompass more rights than others. For example, for listing resources, a *read-only* scope will be + /// sufficient, a read-write scope will do as well. + pub fn add_scope(mut self, scope: St) -> ProviderAccountListCall<'a, S> + where St: AsRef { + self._scopes.insert(String::from(scope.as_ref())); + self + } + /// Identifies the authorization scope(s) for the method you are building. + /// + /// See [`Self::add_scope()`] for details. + pub fn add_scopes(mut self, scopes: I) -> ProviderAccountListCall<'a, S> + where I: IntoIterator, + St: AsRef { + self._scopes + .extend(scopes.into_iter().map(|s| String::from(s.as_ref()))); + self + } + + /// Removes all scopes, and no default scope will be used either. + /// In this case, you have to specify your API-key using the `key` parameter (see [`Self::param()`] + /// for details). + pub fn clear_scopes(mut self) -> ProviderAccountListCall<'a, S> { + self._scopes.clear(); + self + } +} + + diff --git a/gen/cloudcommerceprocurement1/src/lib.rs b/gen/cloudcommerceprocurement1/src/lib.rs new file mode 100644 index 0000000000..642251c766 --- /dev/null +++ b/gen/cloudcommerceprocurement1/src/lib.rs @@ -0,0 +1,217 @@ +// DO NOT EDIT ! +// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako' +// DO NOT EDIT ! + +//! This documentation was generated from *Cloud Commerce Partner Procurement Service* crate version *5.0.5+20240804*, where *20240804* is the exact revision of the *cloudcommerceprocurement:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.5*. +//! +//! Everything else about the *Cloud Commerce Partner Procurement Service* *v1* API can be found at the +//! [official documentation site](https://cloud.google.com/marketplace/docs/partners/). +//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/cloudcommerceprocurement1). +//! # Features +//! +//! Handle the following *Resources* with ease from the central [hub](CloudCommercePartnerProcurementService) ... +//! +//! * providers +//! * [*accounts approve*](api::ProviderAccountApproveCall), [*accounts get*](api::ProviderAccountGetCall), [*accounts list*](api::ProviderAccountListCall), [*accounts reject*](api::ProviderAccountRejectCall), [*accounts reset*](api::ProviderAccountResetCall), [*entitlements approve*](api::ProviderEntitlementApproveCall), [*entitlements approve plan change*](api::ProviderEntitlementApprovePlanChangeCall), [*entitlements get*](api::ProviderEntitlementGetCall), [*entitlements list*](api::ProviderEntitlementListCall), [*entitlements patch*](api::ProviderEntitlementPatchCall), [*entitlements reject*](api::ProviderEntitlementRejectCall), [*entitlements reject plan change*](api::ProviderEntitlementRejectPlanChangeCall) and [*entitlements suspend*](api::ProviderEntitlementSuspendCall) +//! +//! +//! +//! +//! Not what you are looking for ? Find all other Google APIs in their Rust [documentation index](http://byron.github.io/google-apis-rs). +//! +//! # Structure of this Library +//! +//! The API is structured into the following primary items: +//! +//! * **[Hub](CloudCommercePartnerProcurementService)** +//! * a central object to maintain state and allow accessing all *Activities* +//! * creates [*Method Builders*](client::MethodsBuilder) which in turn +//! allow access to individual [*Call Builders*](client::CallBuilder) +//! * **[Resources](client::Resource)** +//! * primary types that you can apply *Activities* to +//! * a collection of properties and *Parts* +//! * **[Parts](client::Part)** +//! * a collection of properties +//! * never directly used in *Activities* +//! * **[Activities](client::CallBuilder)** +//! * 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 +//! let r = hub.resource().activity(...).doit().await +//! ``` +//! +//! Or specifically ... +//! +//! ```ignore +//! let r = hub.providers().entitlements_suspend(...).doit().await +//! let r = hub.providers().entitlements_reject_plan_change(...).doit().await +//! let r = hub.providers().entitlements_approve(...).doit().await +//! let r = hub.providers().entitlements_approve_plan_change(...).doit().await +//! let r = hub.providers().entitlements_reject(...).doit().await +//! let r = hub.providers().accounts_approve(...).doit().await +//! let r = hub.providers().accounts_reject(...).doit().await +//! let r = hub.providers().accounts_reset(...).doit().await +//! ``` +//! +//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities` +//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be +//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired. +//! The `doit()` method performs the actual communication with the server and returns the respective result. +//! +//! # Usage +//! +//! ## Setting up your Project +//! +//! To use this library, you would put the following lines into your `Cargo.toml` file: +//! +//! ```toml +//! [dependencies] +//! google-cloudcommerceprocurement1 = "*" +//! serde = "^1.0" +//! serde_json = "^1.0" +//! ``` +//! +//! ## A complete example +//! +//! ```test_harness,no_run +//! extern crate hyper; +//! extern crate hyper_rustls; +//! extern crate google_cloudcommerceprocurement1 as cloudcommerceprocurement1; +//! use cloudcommerceprocurement1::api::SuspendEntitlementRequest; +//! use cloudcommerceprocurement1::{Result, Error}; +//! # async fn dox() { +//! use std::default::Default; +//! use cloudcommerceprocurement1::{CloudCommercePartnerProcurementService, oauth2, hyper, hyper_rustls, chrono, FieldMask}; +//! +//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and +//! // `client_secret`, among other things. +//! let secret: oauth2::ApplicationSecret = Default::default(); +//! // Instantiate the authenticator. It will choose a suitable authentication flow for you, +//! // unless you replace `None` with the desired Flow. +//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about +//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and +//! // retrieve them from storage. +//! let auth = oauth2::InstalledFlowAuthenticator::builder( +//! secret, +//! oauth2::InstalledFlowReturnMethod::HTTPRedirect, +//! ).build().await.unwrap(); +//! let mut hub = CloudCommercePartnerProcurementService::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth); +//! // As the method needs a request, you would usually fill it with the desired information +//! // into the respective structure. Some of the parts shown here might not be applicable ! +//! // Values shown here are possibly random and not representative ! +//! let mut req = SuspendEntitlementRequest::default(); +//! +//! // You can configure optional parameters by calling the respective setters at will, and +//! // execute the final call using `doit()`. +//! // Values shown here are possibly random and not representative ! +//! let result = hub.providers().entitlements_suspend(req, "name") +//! .doit().await; +//! +//! match result { +//! Err(e) => match e { +//! // The Error enum provides details about what exactly happened. +//! // You can also just use its `Debug`, `Display` or `Error` traits +//! Error::HttpError(_) +//! |Error::Io(_) +//! |Error::MissingAPIKey +//! |Error::MissingToken(_) +//! |Error::Cancelled +//! |Error::UploadSizeLimitExceeded(_, _) +//! |Error::Failure(_) +//! |Error::BadRequest(_) +//! |Error::FieldClash(_) +//! |Error::JsonDecodeError(_, _) => println!("{}", e), +//! }, +//! Ok(res) => println!("Success: {:?}", res), +//! } +//! # } +//! ``` +//! ## Handling Errors +//! +//! All errors produced by the system are provided either as [Result](client::Result) enumeration as return value of +//! the doit() methods, or handed as possibly intermediate results to either the +//! [Hub Delegate](client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html). +//! +//! 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 Downloads +//! If a method supports downloads, the response body, which is part of the [Result](client::Result), should be +//! read by you to obtain the media. +//! If such a method also supports a [Response Result](client::ResponseResult), it will return that by default. +//! You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making +//! this call: `.param("alt", "media")`. +//! +//! Methods supporting uploads can do so using up to 2 different protocols: +//! *simple* and *resumable*. The distinctiveness of each is represented by customized +//! `doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively. +//! +//! ## Customization and Callbacks +//! +//! You may alter the way an `doit()` method is called by providing a [delegate](client::Delegate) to the +//! [Method Builder](client::CallBuilder) before making the final `doit()` call. +//! Respective methods will be called to provide progress information, as well as determine whether the system should +//! retry on failure. +//! +//! The [delegate trait](client::Delegate) is default-implemented, allowing you to customize it with minimal effort. +//! +//! ## Optional Parts in Server-Requests +//! +//! All structures provided by this library are made to be [encodable](client::RequestValue) and +//! [decodable](client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses +//! are valid. +//! Most optionals are are considered [Parts](client::Part) 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 +//! +//! Using [method builders](client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods. +//! These will always take a single argument, for which the following statements are true. +//! +//! * [PODs][wiki-pod] are handed by copy +//! * strings are passed as `&str` +//! * [request values](client::RequestValue) are moved +//! +//! Arguments will always be copied or cloned into the builder, to make them independent of their original life times. +//! +//! [wiki-pod]: http://en.wikipedia.org/wiki/Plain_old_data_structure +//! [builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern +//! [google-go-api]: https://github.com/google/google-api-go-client +//! +//! ## Cargo Features +//! +//! * `utoipa` - Add support for [utoipa](https://crates.io/crates/utoipa) and derive `utoipa::ToSchema` on all +//! the types. You'll have to import and register the required types in `#[openapi(schemas(...))]`, otherwise the +//! generated `openapi` spec would be invalid. +//! +//! +//! + +// Unused attributes happen thanks to defined, but unused structures +// We don't warn about this, as depending on the API, some data structures or facilities are never used. +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// unused imports in fully featured APIs. Same with unused_mut ... . +#![allow(unused_imports, unused_mut, dead_code)] + +// DO NOT EDIT ! +// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako' +// DO NOT EDIT ! + +// Re-export the hyper and hyper_rustls crate, they are required to build the hub +pub use hyper; +pub use hyper_rustls; +pub extern crate google_apis_common as client; +pub use client::chrono; +pub mod api; + +// Re-export the hub type and some basic client structs +pub use api::CloudCommercePartnerProcurementService; +pub use client::{Result, Error, Delegate, FieldMask}; + +// Re-export the yup_oauth2 crate, that is required to call some methods of the hub and the client +#[cfg(feature = "yup-oauth2")] +pub use client::oauth2; \ No newline at end of file